NEW ABHAFXS TIMING V2L.mq4

NEW ABHAFXS TIMING V2L.mq4 FOREX MetaTrader4 Indicators Download

NEW ABHAFXS TIMING V2L.mq4 download link will appear after 10 seconds.




NEW ABHAFXS TIMING V2L.mq4 Programming source code

#property indicator_separate_window
#property indicator_buffers 8
#property indicator_color1 CLR_NONE
#property indicator_color2 Orange
#property indicator_color3 Orange
#property indicator_color4 CLR_NONE
#property indicator_color5 CLR_NONE
#property indicator_color6 CLR_NONE
#property indicator_color7 CLR_NONE
#property indicator_color8 Green

#property indicator_width2 3
#property indicator_width3 3
#property indicator_width8 3


int gi_76 = 67;
int gi_80 = 1;
int gi_unused_84 = 0;
double gd_88 = 1.61323;
int gi_96 = 1102;
double g_ibuf_100[];
double g_ibuf_104[];
double g_ibuf_108[];
double g_ibuf_112[];
double g_ibuf_116[];
double g_ibuf_120[];
double g_ibuf_124[];
double g_ibuf_128[];
double gda_132[10][10];
double gda_136[10];
double gda_140[10];
double gda_144[20];
double gd_148;
int g_shift_156;
int g_period_160;
int gi_164;
double gd_168;
double gd_176;
double gd_184;
int gi_192;
int gi_196;
int gi_200;
int gi_204;
int gi_208;
double gd_212;
double gd_220;

int init() {
   IndicatorShortName("((( NEW ABHAFXS TIMING V2 ))) ");
   SetIndexStyle(0, DRAW_HISTOGRAM);
   SetIndexBuffer(0, g_ibuf_100);
   SetIndexBuffer(1, g_ibuf_104);
   SetIndexBuffer(2, g_ibuf_108);
   SetIndexBuffer(3, g_ibuf_112);
   SetIndexBuffer(4, g_ibuf_116);
   SetIndexBuffer(5, g_ibuf_120);
   SetIndexBuffer(6, g_ibuf_124);
   SetIndexBuffer(7, g_ibuf_128);
   SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_DASH, 5);

   SetIndexStyle(1, DRAW_LINE);
   SetIndexStyle(2, DRAW_LINE);
   SetIndexStyle(3, DRAW_LINE);
   SetIndexStyle(4, DRAW_LINE);
   SetIndexStyle(5, DRAW_LINE);
   SetIndexStyle(6, DRAW_LINE);
   SetIndexStyle(7, DRAW_LINE);
   SetIndexStyle(8, DRAW_LINE);

   g_period_160 = MathRound(gi_76);
   gi_208 = gi_80 + 1;
   ObjectCreate("pr" + gi_96, OBJ_ARROW, 0, Time[g_period_160], g_ibuf_100[g_period_160]);
   ObjectSet("pr" + gi_96, OBJPROP_ARROWCODE, 60);
   return (0);
}

int deinit() {
   ObjectDelete("pr" + gi_96);
   return (0);
}

int start() {
   int li_0;
   int l_ind_counted_4 = IndicatorCounted();
   g_shift_156 = iBarShift(Symbol(), Period(), ObjectGet("pr" + gi_96, OBJPROP_TIME1));
   g_period_160 = gi_76;
   gda_144[1] = g_period_160 + 1;
   SetIndexDrawBegin(0, Bars - g_period_160 - 1);
   SetIndexDrawBegin(1, Bars - g_period_160 - 1);
   SetIndexDrawBegin(2, Bars - g_period_160 - 1);
   SetIndexDrawBegin(3, Bars - g_period_160 - 1);
   SetIndexDrawBegin(4, Bars - g_period_160 - 1);
   SetIndexDrawBegin(5, Bars - g_period_160 - 1);
   SetIndexDrawBegin(6, Bars - g_period_160 - 1);
   SetIndexDrawBegin(7, Bars - g_period_160 - 1);
   for (int li_8 = 1; li_8 <= gi_208 * 2 - 2; li_8++) {
      gd_148 = 0;
      for (gi_164 = li_0; gi_164 <= li_0 + g_period_160; gi_164++) gd_148 += MathPow(gi_164, li_8);
      gda_144[li_8 + 1] = gd_148;
   }
   for (li_8 = 1; li_8 <= gi_208; li_8++) {
      gd_148 = 0.0;
      for (gi_164 = li_0; gi_164 <= li_0 + g_period_160; gi_164++) {
         if (li_8 == 1) gd_148 += Close[gi_164];
         else gd_148 += Close[gi_164] * MathPow(gi_164, li_8 - 1);
      }
      gda_136[li_8] = gd_148;
   }
   for (gi_196 = 1; gi_196 <= gi_208; gi_196++) {
      for (gi_192 = 1; gi_192 <= gi_208; gi_192++) {
         gi_200 = gi_192 + gi_196 - 1;
         gda_132[gi_192][gi_196] = gda_144[gi_200];
      }
   }
   for (gi_200 = 1; gi_200 <= gi_208 - 1; gi_200++) {
      gi_204 = 0;
      gd_176 = 0;
      for (gi_192 = gi_200; gi_192 <= gi_208; gi_192++) {
         if (MathAbs(gda_132[gi_192][gi_200]) > gd_176) {
            gd_176 = MathAbs(gda_132[gi_192][gi_200]);
            gi_204 = gi_192;
         }
      }
      if (gi_204 == 0) return (0);
      if (gi_204 != gi_200) {
         for (gi_196 = 1; gi_196 <= gi_208; gi_196++) {
            gd_184 = gda_132[gi_200][gi_196];
            gda_132[gi_200][gi_196] = gda_132[gi_204][gi_196];
            gda_132[gi_204][gi_196] = gd_184;
         }
         gd_184 = gda_136[gi_200];
         gda_136[gi_200] = gda_136[gi_204];
         gda_136[gi_204] = gd_184;
      }
      for (gi_192 = gi_200 + 1; gi_192 <= gi_208; gi_192++) {
         gd_168 = gda_132[gi_192][gi_200] / gda_132[gi_200][gi_200];
         for (gi_196 = 1; gi_196 <= gi_208; gi_196++) {
            if (gi_196 == gi_200) gda_132[gi_192][gi_196] = 0;
            else gda_132[gi_192][gi_196] = gda_132[gi_192][gi_196] - gd_168 * gda_132[gi_200][gi_196];
         }
         gda_136[gi_192] = gda_136[gi_192] - gd_168 * gda_136[gi_200];
      }
   }
   gda_140[gi_208] = gda_136[gi_208] / gda_132[gi_208][gi_208];
   for (gi_192 = gi_208 - 1; gi_192 >= 1; gi_192--) {
      gd_184 = 0;
      for (gi_196 = 1; gi_196 <= gi_208 - gi_192; gi_196++) {
         gd_184 += (gda_132[gi_192][gi_192 + gi_196]) * (gda_140[gi_192 + gi_196]);
         gda_140[gi_192] = 1 / gda_132[gi_192][gi_192] * (gda_136[gi_192] - gd_184);
      }
   }
   for (gi_164 = li_0; gi_164 <= li_0 + g_period_160; gi_164++) {
      gd_148 = 0;
      for (gi_200 = 1; gi_200 <= gi_80; gi_200++) gd_148 += (gda_140[gi_200 + 1]) * MathPow(gi_164, gi_200);
      g_ibuf_100[gi_164] = gda_140[1] + gd_148;
   }
   gd_212 = 0.0;
   for (gi_164 = li_0; gi_164 <= li_0 + g_period_160; gi_164++) gd_212 += MathPow(Close[gi_164] - g_ibuf_100[gi_164], 2);
   gd_212 = MathSqrt(gd_212 / (g_period_160 + 1)) * gd_88;
   gd_220 = iStdDev(NULL, 0, g_period_160, 0, MODE_SMA, PRICE_CLOSE, li_0) * gd_88;
   for (gi_164 = li_0; gi_164 <= li_0 + g_period_160; gi_164++) {
      g_ibuf_104[gi_164] = g_ibuf_100[gi_164] + gd_212;
      g_ibuf_108[gi_164] = g_ibuf_100[gi_164] - gd_212;
      g_ibuf_112[gi_164] = g_ibuf_100[gi_164] + gd_220;
      g_ibuf_116[gi_164] = g_ibuf_100[gi_164] - gd_220;
      g_ibuf_120[gi_164] = g_ibuf_104[gi_164] + (g_ibuf_112[gi_164] - g_ibuf_104[gi_164]) / 2.0;
      g_ibuf_124[gi_164] = g_ibuf_116[gi_164] + (g_ibuf_108[gi_164] - g_ibuf_116[gi_164]) / 2.0;
   }
   ObjectMove("pr" + gi_96, 0, Time[g_period_160], g_ibuf_100[g_period_160]);
   int li_12 = Bars - l_ind_counted_4;
   if (l_ind_counted_4 > 0) li_12++;
   for (li_0 = 0; li_0 < li_12; li_0++) g_ibuf_128[li_0] = (High[li_0] + Low[li_0]) / 2.0;
   return (0);
}