Navigation:Home > Content >

RobotForex2015(Profesionall_v0.2).mq4

Time: 2013-10-19 | Download file:RobotForex2015(Profesionall_v0.2).mq4

#property copyright "Copyright © 2009, Eracash.com"
#property link      "http://www.eracash.com"
#property show_inputs

int gi_76 = 1;
bool gi_80 = FALSE;
bool gi_84 = TRUE;
double gd_88 = 1.2;
double gslippage_96 = 5.0;
extern double Lots = 0.001;
extern double DecimalLot = 3.0;
extern double TakeProfit = 10.0;
extern double StopLoss = 10.0;
double gd_136 = 3.0;
double gd_144 = 3.0;
double gpips_152 = 7.0;
extern int MaxTrades = 20;
bool gi_164 = FALSE;
double gd_168 = 20.0;
bool gi_176 = TRUE;
bool gi_180 = FALSE;
double gd_184 = 0.0;
bool gi_192 = FALSE;
extern bool UseHourTrade = FALSE;
extern int StartHour = 0;
extern int EndHour = 8;
int gmagic_208 = 12324;
double gprice_212;
double gd_220;
double gd_unused_228;
double gd_unused_236;
double gprice_244;
double gbid_252;
double gask_260;
double gd_268;
double gd_276;
double gd_284;
bool gi_292;
string gs_296 = "";
int gtime_304 = 0;
int gi_308;
int gi_312 = 0;
double gd_316;
int gpos_324 = 0;
int gi_328;
double gd_332 = 0.0;
bool gi_340 = FALSE;
bool gi_344 = FALSE;
bool gi_348 = FALSE;
int gi_352;
bool gi_356 = FALSE;
int gdatetime_360 = 0;
int gdatetime_364 = 0;
double gd_368;
double gd_376;
int MultiplierPoint;
double DigitPoint;

int init() {
   gd_284 = MarketInfo(Symbol(), MODE_SPREAD) * Point;
   MultiplierPoint=1;
   if((Digits==3)||(Digits==5)) MultiplierPoint=10;
   DigitPoint=Point*MultiplierPoint;
      Display_Info();
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   double lord_lots_0;
   double lord_lots_8;
   double liclose_16;
   double liclose_24;
   
   /*
   bool lbool32 = IsDemo();
   if (!lbool32) {
      Alert("You can not use the program with a real account!");
      return (0);
   }
   */
   
   if (UseHourTrade) {
      if (!(Hour() >= StartHour && Hour() <= EndHour)) {
         CloseThisSymbolAll();
         Comment("Non-Trading Hours!");
         return (0);
      }
   }
   string ls_36 = "false";
   string ls_44 = "false";
   if (gi_192 == FALSE || (gi_192 && (EndHour > StartHour && (Hour() >= StartHour && Hour() <= EndHour)) || (StartHour > EndHour && !(Hour() >= EndHour && Hour() <= StartHour)))) ls_36 = "true";
   if (gi_192 && (EndHour > StartHour && !(Hour() >= StartHour && Hour() <= EndHour)) || (StartHour > EndHour && (Hour() >= EndHour && Hour() <= StartHour))) ls_44 = "true";
   if (gi_176) TrailingAlls(gd_136, gd_144, gprice_244);
   if (gi_180) {
      if (TimeCurrent() >= gi_308) {
         CloseThisSymbolAll();
         Print("Closed All due to TimeOut");
      }
   }
   if (gtime_304 == Time[0]) return (0);
   gtime_304 = Time[0];
   double ld_52 = CalculateProfit();
   if (gi_164) {
      if (ld_52 < 0.0 && MathAbs(ld_52) > gd_168 / 100.0 * AccountEquityHigh()) {
         CloseThisSymbolAll();
         Print("Closed All due to Stop Out");
         gi_356 = FALSE;
      }
   }
   gi_328 = CountTrades();
   if (gi_328 == 0) gi_292 = FALSE;
   for (gpos_324 = OrdersTotal() - 1; gpos_324 >= 0; gpos_324--) {
      OrderSelect(gpos_324, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gmagic_208) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208) {
         if (OrderType() == OP_BUY) {
            gi_344 = TRUE;
            gi_348 = FALSE;
            lord_lots_0 = OrderLots();
            break;
         }
      }
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208) {
         if (OrderType() == OP_SELL) {
            gi_344 = FALSE;
            gi_348 = TRUE;
            lord_lots_8 = OrderLots();
            break;
         }
      }
   }
   if (gi_328 > 0 && gi_328 <= MaxTrades) {
      RefreshRates();
      gd_268 = FindLastBuyPrice();
      gd_276 = FindLastSellPrice();
      if (gi_344 && gd_268 - Ask >= gpips_152 * DigitPoint) gi_340 = TRUE;
      if (gi_348 && Bid - gd_276 >= gpips_152 * DigitPoint) gi_340 = TRUE;
   }
   if (gi_328 < 1) {
      gi_348 = FALSE;
      gi_344 = FALSE;
      gi_340 = TRUE;
      gd_220 = AccountEquity();
   }
   if (gi_340) {
      gd_268 = FindLastBuyPrice();
      gd_276 = FindLastSellPrice();
      if (gi_348) {
         if (gi_80 || ls_44 == "true") {
            fOrderCloseMarket(0, 1);
            gd_316 = NormalizeDouble(gd_88 * lord_lots_8, DecimalLot);
         } else gd_316 = fGetLots(OP_SELL);
         if (gi_84 && ls_36 == "true") {
            gi_312 = gi_328;
            if (gd_316 > 0.0) {
               RefreshRates();
               gi_352 = OpenPendingOrder(1, gd_316, Bid, gslippage_96, Ask, 0, 0, gs_296 + "" + gi_312, gmagic_208, 0, HotPink);
               if (gi_352 < 0) {
                  Print("Error: ", GetLastError());
                  return (0);
               }
               gd_276 = FindLastSellPrice();
               gi_340 = FALSE;
               gi_356 = TRUE;
            }
         }
      } else {
         if (gi_344) {
            if (gi_80 || ls_44 == "true") {
               fOrderCloseMarket(1, 0);
               gd_316 = NormalizeDouble(gd_88 * lord_lots_0, DecimalLot);
            } else gd_316 = fGetLots(OP_BUY);
            if (gi_84 && ls_36 == "true") {
               gi_312 = gi_328;
               if (gd_316 > 0.0) {
                  gi_352 = OpenPendingOrder(0, gd_316, Ask, gslippage_96, Bid, 0, 0, gs_296 + "" + gi_312, gmagic_208, 0, Lime);
                  if (gi_352 < 0) {
                     Print("Error: ", GetLastError());
                     return (0);
                  }
                  gd_268 = FindLastBuyPrice();
                  gi_340 = FALSE;
                  gi_356 = TRUE;
               }
            }
         }
      }
   }
   if (gi_340 && gi_328 < 1) {
      liclose_16 = iClose(Symbol(), 0, 2);
      liclose_24 = iClose(Symbol(), 0, 1);
      gbid_252 = Bid;
      gask_260 = Ask;
      if (!gi_348 && !gi_344 && ls_36 == "true") {
         gi_312 = gi_328;
         if (liclose_16 > liclose_24) {
            gd_316 = fGetLots(OP_SELL);
            if (gd_316 > 0.0) {
               gi_352 = OpenPendingOrder(1, gd_316, gbid_252, gslippage_96, gbid_252, 0, 0, gs_296 + "" + gi_312, gmagic_208, 0, HotPink);
               if (gi_352 < 0) {
                  Print(gd_316, "Error: ", GetLastError());
                  return (0);
               }
               gd_268 = FindLastBuyPrice();
               gi_356 = TRUE;
            }
         } else {
            gd_316 = fGetLots(OP_BUY);
            if (gd_316 > 0.0) {
               gi_352 = OpenPendingOrder(0, gd_316, gask_260, gslippage_96, gask_260, 0, 0, gs_296 + "" + gi_312, gmagic_208, 0, Lime);
               if (gi_352 < 0) {
                  Print(gd_316, "Error: ", GetLastError());
                  return (0);
               }
               gd_276 = FindLastSellPrice();
               gi_356 = TRUE;
            }
         }
      }
      if (gi_352 > 0) gi_308 = TimeCurrent() + 60.0 * (60.0 * gd_184);
      gi_340 = FALSE;
   }
   gi_328 = CountTrades();
   gprice_244 = 0;
   double ld_60 = 0;
   for (gpos_324 = OrdersTotal() - 1; gpos_324 >= 0; gpos_324--) {
      OrderSelect(gpos_324, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gmagic_208) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208) {
         if (OrderType() == OP_BUY || OrderType() == OP_SELL) {
            gprice_244 += OrderOpenPrice() * OrderLots();
            ld_60 += OrderLots();
         }
      }
   }
   if (gi_328 > 0) gprice_244 = NormalizeDouble(gprice_244 / ld_60, Digits);
   if (gi_356) {
      for (gpos_324 = OrdersTotal() - 1; gpos_324 >= 0; gpos_324--) {
         OrderSelect(gpos_324, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != gmagic_208) continue;
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208) {
            if (OrderType() == OP_BUY) {
               gprice_212 = gprice_244 + TakeProfit * DigitPoint;
               gd_unused_228 = gprice_212;
               gd_332 = gprice_244 - StopLoss * DigitPoint;
               gi_292 = TRUE;
            }
         }
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208) {
            if (OrderType() == OP_SELL) {
               gprice_212 = gprice_244 - TakeProfit * DigitPoint;
               gd_unused_236 = gprice_212;
               gd_332 = gprice_244 + StopLoss * DigitPoint;
               gi_292 = TRUE;
            }
         }
      }
   }
   if (gi_356) {
      if (gi_292 == TRUE) {
         for (gpos_324 = OrdersTotal() - 1; gpos_324 >= 0; gpos_324--) {
            OrderSelect(gpos_324, SELECT_BY_POS, MODE_TRADES);
            if (OrderSymbol() != Symbol() || OrderMagicNumber() != gmagic_208) continue;
            if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208) OrderModify(OrderTicket(), gprice_244, OrderStopLoss(), gprice_212, 0, Yellow);
            gi_356 = FALSE;
         }
      }
   }
   return (0);
}

double ND(double ad_0) {
   return (NormalizeDouble(ad_0, Digits));
}

int fOrderCloseMarket(bool ai_0 = TRUE, bool ai_4 = TRUE) {
   int li_ret_8 = 0;
   for (int lpos_12 = OrdersTotal() - 1; lpos_12 >= 0; lpos_12--) {
      if (OrderSelect(lpos_12, SELECT_BY_POS, MODE_TRADES)) {
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208) {
            if (OrderType() == OP_BUY && ai_0) {
               RefreshRates();
               if (!IsTradeContextBusy()) {
                  if (!OrderClose(OrderTicket(), OrderLots(), ND(Bid), 5, CLR_NONE)) {
                     Print("Error close BUY " + OrderTicket());
                     li_ret_8 = -1;
                  }
               } else {
                  if (gdatetime_360 != iTime(NULL, 0, 0)) {
                     gdatetime_360 = iTime(NULL, 0, 0);
                     Print("Need close BUY " + OrderTicket() + ". Trade Context Busy");
                  }
                  return (-2);
               }
            }
            if (OrderType() == OP_SELL && ai_4) {
               RefreshRates();
               if (!IsTradeContextBusy()) {
                  if (!OrderClose(OrderTicket(), OrderLots(), ND(Ask), 5, CLR_NONE)) {
                     Print("Error close SELL " + OrderTicket());
                     li_ret_8 = -1;
                  }
               } else {
                  if (gdatetime_364 != iTime(NULL, 0, 0)) {
                     gdatetime_364 = iTime(NULL, 0, 0);
                     Print("Need close SELL " + OrderTicket() + ". Trade Context Busy");
                  }
                  return (-2);
               }
            }
         }
      }
   }
   return (li_ret_8);
}

double fGetLots(int a_cmd_0) {
   double llots_4;
   int ldatetime_12;
   switch (gi_76) {
   case 0:
      llots_4 = Lots;
      break;
   case 1:
      llots_4 = NormalizeDouble(Lots * MathPow(gd_88, gi_312), DecimalLot);
      break;
   case 2:
      ldatetime_12 = 0;
      llots_4 = Lots;
      for (int lpos_20 = OrdersHistoryTotal() - 1; lpos_20 >= 0; lpos_20--) {
         if (OrderSelect(lpos_20, SELECT_BY_POS, MODE_HISTORY)) {
            if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208) {
               if (ldatetime_12 < OrderCloseTime()) {
                  ldatetime_12 = OrderCloseTime();
                  if (OrderProfit() < 0.0) llots_4 = NormalizeDouble(OrderLots() * gd_88, DecimalLot);
                  else llots_4 = Lots;
               }
            }
         } else return (-3);
      }
   }
   if (AccountFreeMarginCheck(Symbol(), a_cmd_0, llots_4) <= 0.0) return (-1);
   if (GetLastError() == 134/* NOT_ENOUGH_MONEY */) return (-2);
   return (llots_4);
}

int CountTrades() {
   int lcount_0 = 0;
   for (int lpos_4 = OrdersTotal() - 1; lpos_4 >= 0; lpos_4--) {
      OrderSelect(lpos_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gmagic_208) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208)
         if (OrderType() == OP_SELL || OrderType() == OP_BUY) lcount_0++;
   }
   return (lcount_0);
}

void CloseThisSymbolAll() {
   for (int lpos_0 = OrdersTotal() - 1; lpos_0 >= 0; lpos_0--) {
      OrderSelect(lpos_0, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol()) {
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208) {
            if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, gslippage_96, Blue);
            if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, gslippage_96, Red);
         }
         Sleep(1000);
      }
   }
}

int OpenPendingOrder(int ai_0, double a_lots_4, double a_price_12, int a_slippage_20, double ad_24, int ai_unused_32, int ai_36, string a_comment_40, int a_magic_48, int a_datetime_52, color a_color_56) {
   int lticket_60 = 0;
   int lerror_64 = 0;
   int lcount_68 = 0;
   int li_72 = 100;
   switch (ai_0) {
   case 2:
      for (lcount_68 = 0; lcount_68 < li_72; lcount_68++) {
         lticket_60 = OrderSend(Symbol(), OP_BUYLIMIT, a_lots_4, a_price_12, a_slippage_20, StopLong(ad_24, StopLoss), TakeLong(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         lerror_64 = GetLastError();
         if (lerror_64 == 0/* NO_ERROR */) break;
         if (!((lerror_64 == 4/* SERVER_BUSY */ || lerror_64 == 137/* BROKER_BUSY */ || lerror_64 == 146/* TRADE_CONTEXT_BUSY */ || lerror_64 == 136/* OFF_QUOTES */))) break;
         Sleep(1000);
      }
      break;
   case 4:
      for (lcount_68 = 0; lcount_68 < li_72; lcount_68++) {
         lticket_60 = OrderSend(Symbol(), OP_BUYSTOP, a_lots_4, a_price_12, a_slippage_20, StopLong(ad_24, StopLoss), TakeLong(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         lerror_64 = GetLastError();
         if (lerror_64 == 0/* NO_ERROR */) break;
         if (!((lerror_64 == 4/* SERVER_BUSY */ || lerror_64 == 137/* BROKER_BUSY */ || lerror_64 == 146/* TRADE_CONTEXT_BUSY */ || lerror_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 0:
      for (lcount_68 = 0; lcount_68 < li_72; lcount_68++) {
         RefreshRates();
         lticket_60 = OrderSend(Symbol(), OP_BUY, a_lots_4, Ask, a_slippage_20, StopLong(Bid, StopLoss), TakeLong(Ask, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         lerror_64 = GetLastError();
         if (lerror_64 == 0/* NO_ERROR */) break;
         if (!((lerror_64 == 4/* SERVER_BUSY */ || lerror_64 == 137/* BROKER_BUSY */ || lerror_64 == 146/* TRADE_CONTEXT_BUSY */ || lerror_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 3:
      for (lcount_68 = 0; lcount_68 < li_72; lcount_68++) {
         lticket_60 = OrderSend(Symbol(), OP_SELLLIMIT, a_lots_4, a_price_12, a_slippage_20, StopShort(ad_24, StopLoss), TakeShort(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         lerror_64 = GetLastError();
         if (lerror_64 == 0/* NO_ERROR */) break;
         if (!((lerror_64 == 4/* SERVER_BUSY */ || lerror_64 == 137/* BROKER_BUSY */ || lerror_64 == 146/* TRADE_CONTEXT_BUSY */ || lerror_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 5:
      for (lcount_68 = 0; lcount_68 < li_72; lcount_68++) {
         lticket_60 = OrderSend(Symbol(), OP_SELLSTOP, a_lots_4, a_price_12, a_slippage_20, StopShort(ad_24, StopLoss), TakeShort(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         lerror_64 = GetLastError();
         if (lerror_64 == 0/* NO_ERROR */) break;
         if (!((lerror_64 == 4/* SERVER_BUSY */ || lerror_64 == 137/* BROKER_BUSY */ || lerror_64 == 146/* TRADE_CONTEXT_BUSY */ || lerror_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 1:
      for (lcount_68 = 0; lcount_68 < li_72; lcount_68++) {
         lticket_60 = OrderSend(Symbol(), OP_SELL, a_lots_4, Bid, a_slippage_20, StopShort(Ask, StopLoss), TakeShort(Bid, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         lerror_64 = GetLastError();
         if (lerror_64 == 0/* NO_ERROR */) break;
         if (!((lerror_64 == 4/* SERVER_BUSY */ || lerror_64 == 137/* BROKER_BUSY */ || lerror_64 == 146/* TRADE_CONTEXT_BUSY */ || lerror_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
   }
   return (lticket_60);
}

double StopLong(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 - ai_8 * DigitPoint);
}

double StopShort(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 + ai_8 * DigitPoint);
}

double TakeLong(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 + ai_8 * DigitPoint);
}

double TakeShort(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 - ai_8 * DigitPoint);
}

double CalculateProfit() {
   double ld_ret_0 = 0;
   for (gpos_324 = OrdersTotal() - 1; gpos_324 >= 0; gpos_324--) {
      OrderSelect(gpos_324, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gmagic_208) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208)
         if (OrderType() == OP_BUY || OrderType() == OP_SELL) ld_ret_0 += OrderProfit();
   }
   return (ld_ret_0);
}

void TrailingAlls(int ai_0, int ai_4, double a_price_8) {
   int li_16;
   double lord_stoploss_20;
   double lprice_28;
   if (ai_4 != 0) {
      for (int lpos_36 = OrdersTotal() - 1; lpos_36 >= 0; lpos_36--) {
         if (OrderSelect(lpos_36, SELECT_BY_POS, MODE_TRADES)) {
            if (OrderSymbol() != Symbol() || OrderMagicNumber() != gmagic_208) continue;
            if (OrderSymbol() == Symbol() || OrderMagicNumber() == gmagic_208) {
               if (OrderType() == OP_BUY) {
                  li_16 = NormalizeDouble((Bid - a_price_8) / DigitPoint, 0);
                  if (li_16 < ai_0) continue;
                  lord_stoploss_20 = OrderStopLoss();
                  lprice_28 = Bid - ai_4 * DigitPoint;
                  if (lord_stoploss_20 == 0.0 || (lord_stoploss_20 != 0.0 && lprice_28 > lord_stoploss_20)) OrderModify(OrderTicket(), a_price_8, lprice_28, OrderTakeProfit(), 0, Aqua);
               }
               if (OrderType() == OP_SELL) {
                  li_16 = NormalizeDouble((a_price_8 - Ask) / DigitPoint, 0);
                  if (li_16 < ai_0) continue;
                  lord_stoploss_20 = OrderStopLoss();
                  lprice_28 = Ask + ai_4 * DigitPoint;
                  if (lord_stoploss_20 == 0.0 || (lord_stoploss_20 != 0.0 && lprice_28 < lord_stoploss_20)) OrderModify(OrderTicket(), a_price_8, lprice_28, OrderTakeProfit(), 0, Red);
               }
            }
            Sleep(1000);
         }
      }
   }
}

double AccountEquityHigh() {
   if (CountTrades() == 0) gd_368 = AccountEquity();
   if (gd_368 < gd_376) gd_368 = gd_376;
   else gd_368 = AccountEquity();
   gd_376 = AccountEquity();
   return (gd_368);
}

double FindLastBuyPrice() {
   double lord_open_price_0;
   int lticket_8;
   double ld_unused_12 = 0;
   int lticket_20 = 0;
   for (int lpos_24 = OrdersTotal() - 1; lpos_24 >= 0; lpos_24--) {
      OrderSelect(lpos_24, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gmagic_208) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208 && OrderType() == OP_BUY) {
         lticket_8 = OrderTicket();
         if (lticket_8 > lticket_20) {
            lord_open_price_0 = OrderOpenPrice();
            ld_unused_12 = lord_open_price_0;
            lticket_20 = lticket_8;
         }
      }
   }
   return (lord_open_price_0);
}

double FindLastSellPrice() {
   double lord_open_price_0;
   int lticket_8;
   double ld_unused_12 = 0;
   int lticket_20 = 0;
   for (int lpos_24 = OrdersTotal() - 1; lpos_24 >= 0; lpos_24--) {
      OrderSelect(lpos_24, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gmagic_208) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == gmagic_208 && OrderType() == OP_SELL) {
         lticket_8 = OrderTicket();
         if (lticket_8 > lticket_20) {
            lord_open_price_0 = OrderOpenPrice();
            ld_unused_12 = lord_open_price_0;
            lticket_20 = lticket_8;
         }
      }
   }
   return (lord_open_price_0);
}

void Display_Info() {
   Comment("Robot Forex 2015 Profesional version II\n", "Forex Account Server:", AccountServer(), 
      "\n", "Lots:  ", Lots, 
      "\n", "Symbol: ", Symbol(), 
      "\n", "Price:  ", NormalizeDouble(Bid, 4), 
      "\n", "Date: ", Month(), "-", Day(), "-", Year(), " Server Time: ", Hour(), ":", Minute(), ":", Seconds(), 
   "\n");
}

Recommend