Navigation:Home > Content >

Fx.mq4

Time: 2016-05-20 | Download file:Fx.mq4

/*
   Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
   Website: http://purebeam.biz
   E-mail : [email protected]
*/
#property copyright "Copyright © 2008, Eracash.com."
#property link      "http://www.eracash.com"

#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Gold
#property indicator_color2 Blue
#property indicator_color3 Red

extern int CCI_Period = 2;
extern int T3_Period = 1;
extern double b = 0.618;
double gd_92;
double gd_100;
double gd_108;
double gd_116;
double gd_124;
double gd_132;
double gd_140;
double gd_148;
double gd_156;
double gd_164;
double gd_172;
double gd_180;
double gd_188;
double gd_196;
double gd_204;
double g_ibuf_212[];
double g_ibuf_216[];
double g_ibuf_220[];

int init() {
   SetIndexBuffer(0, g_ibuf_212);
   SetIndexBuffer(1, g_ibuf_216);
   SetIndexBuffer(2, g_ibuf_220);
   SetIndexStyle(0, DRAW_LINE);
   SetIndexStyle(1, DRAW_HISTOGRAM);
   SetIndexStyle(2, DRAW_HISTOGRAM);
   IndicatorShortName("Essam");
   SetIndexLabel(0, "FXST3CCI");
   SetIndexLabel(1, NULL);
   SetIndexLabel(2, NULL);
   gd_196 = b * b;
   gd_204 = gd_196 * b;
   gd_140 = -gd_204;
   gd_148 = 3.0 * (gd_196 + gd_204);
   gd_156 = -3.0 * (2.0 * gd_196 + b + gd_204);
   gd_164 = 3.0 * b + 1.0 + gd_204 + 3.0 * gd_196;
   gd_172 = T3_Period;
   if (gd_172 < 1.0) gd_172 = 1;
   gd_172 = (gd_172 - 1.0) / 2.0 + 1.0;
   gd_180 = 2 / (gd_172 + 1.0);
   gd_188 = 1 - gd_180;
   return (0);
}

int start() {
   /*bool l_bool_0 = IsDemo();
   if (!l_bool_0) {
      Alert("You can not use the program with a real account!");
      return (0);
   }*/
   int li_8 = IndicatorCounted();
   if (li_8 < 0) return (-1);
   if (li_8 > 0) li_8--;
   int li_4 = Bars - li_8;
   for (int li_12 = Bars - 1; li_12 >= 0; li_12--) {
      g_ibuf_212[li_12] = iCCI(NULL, 0, CCI_Period, PRICE_TYPICAL, li_12);
      gd_92 = gd_180 * g_ibuf_212[li_12] + gd_188 * gd_92;
      gd_100 = gd_180 * gd_92 + gd_188 * gd_100;
      gd_108 = gd_180 * gd_100 + gd_188 * gd_108;
      gd_116 = gd_180 * gd_108 + gd_188 * gd_116;
      gd_124 = gd_180 * gd_116 + gd_188 * gd_124;
      gd_132 = gd_180 * gd_124 + gd_188 * gd_132;
      g_ibuf_212[li_12] = gd_140 * gd_132 + gd_148 * gd_124 + gd_156 * gd_116 + gd_164 * gd_108;
      if (g_ibuf_212[li_12] >= 0.0) g_ibuf_216[li_12] = g_ibuf_212[li_12];
      else g_ibuf_216[li_12] = 0;
      if (g_ibuf_212[li_12] < 0.0) g_ibuf_220[li_12] = g_ibuf_212[li_12];
      else g_ibuf_220[li_12] = 0;
   }
   return (0);
}

Recommend