TRUE Forex

Просмотр кода форекс индикатора !1~.mq4

/*
   G e n e r a t e d  by ex4-to-mq4 decompiler FREEWARE 4.0.509.5
   Website:  h t tP : //W W W. mE t a Q U O t E s .N e T
   E-mail : S U p P oRT @MetaqU o TEs . Ne T
*/
#property copyright "Copyright © 2010,Vladimir Sautkin"
#property link      ""

#property indicator_chart_window

extern int FirstBar = 1;
extern int DeltaBar = 3;
extern bool InsLine = TRUE;
int Gi_88 = 16711680;
int Gi_92 = 255;
int Gi_96 = 16711680;
int Gi_100 = 255;
int Gi_104 = 32768;
int Gi_108 = 15631086;
string Gs_112 = "Up_";
string Gs_120 = "Dn_";
string Gs_128 = "UpZ_";
string Gs_136 = "DnZ_";
string Gs_144 = "UpTr_";
string Gs_152 = "DnTr_";
int G_bars_160 = 0;
int G_count_164 = 1;
int Gia_168[100][2];
int Gia_172[100][2];
int Gia_176[100][2];
int Gia_180[100][2];
int Gia_184[100][2];
int Gia_188[100][2];

// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
   if (!ObjectCreate("StartTL", OBJ_VLINE, 0, Time[FirstBar], 0, 0, 0, 0, 0)) return (0);
   ObjectSet("StartTL", OBJPROP_COLOR, Orange);
   ObjectCreate("MyLabel_D", OBJ_LABEL, 0, 0, 0, 0, 0, 0, 0);
   ObjectSetText("MyLabel_D", "Линий падения =  ", 9, "Times New Roman", Red);
   ObjectSet("MyLabel_D", OBJPROP_CORNER, 1);
   ObjectSet("MyLabel_D", OBJPROP_XDISTANCE, 50);
   ObjectSet("MyLabel_D", OBJPROP_YDISTANCE, 20);
   ObjectCreate("MyLabel_U", OBJ_LABEL, 0, 0, 0, 0, 0, 0, 0);
   ObjectSetText("MyLabel_U", "Линий роста =  ", 9, "Times New Roman", Blue);
   ObjectSet("MyLabel_U", OBJPROP_CORNER, 1);
   ObjectSet("MyLabel_U", OBJPROP_XDISTANCE, 50);
   ObjectSet("MyLabel_U", OBJPROP_YDISTANCE, 40);
   return (0);
}

// 52D46093050F38C27267BCE42543EF60
int deinit() {
   ObjectDelete("StartTL");
   f0_1(Gs_112, 100);
   f0_1(Gs_120, 100);
   f0_1(Gs_128, 100);
   f0_1(Gs_136, 100);
   f0_1(Gs_144, 100);
   f0_1(Gs_152, 100);
   ObjectDelete("MyLabel_D");
   ObjectDelete("MyLabel_U");
   return (0);
}

// EA2B2676C28C0DB26D39331A336C6B92
int start() {
   int ind_counted_0 = IndicatorCounted();
   if (G_bars_160 == Bars) {
      if (FirstBar == iBarShift(Symbol(), Period(), ObjectGet("StartTL", OBJPROP_TIME1), FALSE)) return (0);
      f0_2();
      return (0);
   }
   G_bars_160 = Bars;
   ObjectMove("StartTL", 0, Time[FirstBar], 0);
   f0_2();
   return (0);
}

// 581846BA96C411A3D87BAA684C5640A7
void f0_2() {
   int Li_12;
   double Ld_24;
   double Ld_32;
   int Li_40;
   int Li_44;
   FirstBar = iBarShift(Symbol(), Period(), ObjectGet("StartTL", OBJPROP_TIME1), FALSE);
   f0_1(Gs_112, 100);
   f0_1(Gs_120, 100);
   f0_1(Gs_128, 100);
   f0_1(Gs_136, 100);
   f0_1(Gs_144, 100);
   f0_1(Gs_152, 100);
   Gia_168[0][0] = FirstBar;
   Gia_168[0][1] = f0_4(Gia_168[0][0], Bars, 1);
   Gia_172[0][0] = FirstBar;
   Gia_172[0][1] = f0_4(Gia_172[0][0], Bars, -1);
   for (int index_0 = 0; Gia_168[index_0][1] > Gia_168[index_0][0]; Gia_168[index_0][1] = f0_4(Gia_168[index_0][0], Bars, 1)) {
      index_0++;
      Gia_168[index_0][0] = Gia_168[index_0 - 1][1];
   }
   int Li_8 = index_0 - 1;
   G_count_164 = 0;
   int index_4 = 0;
   for (index_0 = 0; index_0 <= Li_8; index_0++) {
      if (Gia_168[index_0][1] - Gia_168[index_0][0] >= DeltaBar) {
         G_count_164++;
         Gia_184[index_4][0] = Gia_168[index_0][0];
         Gia_184[index_4][1] = Gia_168[index_0][1];
         index_4++;
         f0_0(Gs_112 + G_count_164, Time[Gia_168[index_0][1]], Low[Gia_168[index_0][1]], Time[Gia_168[index_0][0]], Low[Gia_168[index_0][0]], Gi_88, STYLE_SOLID);
         Li_12 = f0_5(Gs_112 + G_count_164, Gia_168[index_0][1], Gia_168[index_0][0], 1);
         Ld_24 = ObjectGetValueByShift(Gs_112 + G_count_164, Li_12);
         Ld_32 = Low[Gia_168[index_0][0]] + (High[Li_12] - Ld_24);
         f0_0(Gs_128 + G_count_164, Time[Gia_168[index_0][1]], Low[Gia_168[index_0][1]] + (High[Li_12] - Ld_24), Time[Gia_168[index_0][0]], Ld_32, Gi_96, STYLE_DASH);
         ObjectSet(Gs_128 + G_count_164, OBJPROP_RAY, FALSE);
      }
   }
   ObjectSetText("MyLabel_U", "Линий Роста = " + G_count_164, 10, "Times New Roman", Blue);
   if (InsLine == TRUE) {
      Li_8 = index_4;
      for (index_4 = 0; index_4 < Li_8; index_4++) {
         Li_40 = iHighest(Symbol(), Period(), MODE_HIGH, Gia_184[index_4][1] - Gia_184[index_4][0], Gia_184[index_4][0]);
         Li_44 = Gia_184[index_4][1];
         Gia_176[0][0] = Li_40;
         Gia_176[0][1] = f0_4(Li_40, Li_44, 1);
         for (index_0 = 0; Gia_176[index_0][1] > Gia_176[index_0][0]; Gia_176[index_0][1] = f0_4(Gia_176[index_0][0], Li_44, 1)) {
            if (Gia_176[index_0][1] - Gia_176[index_0][0] > DeltaBar) {
               f0_0(Gs_144 + ((10 * (index_4 + 1) + index_0 + 1)), Time[Gia_176[index_0][1]], Low[Gia_176[index_0][1]], Time[Gia_176[index_0][0]], Low[Gia_176[index_0][0]], Gi_104,
                  STYLE_SOLID);
            }
            ObjectSet(Gs_144 + ((10 * (index_4 + 1) + index_0 + 1)), OBJPROP_RAY, FALSE);
            index_0++;
            Gia_176[index_0][0] = Gia_176[index_0 - 1][1];
         }
      }
   }
   index_0 = 0;
   while (Gia_172[index_0][1] > Gia_172[index_0][0]) {
      index_0++;
      Gia_172[index_0][0] = Gia_172[index_0 - 1][1];
      Gia_172[index_0][1] = f0_4(Gia_172[index_0][0], Bars, -1);
   }
   Li_8 = index_0 - 1;
   G_count_164 = 0;
   index_4 = 0;
   for (index_0 = 0; index_0 <= Li_8; index_0++) {
      if (Gia_172[index_0][1] - Gia_172[index_0][0] >= DeltaBar) {
         G_count_164++;
         Gia_188[index_4][0] = Gia_172[index_0][0];
         Gia_188[index_4][1] = Gia_172[index_0][1];
         index_4++;
         f0_0(Gs_120 + G_count_164, Time[Gia_172[index_0][1]], High[Gia_172[index_0][1]], Time[Gia_172[index_0][0]], High[Gia_172[index_0][0]], Gi_92, STYLE_SOLID);
         Li_12 = f0_5(Gs_120 + G_count_164, Gia_172[index_0][1], Gia_172[index_0][0], -1);
         Ld_24 = ObjectGetValueByShift(Gs_120 + G_count_164, Li_12);
         Ld_32 = High[Gia_172[index_0][0]] - (Ld_24 - Low[Li_12]);
         f0_0(Gs_136 + G_count_164, Time[Gia_172[index_0][1]], High[Gia_172[index_0][1]] - (Ld_24 - Low[Li_12]), Time[Gia_172[index_0][0]], Ld_32, Gi_100, STYLE_DASH);
         ObjectSet(Gs_136 + G_count_164, OBJPROP_RAY, FALSE);
      }
   }
   ObjectSetText("MyLabel_D", "Линий Падения =  " + G_count_164, 10, "Times New Roman", Red);
   if (InsLine == TRUE) {
      Li_8 = index_4;
      for (index_4 = 0; index_4 < Li_8; index_4++) {
         Li_40 = iLowest(Symbol(), Period(), MODE_LOW, Gia_188[index_4][1] - Gia_188[index_4][0], Gia_188[index_4][0]);
         Li_44 = Gia_188[index_4][1];
         Gia_180[0][0] = Li_40;
         Gia_180[0][1] = f0_4(Li_40, Li_44, -1);
         for (index_0 = 0; Gia_180[index_0][1] > Gia_180[index_0][0]; Gia_180[index_0][1] = f0_4(Gia_180[index_0][0], Li_44, -1)) {
            if (Gia_180[index_0][1] - Gia_180[index_0][0] > DeltaBar) {
               f0_0(Gs_152 + ((10 * (index_4 + 1) + index_0 + 1)), Time[Gia_180[index_0][1]], High[Gia_180[index_0][1]], Time[Gia_180[index_0][0]], High[Gia_180[index_0][0]], Gi_108,
                  STYLE_SOLID);
            }
            ObjectSet(Gs_152 + ((10 * (index_4 + 1) + index_0 + 1)), OBJPROP_RAY, FALSE);
            index_0++;
            Gia_180[index_0][0] = Gia_180[index_0 - 1][1];
         }
      }
   }
}

// FFCAA643B493573EC6A0A6AFE59C37B8
int f0_5(string A_name_0, int Ai_8, int Ai_12, int Ai_16) {
   double Ld_28 = 0;
   double Ld_36 = 0;
   int Li_ret_24 = Ai_8;
   for (int Li_20 = Ai_8; Li_20 >= Ai_12; Li_20--) {
      if (Ai_16 == 1) Ld_36 = High[Li_20] - ObjectGetValueByShift(A_name_0, Li_20);
      else Ld_36 = ObjectGetValueByShift(A_name_0, Li_20) - Low[Li_20];
      if (Ld_36 > Ld_28) {
         Ld_28 = Ld_36;
         Li_ret_24 = Li_20;
      }
   }
   return (Li_ret_24);
}

// 07B832B085C8BE8D5A781F658B5FC5FD
int f0_0(string A_name_0, int Ai_8, double Ad_12, int Ai_20, double Ad_24, color A_color_32, int A_style_36) {
   if (!ObjectCreate(A_name_0, OBJ_TREND, 0, 0, 0, 0, 0, 0, 0)) return (0);
   ObjectSet(A_name_0, OBJPROP_COLOR, A_color_32);
   ObjectSet(A_name_0, OBJPROP_STYLE, A_style_36);
   f0_3(A_name_0, Ai_8, Ad_12, Ai_20, Ad_24);
   return (1);
}

// BCC6614C79A077146DE5A8AFF19916DF
void f0_3(string A_name_0, int A_datetime_8, double Ad_12, int A_datetime_20, double Ad_24) {
   ObjectMove(A_name_0, 0, A_datetime_8, Ad_12);
   ObjectMove(A_name_0, 1, A_datetime_20, Ad_24);
}

// C797745AC6BCCE6D1F5722F0461EA023
int f0_4(int Ai_0, int Ai_4, int Ai_8) {
   int Li_44;
   double Ld_48;
   int Li_ret_12 = Ai_0;
   for (int Li_16 = Ai_0 + 1; Li_16 < Ai_4; Li_16++) {
      if (Ai_8 == 1) {
         if (Low[Li_16] >= Low[Ai_0]) continue;
         Li_ret_12 = Li_16;
      } else {
         if (High[Li_16] <= High[Ai_0]) continue;
         Li_ret_12 = Li_16;
         break;
      }
   }
   if (Li_ret_12 > Ai_0) {
      Li_44 = Li_ret_12;
      if (Ai_8 == 1) {
         Ld_48 = (Low[Ai_0] - Low[Li_ret_12]) / (Li_ret_12 - Ai_0);
         for (Li_16 = Li_44 + 1; Li_16 < Bars; Li_16++) {
            if ((Low[Ai_0] - Low[Li_16]) / (Li_16 - Ai_0) > Ld_48) {
               Li_ret_12 = Li_16;
               Ld_48 = (Low[Ai_0] - Low[Li_ret_12]) / (Li_ret_12 - Ai_0);
            }
         }
      } else {
         Ld_48 = (High[Li_ret_12] - High[Ai_0]) / (Li_ret_12 - Ai_0);
         for (Li_16 = Li_44 + 1; Li_16 < Bars; Li_16++) {
            if ((High[Li_16] - High[Ai_0]) / (Li_16 - Ai_0) > Ld_48) {
               Li_ret_12 = Li_16;
               Ld_48 = (High[Li_ret_12] - High[Ai_0]) / (Li_ret_12 - Ai_0);
            }
         }
      }
   }
   return (Li_ret_12);
}

// 4F7502AE136C3F2DB9444BFE588D64A9
void f0_1(string As_0, int Ai_8) {
   for (int Li_12 = 1; Li_12 < Ai_8 + 10; Li_12++) ObjectDelete(As_0 + Li_12);
}

Комментарии к исходному коду форекс индикатора !1~.mq4
В целях безопасности и борьбы со спамом в тексте комментариев запрещено размещать html-теги и ссылки. Благодарим за понимание.

  • X
  • 0% загружено
« индикатор !$_Dual Matrix v5.0.mq4
индикатор !BDP FIBONACCI DAILY.mq4 »