/*
   Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
   Website: http://purebeam.biz
   E-mail : purebeam@gmail.com
*/
#property link      "http://www.eaprogramming.co.cc"

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Yellow
#property indicator_color2 Black

double g_ibuf_76[];
double g_ibuf_80[];
bool gi_84;
int gi_88;
double gda_92[];
double gd_96;
double gd_104 = 1000.0;
extern int DrawTicks = 1000;

int init() {
   SetIndexStyle(0, DRAW_SECTION);
   SetIndexBuffer(0, g_ibuf_76);
   SetIndexStyle(1, DRAW_NONE);
   SetIndexBuffer(1, g_ibuf_80);
   IndicatorShortName("speedOmeter© tick chart");
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   gi_88++;
   int li_4 = DrawTicks;
   ArrayResize(gda_92, li_4);
   if (gi_84 == FALSE) {
      for (int l_index_0 = 0; l_index_0 < li_4; l_index_0++) gda_92[l_index_0] = Bid;
      g_ibuf_80[0] = Bid + 5.0 * Point;
      g_ibuf_80[1] = Bid - 5.0 * Point;
      gi_84 = TRUE;
   }
   gd_96 = 0;
   gd_104 = 1000;
   for (l_index_0 = li_4 - 1; l_index_0 > 0; l_index_0--) {
      gda_92[l_index_0] = gda_92[l_index_0 - 1];
      if (gd_96 < gda_92[l_index_0]) gd_96 = gda_92[l_index_0];
      if (gd_104 > gda_92[l_index_0]) gd_104 = gda_92[l_index_0];
   }
   gda_92[0] = Bid;
   for (l_index_0 = 0; l_index_0 < li_4; l_index_0++) g_ibuf_76[l_index_0] = gda_92[l_index_0];
   if (10.0 * MathCeil(gi_88 / 10) == gi_88) {
      for (l_index_0 = li_4; l_index_0 < Bars; l_index_0++) g_ibuf_76[l_index_0] = Bid;
      ArrayInitialize(g_ibuf_80, Bid);
      if (gd_96 - Bid < 5.0 * Point) g_ibuf_80[0] = Bid + 5.0 * Point;
      if (Bid - gd_104 < 5.0 * Point) g_ibuf_80[1] = Bid - 5.0 * Point;
   }
   return (0);
}
