/*
   G e n e r a t e d  by ex4-to-mq4 decompiler FREEWARE 4.0.509.5
   Website: H T t P:// w w W .MEt AQ U OTeS . n ET
   E-mail :  su PPO R T @MET a q U O T e s .n e t
*/
#property copyright "Ron Thompson"
#property link      "http://www.lightpatch.com"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 White
#property indicator_color2 Red

double G_ibuf_76[];
double G_ibuf_80[];
extern int RSISlow = 14;
extern int RSIFast = 7;
extern int RSIType = 1;

// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexBuffer(0, G_ibuf_76);
   SetIndexArrow(0, 233);
   SetIndexStyle(1, DRAW_ARROW);
   SetIndexBuffer(1, G_ibuf_80);
   SetIndexArrow(1, 234);
   return (0);
}

// 52D46093050F38C27267BCE42543EF60
int deinit() {
   for (int index_0 = 0; index_0 < Bars; index_0++) G_ibuf_76[index_0] = 0;
   for (index_0 = 0; index_0 < Bars; index_0++) G_ibuf_80[index_0] = 0;
   return (0);
}

// EA2B2676C28C0DB26D39331A336C6B92
int start() {
   int Li_0 = Bars - 100;
   int Li_unused_4 = 0;
   double point_8 = Point;
   double irsi_16 = 0;
   double irsi_24 = 0;
   double irsi_32 = 0;
   double irsi_40 = 0;
   while (Li_0 >= 1) {
      if (RSIType == PRICE_OPEN) {
         irsi_24 = iRSI(Symbol(), 0, RSIFast, RSIType, Li_0 + 0);
         irsi_16 = iRSI(Symbol(), 0, RSIFast, RSIType, Li_0 + 1);
         irsi_40 = iRSI(Symbol(), 0, RSISlow, RSIType, Li_0 + 0);
         irsi_32 = iRSI(Symbol(), 0, RSISlow, RSIType, Li_0 + 1);
      } else {
         irsi_24 = iRSI(Symbol(), 0, RSIFast, RSIType, Li_0 + 1);
         irsi_16 = iRSI(Symbol(), 0, RSIFast, RSIType, Li_0 + 2);
         irsi_40 = iRSI(Symbol(), 0, RSISlow, RSIType, Li_0 + 1);
         irsi_32 = iRSI(Symbol(), 0, RSISlow, RSIType, Li_0 + 2);
      }
      if (irsi_16 < irsi_32 && irsi_24 > irsi_40) G_ibuf_76[Li_0] = Low[Li_0] - 2.0 * point_8;
      if (irsi_16 > irsi_32 && irsi_24 < irsi_40) G_ibuf_80[Li_0] = High[Li_0] + 2.0 * point_8;
      Li_0--;
   }
   return (0);
}
