#property copyright "Copyright © 2009, fxsupertools.com" #property link "http://fxsupertools.com/" #property indicator_separate_window #property indicator_buffers 8 #property indicator_color1 C'0xA2,0xD0,0xA2' #property indicator_color2 C'0x5A,0xB9,0x5A' #property indicator_color3 C'0x17,0x8B,0x17' #property indicator_color4 C'0x82,0x82,0x82' #property indicator_color5 C'0xFF,0xB9,0xB9' #property indicator_color6 C'0xFF,0x73,0x73' #property indicator_color7 C'0xFF,0x4C,0x4C' #property indicator_color8 C'0xFF,0x20,0x20' extern int Periode = 28; extern bool invert_strength = FALSE; extern string CurrencyPair = ""; extern string NOTE0 = "Enter Symbol like EURUSD"; extern string NOTE2 = "Blank for current symbol"; double g_ibuf_108[]; double g_ibuf_112[]; double g_ibuf_116[]; double g_ibuf_120[]; double g_ibuf_124[]; double g_ibuf_128[]; double g_ibuf_132[]; double g_ibuf_136[]; double gda_unused_140[]; int init() { SetIndexBuffer(0, g_ibuf_108); SetIndexBuffer(1, g_ibuf_112); SetIndexBuffer(2, g_ibuf_116); SetIndexBuffer(3, g_ibuf_120); SetIndexBuffer(4, g_ibuf_124); SetIndexBuffer(5, g_ibuf_128); SetIndexBuffer(6, g_ibuf_132); SetIndexBuffer(7, g_ibuf_136); SetIndexStyle(0, DRAW_HISTOGRAM, EMPTY, 5); SetIndexStyle(1, DRAW_HISTOGRAM, EMPTY, 5); SetIndexStyle(2, DRAW_HISTOGRAM, EMPTY, 5); SetIndexStyle(3, DRAW_HISTOGRAM, EMPTY, 5); SetIndexStyle(4, DRAW_HISTOGRAM, EMPTY, 5); SetIndexStyle(5, DRAW_HISTOGRAM, EMPTY, 5); SetIndexStyle(6, DRAW_HISTOGRAM, EMPTY, 5); SetIndexStyle(7, DRAW_HISTOGRAM, EMPTY, 5); for (int li_0 = 0; li_0 < 8; li_0++) SetIndexLabel(li_0, NULL); if (CurrencyPair == "") CurrencyPair = Symbol(); if (iClose(CurrencyPair, 0, 0) == 0.0) CurrencyPair = Symbol(); IndicatorShortName(CurrencyPair + "(" + Periode + ")"); return (1); } int deinit() { return (0); } int start() { double ld_8; int li_0 = IndicatorCounted(); if (li_0 < 0) return (-1); if (li_0 > 0) li_0--; for (int li_4 = Bars - li_0; li_4 >= 0; li_4--) { ld_8 = iRSI(CurrencyPair, 0, Periode, PRICE_CLOSE, li_4); if (invert_strength == TRUE) ld_8 -= 2.0 * (ld_8 - 50.0); if (ld_8 <= 48.0) { if (ld_8 <= 48.0 && ld_8 > 44.0) drawblock(0, 0, 0, 0, 5, 0, 0, 0, li_4); else { if (ld_8 <= 44.0 && ld_8 > 39.0) drawblock(0, 0, 0, 0, 0, 5, 0, 0, li_4); else { if (ld_8 <= 39.0 && ld_8 > 35.0) drawblock(0, 0, 0, 0, 0, 0, 5, 0, li_4); else drawblock(0, 0, 0, 0, 0, 0, 0, 5, li_4); } } } else { if (ld_8 >= 52.0) { if (ld_8 > 52.0 && ld_8 < 56.0) drawblock(5, 0, 0, 0, 0, 0, 0, 0, li_4); else { if (ld_8 >= 56.0 && ld_8 < 60.0) drawblock(0, 5, 0, 0, 0, 0, 0, 0, li_4); else drawblock(0, 0, 5, 0, 0, 0, 0, 0, li_4); } } else drawblock(0, 0, 0, 5, 0, 0, 0, 0, li_4); } } return (0); } void drawblock(int ai_0, int ai_4, int ai_8, int ai_12, int ai_16, int ai_20, int ai_24, int ai_28, int ai_32) { g_ibuf_108[ai_32] = ai_0; g_ibuf_112[ai_32] = ai_4; g_ibuf_116[ai_32] = ai_8; g_ibuf_120[ai_32] = ai_12; g_ibuf_124[ai_32] = ai_16; g_ibuf_128[ai_32] = ai_20; g_ibuf_132[ai_32] = ai_24; g_ibuf_136[ai_32] = ai_28; }