Navigation´╝ÜHome > Content >

For_WWI.mq4

Time: 2014-11-16 | Download file:For_WWI.mq4

#property copyright "For WWI"
#property link      "http://worldwide-invest.org"
#property show_inputs

extern string EA = "==================== WWI ====================";
string gs_84 = "--------------- Configuration";
bool gi_92 = FALSE;
bool gi_96 = FALSE;
bool gi_100 = TRUE;
bool gi_104 = FALSE;
bool gi_108 = TRUE;
bool gi_112 = FALSE;
string gs_116 = "WWI";
extern int Magic = 16789;
string gs_nfx_nd_128 = "WW-I";
extern double TakeProfit = 20.0;
extern double StopLoss = 60.0;
double gd_152;
extern string Money_Management = "---------------- Money Management  ---------------";
double gd_168 = 0.1;
bool gi_176 = TRUE;
double gd_180 = 0.01;
double gd_188 = 100.0;
extern double Risk = 10.0;
extern string Maksimum_Spread = "------------ Maksimum Spread (Point) -------------";
extern double Max_Spread = 10.0;
double gd_220 = 10.0;
string gs_228 = "---------------- Scalping Factors";
double gd_236 = 15.0;
double gd_244;
double gd_252 = 145.0;
double gd_260 = 270.0;
double gd_268 = 0.4;
double gd_276 = 0.3333333333;
double gd_284 = 0.0;
string gs_292 = "---------------- SL / TP / Trailing";
double gd_300 = 0.0;
double gd_308 = 0.0;
double gd_316 = 20.0;
extern bool Trailing_Stop = TRUE;
string gs_328 = "--------------- Day Filter ----------------";
extern bool Friday_Filter = FALSE;
extern bool Monday_Filter = FALSE;
bool gi_344;
int gi_348;
bool gi_352 = TRUE;
string gs_356;
int gi_364 = 0;
double gd_368 = 0.0;
int gi_376 = 3;
double gda_380[30];
double gda_384[30];
int gia_388[30];
double gd_392 = 1.0;
double gd_400;
bool gi_408;
double gd_412;
bool gi_420 = TRUE;
double gd_424 = 2.0;
double gd_432 = 0.0;
int gi_440 = 0;
int gt_444 = 0;
int gi_448 = 0;
double gda_452[30];
int gi_456 = 0;
bool gi_460 = TRUE;
double gd_464 = 5.0;
double gd_472 = 10.0;
double gd_480 = 40.0;
bool gi_488 = TRUE;
double gd_492 = 5.0;
double gd_500 = 10.0;
double gd_508 = 40.0;
bool gi_516 = FALSE;
bool gi_520 = FALSE;
string gs_524 = "Valid user";
string gs_532;
int gia_540[] = {0};
int gia_544[] = {0};
string gs_552 = "Nol Derajat";
datetime gt_576;
double gd_580 = 30.0;
double gd_588 = 30.0;
double gd_596 = 60.0;
double gd_604 = 90.0;
double gd_612 = 120.0;
double gd_620 = 150.0;
double gd_628 = 180.0;
double gd_636 = 210.0;
double gd_644 = 250.0;
double gd_652;

int init() {
   string lsa_0[256];
   for (int li_4 = 0; li_4 < 256; li_4++) lsa_0[li_4] = CharToStr(li_4);
   int li_8 = StrToInteger(lsa_0[67] + lsa_0[111] + lsa_0[112] + lsa_0[121] + lsa_0[32] + lsa_0[82] + lsa_0[105] + lsa_0[103] + lsa_0[104] + lsa_0[116] + lsa_0[32] +
      lsa_0[169] + lsa_0[32] + lsa_0[75] + lsa_0[97] + lsa_0[122] + lsa_0[97] + lsa_0[111] + lsa_0[111] + lsa_0[32] + lsa_0[50] + lsa_0[48] + lsa_0[49] + lsa_0[49] + lsa_0[32]);
   gd_244 = Max_Spread;
   if (Period() == PERIOD_M1) gd_152 = gd_580;
   else {
      if (Period() == PERIOD_M5) gd_152 = gd_588;
      else {
         if (Period() == PERIOD_M15) gd_152 = gd_596;
         else {
            if (Period() == PERIOD_M30) gd_152 = gd_604;
            else {
               if (Period() == PERIOD_H1) gd_152 = gd_612;
               else {
                  if (Period() == PERIOD_H4) gd_152 = gd_620;
                  else {
                     if (Period() == PERIOD_D1) gd_152 = gd_628;
                     else {
                        if (Period() == PERIOD_W1) gd_152 = gd_636;
                        else
                           if (Period() == PERIOD_MN1) gd_152 = gd_644;
                     }
                  }
               }
            }
         }
      }
   }
   if (Friday_Filter) gi_348 = 5;
   if (Monday_Filter) gi_344 = TRUE;
   ArrayInitialize(gda_452, 0);
   gi_364 = 5;
   gd_368 = 0.00001;
   if (Digits < 5) gi_376 = 0;
   else gi_440 = -1;
   gia_544[0] = 1;
   start();
   return (0);
}

int start() {
   HideTestIndicators(TRUE);
   if (DayOfWeek() != gi_344 && DayOfWeek() != gi_348) {
      if (gi_364 == 0) return (init());
      f0_5();
      if (gia_544[0] != TRUE) return (0);
      f0_0(gda_380, gda_384, gia_388, gd_392);
      f0_4(Period());
      return (0);
   }
   return (0);
}

void f0_4(int ai_0) {
   int li_4;
   int li_8;
   double ld_12;
   double ld_20;
   bool li_28;
   double ld_32;
   bool li_40;
   double ld_44;
   double ld_52;
   double ld_60;
   int li_68;
   int li_72;
   double ld_76;
   double ld_84;
   double ld_92;
   double ld_100;
   int li_108;
   int li_112;
   string ls_116;
   bool li_124;
   double ld_252;
   double ld_260;
   double ld_276;
   int li_292;
   if (gt_444 < Time[0]) {
      gt_444 = Time[0];
      gi_448 = 0;
   } else gi_448++;
   double ld_128 = iHigh(Symbol(), ai_0, 0);
   double ld_136 = iLow(Symbol(), ai_0, 0);
   double ld_144 = iMA(NULL, ai_0, 3, 0, MODE_LWMA, PRICE_LOW, 0);
   double ld_152 = iMA(NULL, ai_0, 3, 0, MODE_LWMA, PRICE_HIGH, 0);
   double ld_160 = ld_144 - ld_152;
   bool li_168 = Bid >= ld_152 + ld_160 / 2.0;
   if (!gi_420) {
      for (int li_172 = OrdersTotal() - 1; li_172 >= 0; li_172--) {
         OrderSelect(li_172, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() == Symbol() && OrderCloseTime() != 0 && OrderClosePrice() != OrderOpenPrice() && OrderProfit() != 0.0 && OrderComment() != "partial close" && StringFind(OrderComment(),
            "[sl]from #") == -1 && StringFind(OrderComment(), "[tp]from #") == -1) {
            gi_420 = TRUE;
            ld_32 = MathAbs(OrderProfit() / (OrderClosePrice() - OrderOpenPrice()));
            gd_424 = ld_32 / OrderLots() / MarketInfo(Symbol(), MODE_LOTSIZE);
            gd_432 = (-OrderCommission()) / ld_32;
            Print("Commission_Rate : " + f0_3(gd_432));
            break;
         }
      }
   }
   if (!gi_420) {
      for (li_172 = OrdersHistoryTotal() - 1; li_172 >= 0; li_172--) {
         OrderSelect(li_172, SELECT_BY_POS, MODE_HISTORY);
         if (OrderSymbol() == Symbol() && OrderCloseTime() != 0 && OrderClosePrice() != OrderOpenPrice() && OrderProfit() != 0.0 && OrderComment() != "partial close" && StringFind(OrderComment(),
            "[sl]from #") == -1 && StringFind(OrderComment(), "[tp]from #") == -1) {
            gi_420 = TRUE;
            ld_32 = MathAbs(OrderProfit() / (OrderClosePrice() - OrderOpenPrice()));
            gd_424 = ld_32 / OrderLots() / MarketInfo(Symbol(), MODE_LOTSIZE);
            gd_432 = (-OrderCommission()) / ld_32;
            Print("Commission_Rate : " + f0_3(gd_432));
            break;
         }
      }
   }
   double ld_176 = MarketInfo(Symbol(), MODE_STOPLEVEL) * Point;
   double ld_184 = Ask - Bid;
   double ld_192 = 0.5;
   if (ld_192 < ld_176 - 5.0 * gd_368) {
      li_40 = gi_488;
      ld_44 = gd_480 * gd_368;
      ld_192 = gd_472 * gd_368;
      ld_52 = gd_464 * gd_368;
   } else {
      if (!gi_100) {
         li_40 = gi_516;
         ld_44 = gd_508 * gd_368;
         ld_192 = gd_500 * gd_368;
         ld_52 = gd_492 * gd_368;
      } else {
         li_40 = gi_352;
         ld_44 = gd_316 * gd_368;
         ld_192 = gd_308 * gd_368;
         ld_52 = gd_300 * gd_368;
      }
   }
   ld_44 = MathMax(ld_44, ld_176);
   if (li_40) ld_192 = MathMax(ld_192, ld_176);
   double ld_200 = gda_452[0];
   ArrayCopy(gda_452, gda_452, 0, 1, 29);
   gda_452[29] = ld_184;
   if (gi_456 < 30) gi_456++;
   double ld_208 = 0;
   li_172 = 29;
   for (int li_216 = 0; li_216 < gi_456; li_216++) {
      ld_208 += gda_452[li_172];
      li_172--;
   }
   double ld_220 = ld_208 / gi_456;
   if (!gi_420 && ld_220 < 15.0 * gd_368) gd_432 = 15.0 * gd_368 - ld_220;
   double ld_228 = f0_7(Ask + gd_432);
   double ld_236 = f0_7(Bid - gd_432);
   double ld_244 = ld_220 + gd_432;
   double ld_268 = ld_128 - ld_136;
   string ls_284 = gi_100 + "-" + gi_104 + "-0";
   if (ls_284 == "0-0-0") {
      ld_252 = 0.24;
      ld_260 = 0.0018;
      ld_276 = 0.0025;
   } else {
      if (ls_284 == "0-1-0") {
         ld_252 = 0.68;
         ld_260 = 0.0023;
         ld_276 = 0.003;
      } else {
         if (ls_284 == "1-0-0") {
            ld_252 = 0.28;
            ld_260 = 0.0018;
            ld_276 = 0.001;
         } else {
            if (ls_284 == "1-1-0") {
               ld_252 = 0.56;
               ld_260 = 0.0022;
               ld_276 = 0.0025;
            }
         }
      }
   }
   if (ld_268 > ld_276) {
      if (Bid < ld_152) li_292 = -1;
      else
         if (Bid > ld_144) li_292 = 1;
   }
   if (gd_284 == 0.0) ld_60 = gd_276 * ld_260;
   else ld_60 = gd_284 * gd_368;
   ld_60 = MathMax(ld_176, ld_60);
   if (Bid == 0.0 || MarketInfo(Symbol(), MODE_LOTSIZE) == 0.0) ld_60 = 0;
   double ld_296 = ld_60 + ld_220 + gd_432;
   if (gi_460) li_68 = TimeCurrent() + 60.0 * MathMax(10 * ai_0, 60);
   else li_68 = 0;
   if (MarketInfo(Symbol(), MODE_LOTSTEP) == 0.0) li_72 = 5;
   else li_72 = f0_1(0.1, MarketInfo(Symbol(), MODE_LOTSTEP));
   if (gi_176) {
      if (Risk < 0.01 || Risk > 100.0) {
         Comment("ERROR -- Invalid Risk Value.");
         return;
      }
      if (AccountBalance() <= 0.0) {
         Comment("ERROR -- Account Balance is " + DoubleToStr(MathRound(AccountBalance()), 0));
         return;
      }
      if (ld_60 != 0.0) {
         gd_220 = MathMax(AccountBalance(), gd_220);
         ld_76 = MathMin(AccountFreeMargin() * AccountLeverage() / 2.0, gd_220 * Risk / 100.0 * Bid / ld_296);
         gd_168 = ld_76 / MarketInfo(Symbol(), MODE_LOTSIZE);
         gd_168 = NormalizeDouble(gd_168, li_72);
         gd_168 = MathMax(gd_180, gd_168);
         gd_168 = MathMax(MarketInfo(Symbol(), MODE_MINLOT), gd_168);
         gd_168 = MathMin(gd_188, gd_168);
         gd_168 = MathMin(MarketInfo(Symbol(), MODE_MAXLOT), gd_168);
      }
   }
   int li_304 = 0;
   int li_308 = 0;
   for (li_172 = 0; li_172 < OrdersTotal(); li_172++) {
      OrderSelect(li_172, SELECT_BY_POS, MODE_TRADES);
      if (OrderMagicNumber() == Magic && OrderCloseTime() == 0) {
         if (OrderSymbol() != Symbol()) {
            li_308++;
            continue;
         }
         switch (OrderType()) {
         case OP_BUY:
            while (Trailing_Stop) {
               ld_84 = OrderStopLoss();
               ld_92 = OrderTakeProfit();
               if (!((ld_92 < f0_7(ld_228 + ld_44) && ld_228 + ld_44 - ld_92 > ld_52))) break;
               ld_84 = f0_7(Bid - ld_44);
               ld_92 = f0_7(ld_228 + ld_44);
               li_28 = OrderModify(OrderTicket(), 0, ld_84, ld_92, li_68, Blue);
               if (li_28) break;
               li_8 = f0_6();
               if (!(li_8)) break;
            }
            li_304++;
            break;
         case OP_SELL:
            while (Trailing_Stop) {
               ld_84 = OrderStopLoss();
               ld_92 = OrderTakeProfit();
               if (!((ld_92 > f0_7(ld_236 - ld_44) && ld_92 - ld_236 + ld_44 > ld_52))) break;
               ld_84 = f0_7(Ask + ld_44);
               ld_92 = f0_7(ld_236 - ld_44);
               li_28 = OrderModify(OrderTicket(), 0, ld_84, ld_92, li_68, Red);
               if (li_28) break;
               li_8 = f0_6();
               if (!(li_8)) break;
            }
            li_304++;
            break;
         case OP_BUYSTOP:
            if (!li_168) {
               ld_100 = OrderTakeProfit() - OrderOpenPrice() - gd_432;
               while (true) {
                  if (!((f0_7(Ask + ld_192) < OrderOpenPrice() && OrderOpenPrice() - Ask - ld_192 > ld_52))) break;
                  li_28 = OrderModify(OrderTicket(), f0_7(Ask + ld_192), f0_7(Bid + ld_192 - ld_100), f0_7(ld_228 + ld_192 + ld_100), 0, Blue);
                  if (li_28) break;
                  li_8 = f0_6();
                  if (!(li_8)) break;
               }
               li_304++;
            } else OrderDelete(OrderTicket());
            break;
         case OP_SELLSTOP:
            if (li_168) {
               ld_100 = OrderOpenPrice() - OrderTakeProfit() - gd_432;
               while (true) {
                  if (!((f0_7(Bid - ld_192) > OrderOpenPrice() && Bid - ld_192 - OrderOpenPrice() > ld_52))) break;
                  li_28 = OrderModify(OrderTicket(), f0_7(Bid - ld_192), f0_7(Ask - ld_192 + ld_100), f0_7(ld_236 - ld_192 - ld_100), 0, Red);
                  if (li_28) break;
                  li_8 = f0_6();
                  if (!(li_8)) break;
               }
               li_304++;
            } else OrderDelete(OrderTicket());
         }
      }
   }
   bool li_316 = FALSE;
   if (gi_440 >= 0 || gi_440 == -2) {
      li_108 = NormalizeDouble(Bid / gd_368, 0);
      li_112 = NormalizeDouble(Ask / gd_368, 0);
      if (li_108 % 10 != 0 || li_112 % 10 != 0) gi_440 = -1;
      else {
         if (gi_440 >= 0 && gi_440 < 10) gi_440++;
         else gi_440 = -2;
      }
   }
   if (ld_60 != 0.0 && li_304 == 0 && li_292 != 0 && f0_7(ld_244) <= f0_7(gd_244 * gd_368) && gi_440 == -1) {
      if (li_292 < 0) {
         if (li_40) {
            ld_12 = Ask + gd_152 * Point;
            li_4 = OrderSend(Symbol(), OP_BUYSTOP, gd_168, ld_12, gi_376, ld_12 - StopLoss * Point, ld_12 + TakeProfit * Point, gs_nfx_nd_128, Magic, li_68, Blue);
            if (li_4 < 0) {
               li_316 = TRUE;
               Print("ERROR BUYSTOP : " + f0_3(Ask + ld_192) + " SL:" + f0_3(Bid + ld_192 - ld_60) + " TP:" + f0_3(ld_228 + ld_192 + ld_60));
            } else {
               PlaySound("alert.wav");
               Print("BUYSTOP : " + f0_3(Ask + ld_192) + " SL:" + f0_3(Bid + ld_192 - ld_60) + " TP:" + f0_3(ld_228 + ld_192 + ld_60));
            }
         } else {
            if (Bid - ld_136 && gd_400 > 0.0) {
               li_4 = OrderSend(Symbol(), OP_BUY, gd_168, Ask, gi_376, 0, 0, gs_nfx_nd_128, Magic, li_68, Blue);
               if (li_4 < 0) {
                  li_316 = TRUE;
                  Print("ERROR BUY Ask:" + f0_3(Ask) + " SL:" + f0_3(Bid - ld_60) + " TP:" + f0_3(ld_228 + ld_60));
               } else {
                  while (true) {
                     li_28 = OrderModify(li_4, 0, f0_7(Bid - ld_60), f0_7(ld_228 + ld_60), li_68, Blue);
                     if (li_28) break;
                     li_8 = f0_6();
                     if (!(li_8)) break;
                  }
                  PlaySound("alert.wav");
                  Print("BUY Ask:" + f0_3(Ask) + " SL:" + f0_3(Bid - ld_60) + " TP:" + f0_3(ld_228 + ld_60));
               }
            }
         }
      } else {
         if (li_292 > 0) {
            if (li_40) {
               ld_20 = Bid - gd_152 * Point;
               li_4 = OrderSend(Symbol(), OP_SELLSTOP, gd_168, ld_20, gi_376, ld_20 + StopLoss * Point, ld_20 - TakeProfit * Point, gs_nfx_nd_128, Magic, li_68, Red);
               if (li_4 < 0) {
                  li_316 = TRUE;
                  Print("ERROR SELLSTOP : " + f0_3(Bid - ld_192) + " SL:" + f0_3(Ask - ld_192 + ld_60) + " TP:" + f0_3(ld_236 - ld_192 - ld_60));
               } else {
                  PlaySound("alert.wav");
                  Print("SELLSTOP : " + f0_3(Bid - ld_192) + " SL:" + f0_3(Ask - ld_192 + ld_60) + " TP:" + f0_3(ld_236 - ld_192 - ld_60));
               }
            } else {
               if (ld_128 - Bid && gd_400 < 0.0) {
                  li_4 = OrderSend(Symbol(), OP_SELL, gd_168, Bid, gi_376, 0, 0, gs_nfx_nd_128, Magic, li_68, Red);
                  if (li_4 < 0) {
                     li_316 = TRUE;
                     Print("ERROR SELL Bid:" + f0_3(Bid) + " SL:" + f0_3(Ask + ld_60) + " TP:" + f0_3(ld_236 - ld_60));
                  } else {
                     while (true) {
                        li_28 = OrderModify(li_4, 0, f0_7(Ask + ld_60), f0_7(ld_236 - ld_60), li_68, Red);
                        if (li_28) break;
                        li_8 = f0_6();
                        if (!(li_8)) break;
                     }
                     PlaySound("alert.wav");
                     Print("SELL Bid:" + f0_3(Bid) + " SL:" + f0_3(Ask + ld_60) + " TP:" + f0_3(ld_236 - ld_60));
                  }
               }
            }
         }
      }
   }
   if (gi_440 >= 0) Comment("Robot is initializing...");
   else {
      if (gi_440 == -2) Comment("ERROR -- Instrument " + Symbol() + " prices should have " + gi_364 + " fraction digits on broker account");
      else {
         ls_116 = TimeToStr(TimeCurrent()) + " tick:" + f0_8(gi_448);
         if (gi_92 || gi_96) {
            ls_116 = ls_116 
               + "\n" 
            + f0_3(ld_260) + " " + f0_3(ld_60) + " digits:" + gi_364 + " " + gi_440 + " stopLevel:" + f0_3(ld_176);
            ls_116 = ls_116 
               + "\n" 
            + li_292 + " " + f0_3(ld_152) + " " + f0_3(ld_144) + " " + f0_3(gd_268) + " exp:" + TimeToStr(li_68, TIME_MINUTES) + " numOrders:" + li_304 + " shouldRepeat:" + li_316;
            ls_116 = ls_116 
            + "\ntrailingLimit:" + f0_3(ld_192) + " trailingDist:" + f0_3(ld_44) + " trailingGap:" + f0_3(ld_52) + " useStopOrders:" + li_40;
         }
         if (f0_7(ld_244) > f0_7(gd_244 * gd_368)) {
            ls_116 = ls_116 
               + "\n" 
            + "EA tidak aktif :: Spread terlalu tinggi untuk strategi Scalping ( " + f0_3(ld_244) + " > " + f0_3(gd_244 * gd_368) + " )";
         }
         Comment(ls_116);
         if (li_304 != 0 || li_292 != 0 || gi_96) f0_2(ls_116);
      }
   }
   if (li_316) {
      li_124 = f0_6();
      if (li_124) f0_4(ai_0);
   }
}

int f0_6() {
   return (0);
}

void f0_0(double &ada_0[30], double &ada_4[30], int &aia_8[30], double ad_12) {
   double ld_20;
   if (aia_8[0] == 0 || MathAbs(Bid - ada_0[0]) >= ad_12 * gd_368) {
      for (int li_28 = 29; li_28 > 0; li_28--) {
         ada_0[li_28] = ada_0[li_28 - 1];
         ada_4[li_28] = ada_4[li_28 - 1];
         aia_8[li_28] = aia_8[li_28 - 1];
      }
      ada_0[0] = Bid;
      ada_4[0] = Ask;
      aia_8[0] = GetTickCount();
   }
   gd_400 = 0;
   gi_408 = FALSE;
   double ld_32 = 0;
   int li_40 = 0;
   double ld_44 = 0;
   int li_52 = 0;
   int li_56 = 0;
   for (li_28 = 1; li_28 < 30; li_28++) {
      if (aia_8[li_28] == 0) break;
      ld_20 = ada_0[0] - ada_0[li_28];
      if (ld_20 < ld_32) {
         ld_32 = ld_20;
         li_40 = aia_8[0] - aia_8[li_28];
      }
      if (ld_20 > ld_44) {
         ld_44 = ld_20;
         li_52 = aia_8[0] - aia_8[li_28];
      }
      if (ld_32 < 0.0 && ld_44 > 0.0 && ld_32 < 3.0 * ((-ad_12) * gd_368) || ld_44 > 3.0 * (ad_12 * gd_368)) {
         if ((-ld_32) / ld_44 < 0.5) {
            gd_400 = ld_44;
            gi_408 = li_52;
            break;
         }
         if ((-ld_44) / ld_32 < 0.5) {
            gd_400 = ld_32;
            gi_408 = li_40;
         }
      } else {
         if (ld_44 > 5.0 * (ad_12 * gd_368)) {
            gd_400 = ld_44;
            gi_408 = li_52;
         } else {
            if (ld_32 < 5.0 * ((-ad_12) * gd_368)) {
               gd_400 = ld_32;
               gi_408 = li_40;
               break;
            }
         }
      }
   }
   if (gi_408 == FALSE) {
      gd_412 = 0;
      return;
   }
   gd_412 = 1000.0 * gd_400 / gi_408;
}

string f0_3(double ad_0) {
   return (DoubleToStr(ad_0, gi_364));
}

double f0_7(double ad_0) {
   return (NormalizeDouble(ad_0, gi_364));
}

string f0_8(int ai_0) {
   if (ai_0 < 10) return ("00" + ai_0);
   if (ai_0 < 100) return ("0" + ai_0);
   return ("" + ai_0);
}

double f0_1(double ad_0, double ad_8) {
   return (MathLog(ad_8) / MathLog(ad_0));
}

void f0_2(string as_0) {
   int li_8;
   int li_12 = -1;
   while (li_12 < StringLen(as_0)) {
      li_8 = li_12 + 1;
      li_12 = StringFind(as_0, 
      "\n", li_8);
      if (li_12 == -1) {
         Print(StringSubstr(as_0, li_8));
         return;
      }
      Print(StringSubstr(as_0, li_8, li_12 - li_8));
   }
}

void f0_5() {
   gd_652 = MarketInfo(Symbol(), MODE_SPREAD);
   gd_652 /= 10.0;
   f0_9(gd_652);
}

void f0_9(double ad_0) {
   string ls_8 = "Spread " + DoubleToStr(ad_0, 1) + " pips";
   string ls_16 = "WWI";
   string ls_24 = "Lot " + DoubleToStr(gd_168, 2);
   string ls_32 = "Balance " + DoubleToStr(AccountBalance(), 2);
   if (ObjectFind("SpreadIndikatorObj") < 0) {
      ObjectCreate("SpreadIndikatorObj", OBJ_LABEL, 0, 0, 0);
      ObjectSet("SpreadIndikatorObj", OBJPROP_CORNER, 0);
      ObjectSet("SpreadIndikatorObj", OBJPROP_YDISTANCE, 12);
      ObjectSet("SpreadIndikatorObj", OBJPROP_XDISTANCE, 3);
      ObjectSetText("SpreadIndikatorObj", ls_8, 20, "Arial", Lime);
      ObjectCreate("EA", OBJ_LABEL, 0, 0, 0);
      ObjectSet("EA", OBJPROP_CORNER, 0);
      ObjectSet("EA", OBJPROP_YDISTANCE, 48);
      ObjectSet("EA", OBJPROP_XDISTANCE, 3);
      ObjectSetText("EA", ls_16, 15, "Arial Bold", Red);
      ObjectCreate("EAlot", OBJ_LABEL, 0, 0, 0);
      ObjectSet("EAlot", OBJPROP_CORNER, 0);
      ObjectSet("EAlot", OBJPROP_YDISTANCE, 75);
      ObjectSet("EAlot", OBJPROP_XDISTANCE, 3);
      ObjectSetText("EAlot", ls_16, 15, "Arial Bold", Red);
      ObjectCreate("AccBalance", OBJ_LABEL, 0, 0, 0);
      ObjectSet("AccBalance", OBJPROP_CORNER, 0);
      ObjectSet("AccBalance", OBJPROP_YDISTANCE, 102);
      ObjectSet("AccBalance", OBJPROP_XDISTANCE, 3);
      ObjectSetText("AccBalance", ls_32, 15, "Arial Bold", Red);
   }
   ObjectSetText("SpreadIndikatorObj", ls_8);
   ObjectSetText("EA", ls_16);
   ObjectSetText("EAlot", ls_24);
   ObjectSetText("AccBalance", ls_32);
   WindowRedraw();
}

Recommend