/*
   Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
   Website: http://purebeam.biz
   E-mail : purebeam@gmail.com
*/
#property copyright "Copyright © 2007, Forex Trend System"
#property link      "www.forextrendsystem.com"

#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 White
#property indicator_color2 Blue
#property indicator_color3 Red

extern int TPeriod = 136;
extern int TType = 3;
extern int TPriceConstant = 2;
extern int TShift = 0;
double g_ibuf_92[];
double g_ibuf_96[];
double g_ibuf_100[];

int init() {
   SetIndexStyle(0, DRAW_HISTOGRAM);
   SetIndexBuffer(0, g_ibuf_92);
   SetIndexStyle(1, DRAW_HISTOGRAM);
   SetIndexBuffer(1, g_ibuf_96);
   SetIndexStyle(2, DRAW_HISTOGRAM);
   SetIndexBuffer(2, g_ibuf_100);
   SetIndexEmptyValue(0, 0);
   SetIndexEmptyValue(1, 0);
   SetIndexEmptyValue(2, 0);
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   double l_ima_24;
   double l_ima_32;
   int li_12 = IndicatorCounted();
   if (li_12 < 0) return (-1);
   if (li_12 > 0) li_12--;
   int li_16 = Bars - li_12;
   for (int li_20 = 0; li_20 < li_16; li_20++) {
      l_ima_24 = iMA(NULL, 0, TPeriod, TShift, TType, TPriceConstant, li_20);
      l_ima_32 = iMA(NULL, 0, TPeriod, TShift, TType, TPriceConstant, li_20 + 1);
      g_ibuf_92[li_20] = l_ima_24;
      g_ibuf_96[li_20] = l_ima_24;
      g_ibuf_100[li_20] = l_ima_24;
      if (l_ima_24 > l_ima_32) g_ibuf_100[li_20] = 0;
      if (l_ima_24 < l_ima_32) g_ibuf_96[li_20] = 0;
   }
   return (0);
}