#property copyright "Copyright © 2008, Nasatajrie" #property link "nasatajrie@gmail.com" #property indicator_separate_window #property indicator_minimum -0.05 #property indicator_maximum 1.0 #property indicator_buffers 4 #property indicator_color1 MidnightBlue #property indicator_color2 Maroon #property indicator_color3 Blue #property indicator_color4 Red extern int RSIPeriode = 14; extern int CCIPeriod = 0; double g_ibuf_84[]; double g_ibuf_88[]; double g_ibuf_92[]; double g_ibuf_96[]; 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_84); SetIndexBuffer(1, g_ibuf_88); SetIndexBuffer(2, g_ibuf_92); SetIndexBuffer(3, g_ibuf_96); IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS)); string ls_0 = "GreatTrader PW"; IndicatorShortName(ls_0); SetIndexLabel(0, "Overbought or Strong Bulls"); SetIndexLabel(1, "Oversold or Strong Bears"); SetIndexLabel(2, "Trend Bulls"); SetIndexLabel(3, "Trend Bears"); SetIndexDrawBegin(0, RSIPeriode); SetIndexDrawBegin(1, RSIPeriode); SetIndexDrawBegin(2, RSIPeriode); SetIndexDrawBegin(3, RSIPeriode); return (0); } int start() { int li_4; double l_iwpr_8; for (int li_0 = Bars - RSIPeriode - 1; li_0 >= 0; li_0--) { l_iwpr_8 = iWPR(NULL, 0, RSIPeriode, li_0); if (l_iwpr_8 > -50.0 && l_iwpr_8 < -20.0) li_4 = 1; if (l_iwpr_8 > -20.0) li_4 = 2; if (l_iwpr_8 < -50.0 && l_iwpr_8 > -80.0) li_4 = -1; if (l_iwpr_8 <= -80.0) li_4 = -2; if (li_4 == 1) { g_ibuf_84[li_0] = 0; g_ibuf_92[li_0] = 1; g_ibuf_88[li_0] = 0; g_ibuf_96[li_0] = 0; } if (li_4 == 2) { g_ibuf_84[li_0] = 1; g_ibuf_92[li_0] = 0; g_ibuf_88[li_0] = 0; g_ibuf_96[li_0] = 0; } if (li_4 == -1) { g_ibuf_84[li_0] = 0; g_ibuf_92[li_0] = 0; g_ibuf_88[li_0] = 0; g_ibuf_96[li_0] = 1; } if (li_4 == -2) { g_ibuf_84[li_0] = 0; g_ibuf_92[li_0] = 0; g_ibuf_88[li_0] = 1; g_ibuf_96[li_0] = 0; } } return (0); }