#property copyright "Copyright © 2009, FX MetaBird" #property link "http://fx-metabird.biz/" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 LightSkyBlue #property indicator_color2 LightSkyBlue extern int SignalGap = 3; int gi_80 = 24; double g_ibuf_84[]; double g_ibuf_88[]; int init() { SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, 1); SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 1); SetIndexArrow(1, 225); SetIndexArrow(0, 226); SetIndexBuffer(0, g_ibuf_84); SetIndexBuffer(1, g_ibuf_88); return (0); } int start() { int l_highest_20; int l_lowest_24; int li_0 = IndicatorCounted(); if (li_0 < 0) return (-1); if (li_0 > 0) li_0--; int li_16 = Bars - 1; if (li_0 >= 1) li_16 = Bars - li_0 - 1; if (li_16 < 0) li_16 = 0; for (int li_8 = li_16; li_8 >= 0; li_8--) { l_highest_20 = iHighest(NULL, 0, MODE_HIGH, gi_80, li_8 - gi_80 / 2); l_lowest_24 = iLowest(NULL, 0, MODE_LOW, gi_80, li_8 - gi_80 / 2); if (li_8 == l_highest_20) g_ibuf_84[li_8] = High[l_highest_20] + SignalGap * Point; if (li_8 == l_lowest_24) g_ibuf_88[li_8] = Low[l_lowest_24] - SignalGap * Point; } return (0); }