/*
   G e n e r a t e d  by ex4-to-mq4 decompiler FREEWARE 4.0.509.5
   Website:  H tT P ://Www.M Eta q u O T e S. neT
   E-mail : S u p p O R t@m etAqU o Te s.NE t
*/

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Aqua

extern int dist = 24;
extern double arrowPosition = 0.25;
double G_ibuf_88[];
double G_ibuf_92[];

// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
   SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, 1);
   SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 1);
   SetIndexArrow(1, 233);
   SetIndexArrow(0, 234);
   SetIndexBuffer(0, G_ibuf_88);
   SetIndexBuffer(1, G_ibuf_92);
   return (0);
}

// EA2B2676C28C0DB26D39331A336C6B92
int start() {
   int highest_20;
   int lowest_24;
   int Li_0 = IndicatorCounted();
   if (Li_0 < 0) return (-1);
   if (Li_0 > 0) Li_0--;
   int Li_16 = Bars - Li_0 - 1;
   Li_16 = MathMax(Li_16, dist);
   if (Li_16 < 0) Li_16 = 0;
   for (int Li_8 = Li_16; Li_8 >= 0; Li_8--) {
      highest_20 = iHighest(NULL, 0, MODE_HIGH, dist, Li_8 - dist / 2);
      lowest_24 = iLowest(NULL, 0, MODE_LOW, dist, Li_8 - dist / 2);
      if (Li_8 == highest_20) G_ibuf_88[Li_8] = High[highest_20] + iATR(NULL, 0, 10, Li_8) * arrowPosition;
      else G_ibuf_88[Li_8] = EMPTY_VALUE;
      if (Li_8 == lowest_24) G_ibuf_92[Li_8] = Low[lowest_24] - iATR(NULL, 0, 10, Li_8) * arrowPosition;
      else G_ibuf_92[Li_8] = EMPTY_VALUE;
   }
   return (0);
}
