/* Generated by EX4-TO-MQ4 decompiler ONE FILE V4.0.217.1 EX4 ID : B35F94C8FE04E1DE91CF038051BE219F Website: http://purebeam.biz E-mail : purebeam@gmail.com */ #property copyright "Nikosoftware" #property link "http://nikosoftware.narod.ru" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 ForestGreen #property indicator_color2 Red extern int Periods = 6; datetime g_time_80; int g_bars_84; int gi_88; int gi_92; int gi_96 = 1; bool gi_100; double gd_104; double g_iwpr_112; double g_high_120; double g_low_128; double g_high_136; double g_low_144; double g_ibuf_152[]; double g_ibuf_156[]; //-----------------------------// double Points; double LastBid; double SELL; //------------------------------// int init() { IndicatorBuffers(2); SetIndexStyle(0, DRAW_ARROW, STYLE_DASH, 1); SetIndexArrow(0, 233/*236*/); SetIndexStyle(1, DRAW_ARROW, STYLE_DASH, 1); SetIndexArrow(1, 234/*238*/); SetIndexBuffer(0, g_ibuf_152); SetIndexBuffer(1, g_ibuf_156); SetIndexEmptyValue(0, 0.0); SetIndexEmptyValue(1, 0.0); Points = MarketInfo (Symbol(),MODE_POINT); return (0); } int deinit() { return (0); } int start() { if (g_time_80 == Time[0] && gi_88 == -1) return (0); g_time_80 = Time[0]; if (Bars < 100) return (0); if (Bars < g_bars_84 || Bars - g_bars_84 > 1) gi_100 = TRUE; g_bars_84 = Bars; if (gi_100 == TRUE) { if (Close[Bars - 100] > Open[Bars - 100]) gd_104 = 0.5; else gd_104 = -0.5; gi_88 = Bars - 100; if (gi_88 < 0) return (0); gi_100 = FALSE; } gi_88++; for (gi_92 = gi_88; gi_92 >= 0; gi_92--) { g_iwpr_112 = iWPR(NULL, 0, Periods, gi_92); if (gi_96 == -1 && g_iwpr_112 > -30.0) { gi_96 = 1; g_low_144 = g_low_128; g_high_120 = High[gi_92]; } if (gi_96 == 1 && g_iwpr_112 < -70.0) { gi_96 = -1; g_high_136 = g_high_120; g_low_128 = Low[gi_92]; } if (gi_96 == 1 && High[gi_92] > g_high_120) g_high_120 = High[gi_92]; if (gi_96 == -1 && Low[gi_92] < g_low_128) g_low_128 = Low[gi_92]; if (gi_96 == 1 && High[gi_92] > g_high_120) g_high_120 = High[gi_92]; if (gi_96 == -1 && Low[gi_92] < g_low_128) g_low_128 = Low[gi_92]; if (gd_104 == -0.5 && g_high_120 > g_high_136) { gd_104 = 0.5; g_ibuf_152[gi_92] = Low[gi_92] - 20.0 * Point; } if (gd_104 == 0.5 && g_low_128 < g_low_144) { gd_104 = -0.5; g_ibuf_156[gi_92] = High[gi_92] + 20.0 * Point; } } return (0); }