#property copyright "Copyright © 2008: nusantaraart@gmail.com" #property link "http://www.greattrader.co.cc" #property indicator_separate_window #property indicator_minimum -0.05 #property indicator_maximum 1.0 #property indicator_buffers 4 #property indicator_color1 Red #property indicator_color2 Blue #property indicator_color3 Blue #property indicator_color4 Red extern int BASE = 10; extern int iMAX = 3; extern int AreaCount = 5; double g_ibuf_88[]; double g_ibuf_92[]; double g_ibuf_96[]; double g_ibuf_100[]; int init() { SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 4); SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 4); SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 4); SetIndexStyle(3, DRAW_HISTOGRAM, STYLE_SOLID, 4); SetIndexBuffer(0, g_ibuf_88); SetIndexBuffer(1, g_ibuf_92); SetIndexBuffer(2, g_ibuf_96); SetIndexBuffer(3, g_ibuf_100); IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS)); string ls_0 = "GreatTrader FT"; IndicatorShortName(ls_0); SetIndexLabel(0, "Strong Bears"); SetIndexLabel(1, "Strong Bulls"); SetIndexLabel(2, "Potential to Bulls"); SetIndexLabel(3, "Potential to Bears"); SetIndexDrawBegin(0, BASE); SetIndexDrawBegin(1, BASE); SetIndexDrawBegin(2, BASE); SetIndexDrawBegin(3, BASE); return (0); } int start() { int li_4; double l_istochastic_8; double l_istochastic_16; for (int l_shift_0 = Bars - BASE - 1; l_shift_0 >= 0; l_shift_0--) { l_istochastic_8 = iStochastic(NULL, 0, BASE, iMAX, AreaCount, MODE_LWMA, 1, MODE_MAIN, l_shift_0); l_istochastic_16 = iStochastic(NULL, 0, BASE, iMAX, AreaCount, MODE_EMA, 1, MODE_SIGNAL, l_shift_0); if (l_istochastic_16 > 20.0 && l_istochastic_8 > l_istochastic_16 && l_istochastic_8 < 40.0 && l_istochastic_16 < 40.0) li_4 = 1; if (l_istochastic_16 <= 20.0) li_4 = 2; if (l_istochastic_16 < 80.0 && l_istochastic_8 < l_istochastic_16 && l_istochastic_8 > 60.0 && l_istochastic_16 > 60.0) li_4 = 3; if (l_istochastic_16 >= 80.0) li_4 = 4; if (li_4 == 1) { g_ibuf_88[l_shift_0] = 0; g_ibuf_96[l_shift_0] = 1; g_ibuf_92[l_shift_0] = 0; g_ibuf_100[l_shift_0] = 0; } if (li_4 == 2) { g_ibuf_88[l_shift_0] = 1; g_ibuf_96[l_shift_0] = 0; g_ibuf_92[l_shift_0] = 0; g_ibuf_100[l_shift_0] = 0; } if (li_4 == 3) { g_ibuf_88[l_shift_0] = 0; g_ibuf_96[l_shift_0] = 0; g_ibuf_92[l_shift_0] = 0; g_ibuf_100[l_shift_0] = 1; } if (li_4 == 4) { g_ibuf_88[l_shift_0] = 0; g_ibuf_96[l_shift_0] = 0; g_ibuf_92[l_shift_0] = 1; g_ibuf_100[l_shift_0] = 0; } } return (0); }