Now we have Market Experts:118 Market Indicators:77 Source code:15125 ,E-mail:[email protected]

WinFX_EA_V4.2_compiler_FIX.mq4

Experts Views
Download link:WinFX_EA_V4.2_compiler_FIX.mq4 Size:241KB
Contact us:[email protected]
#property copyright "rescom"
#property link      "[email protected]"

double gd_92 = 10.0;
//extern int Kode_Aktifasi = 0;
string gs_unused_104 = "====set indicator ====";

extern string t0="Имя файла индикатора";
extern string winfx_indi_name = "WinFX_Indicator_V3c_Fix";

extern string t1="Настройки индикатора";
extern int shift = 1;
extern int RVI_Priod = 21;
extern int RSI_Priod = 14;
extern int RSI_Cross = 50;
bool gps_bool_136 = TRUE;
bool gps_bool_140 = FALSE;

extern string  t2="Настройки параметров входа на рынок";
extern bool use_vertical_arrow = TRUE;
extern bool use_filter_arrow = TRUE;
extern bool use_dot_filter = FALSE; // Сверх точная чувствительность. Очень редкие ставки с более точным угадыванием направления.
extern bool use_filter_ma = FALSE;
extern int Priod_MA_Filter = 100;

extern string t3="Использование отложенных ордеров";
extern bool use_po = TRUE;
extern bool singgle_op = TRUE;

extern string t4="Настройки cci";
extern int singgle_shift = 1;
extern int ccipriod = 8;
int gi_180 = 0;
bool gi_184 = FALSE;
bool gi_unused_188 = FALSE;
double gps_price_192 = 0.0;
double gd_200 = 0.0;
double gd_208 = 0.0;
int gps_datetime_216;
int gi_220 = 0;

extern string t5="Принудительное закрытие ставок по сигналам индикатора";
extern bool close_by_signal = FALSE;

extern string t6="Включение ограничения числа ордеров в сутки";
extern bool use_daily_target = FALSE;

extern string t7="Число ордеров в сутки";
extern double daily_targets = 3.0;
double gd_248;

extern string t8="Торги по пятницам";
extern bool trade_friday = TRUE;
extern string t9="Время торгов внутри суток";
extern bool UseHourTrade = FALSE;
extern int OpenHour = 0;
extern int CloseHour = 20;

extern string t10="Отслеживание GAP скачков";
extern bool GAP_Control = TRUE;
extern int PIP_GAP = 10;
extern int no_trade_day = 1;
int gi_unused_284 = 0;

extern string t11="Использование в качестве первой ставки процента от депозита";
extern bool use_risk = TRUE;
extern double Percent_Risk = 3.5;

extern string t12="Ограничение от общего баланса для работы";
extern double Percent_Use_Balance = 100.0;
double gd_308 = 0.0;

extern string t13="Максимальный процент допустимых потерь";
extern double Percent_Maks_Lost = 100.0;

extern string t15="Максимально допустимый процент просадки";
extern string t16="При срабатывания советник останавливается, убыток фиксируется";
extern string t17="Далее разруливать руками, или советником Integra";
extern string t18="Значение 0 отключает эту функцию";
extern double Percent_Drowdown_Fix_Stop = 0;

extern string t19="Опасная просадка в пипсах";
extern double DANGER_PIP = 40.0;
extern string t20="Закрывать ставку при опасной просадке";
extern bool DANGER_PIP_close_position = FALSE;

extern string t21="Множители профита";
extern double sniper_01 = 1.0;
extern double tp_01 = 1.0;
double gd_352;
extern string t22="Использовать только снифер (процент от баланса)";
extern bool sniper_only = TRUE;

extern string t23="Параметры фиксированного лота";
extern string t24="Допускается до 10 колен Мартингейла";
extern string t25="Стартовый лот";
extern double start_lots = 0.01;
extern string t26="Отступ для открвтия 1 колена";
extern double jarak_op_pip1 = 20.0;
extern string t27="Множитель 1 колена";
extern double multiplier1 = 1.0;
// 2
extern double jarak_op_pip2 = 19.0;
extern double multiplier2 = 3.0;
// 3
extern double jarak_op_pip3 = 20.0;
extern double multiplier3 = 2.0;
// 4
extern double jarak_op_pip4 = 19.0;
extern double multiplier4 = 2.0;
// 5
extern double jarak_op_pip5 = 20.0;
extern double multiplier5 = 2.0;
// 6
extern double jarak_op_pip6 = 20.0;
extern double multiplier6 = 2.0;
// 7
extern double jarak_op_pip7 = 20.0;
extern double multiplier7 = 2.0;
// 8
extern double jarak_op_pip8 = 20.0;
extern double multiplier8 = 2.0;
// 9
extern double jarak_op_pip9 = 20.0;
extern double multiplier9 = 2.0;
// 10
extern double jarak_op_pip10 = 20.0;
extern double multiplier10 = 2.0;

extern string t28="Открывать следующее колего по сигналу индикатора";
extern bool marti_by_signal = FALSE;
extern string t29="Сглаживание индикатора";
extern bool marti_by_filter = TRUE;
extern string t299="Максимальное число колен снифера";
extern int level = 3;
int gps_day_564;
extern string t30="Отступ для открытия следующего колена снифером";
extern double jarak_op_pip_sniper_reguler = 20.0;

extern string t31="LADS. Ещё один вариант работы советника.";
extern string t32="Пока не разобрался в его работе :)";
extern bool LADS_by_Mas_Pupung = FALSE;
extern int lvl_LADS = 10;
extern int pip_op_LADS = 40;
extern double multiplier_LADS = 2.0;
extern bool Fix_LADS = FALSE;
extern bool LADS_by_signal = FALSE;
extern bool LADS_by_level = FALSE;
extern bool LADS_by_lo_hi_candle = FALSE;
extern bool LADS_by_dot_filter = FALSE;
extern bool LADS_by_lo_hi_MA = FALSE;
extern int MA_Priod = 100;
extern int MA_Method = 0;
extern int MA_Shift = 0;
int gi_632 = 5;
int gps_slippage_636 = 0;
double gd_640;

extern string t33="Настройки трала";
extern int TrailingStop_Pip = 40;
extern string t34="Тралить вообще все имеющиеся ордера (не только этого советника)";
extern bool TrailingAll = FALSE;
bool gi_unused_656 = FALSE;
int gi_unused_660 = 20;
int gi_664;

extern string t35="Включение хэджирования";
extern bool hadgingps_mode = TRUE;
extern string t36="Множитель хэджирующей ставки, относительно последнего колена";
extern double startlot_hedgingps_multiplier = 3.0;
extern string t37="Хэджирование по сигналу индикатора";
extern bool hedgingps_by_signal = TRUE;
extern string t38="Трал хэджа";
extern bool hedgingps_trailling = FALSE;
extern string t39="С какого колена работает хэдж";
extern int level_hedging = 3;
extern string t40="Мартингейл хэджирующих ордеров";
extern bool hedgingps_multiply = TRUE;
extern string t41="Множитель последующих хэджирующих ставок";
extern double h_multiply = 1.0;
extern string t42="Отступ для отркрытия следующей хэджирующей ставки";
extern int jarak_op_hedging = 80;

extern string t43="Использование стопов и профитов";
extern bool use_sl_and_tp = FALSE;
extern double sl = 100.0;
extern double tp = 10.0;

extern string t44="Маджики";
extern int magic = 212;
extern int magicsell = 213;
extern int magicbuy2 = 111;
extern int magicsell2 = 222;
int gps_magic_744 = 21233;
int gps_magic_748 = 21232;
int gps_magic_752 = 21231;
int gps_magic_756 = 21230;
int gps_magic_760 = 321;
int gps_magic_764 = 8989;
bool gi_768 = FALSE;
double gd_772 = 2.0;
bool gi_780 = FALSE;
bool gi_784 = FALSE;
bool gi_788 = FALSE;
bool gi_792 = FALSE;
double gd_unused_828;
double gd_unused_836;
double gd_unused_844;
double gd_unused_852;
bool gi_860 = FALSE;
bool gi_864 = FALSE;
bool gi_868 = FALSE;
bool gi_872 = TRUE;
bool gi_876 = TRUE;
bool gi_880 = TRUE;
int gps_day_884;
int gi_unused_888 = 0;
double gps_ask_892;
double gps_ask_900;
double gps_ask_908;
double gps_ilow_916;
double gps_ihigh_924;
int gps_datetime_964;
int gps_datetime_968;
int gps_datetime_972;
int gps_datetime_976;
double gd_unused_980 = 0.0;
double gd_unused_988 = 0.0;
double gd_unused_996 = 0.0;
double gd_unused_1004 = 0.0;
bool gi_unused_1012 = FALSE;
bool gi_unused_1016 = FALSE;
bool gi_unused_1020 = FALSE;
bool gi_unused_1024 = FALSE;
bool gi_unused_1028 = FALSE;
bool gi_unused_1032 = FALSE;
double gd_unused_1036 = 0.0;
double gd_unused_1044 = 0.0;
double gps_lots_1052 = 0.01;
double gd_unused_1060 = 0.01;
double gps_lots_1068 = 0.01;
double gps_lots_1076 = 0.01;
double gps_lots_1084 = 0.01;
bool gi_1092 = TRUE;
bool gi_1096 = TRUE;
double gd_1100 = 0.0;
extern bool stealth_mode = TRUE;
bool gi_1112 = TRUE;
int gi_1116;
int gps_day_1120;
double gd_1124;
double gd_1132;
double gps_lots_1140;
double gps_stoplevel_1148;
int gi_1156 = 0;
int gps_count_1160 = 0;
int gps_count_1164 = 0;
int gps_count_1168 = 0;
int gi_unused_1172 = 0;
int gps_ticket_1176 = 0;
int gi_1180;

// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
   if (Digits == 3 || Digits == 5) {
      gd_1124 = 10.0 * Point;
      gps_slippage_636 = 10 * gi_632;
   } else {
      gd_1124 = Point;
      gps_slippage_636 = gi_632;
   }
   gd_1132 = MarketInfo(Symbol(), MODE_MINLOT);
   gps_lots_1140 = MarketInfo(Symbol(), MODE_MAXLOT);
   gps_stoplevel_1148 = MarketInfo(Symbol(), MODE_STOPLEVEL);
   if (gps_lots_1052 < gd_1132) Print("lotsize is to small.");
   if (sl < gps_stoplevel_1148) Print("stoploss is to tight.");
   if (tp < gps_stoplevel_1148) Print("takeprofit is to tight.");
   if (gd_1132 == 0.01) gi_1156 = 2;
   if (gd_1132 == 0.1) gi_1156 = 1;
   f0_13();
   ObjectCreate("lbcom2", OBJ_LABEL, 0, 0, 1.0);
   ObjectSet("lbcom2", OBJPROP_CORNER, 0);
   ObjectSet("lbcom2", OBJPROP_XDISTANCE, 200);
   ObjectSet("lbcom2", OBJPROP_YDISTANCE, 20);
   ObjectSetText("lbcom2", "SEMUA EA DAN INDICATOR DI GROUP INI (FR4FF) ADALAH FREE..!", 8, "Times New Roman", Orange);
   ObjectCreate("lbcom3", OBJ_LABEL, 0, 0, 1.0);
   ObjectSet("lbcom3", OBJPROP_CORNER, 0);
   ObjectSet("lbcom3", OBJPROP_XDISTANCE, 200);
   ObjectSet("lbcom3", OBJPROP_YDISTANCE, 30);
   ObjectSetText("lbcom3", "TANPA SYARAT APAPUN YANG BERSIFAT FINANCIAL", 8, "Times New Roman", Orange);
   return (0);
}

// 52D46093050F38C27267BCE42543EF60
int deinit() {
   ObjectDelete("lbcom2");
   ObjectDelete("lbcom3");
   ObjectDelete("lbcom");
   return (0);
}

// EA2B2676C28C0DB26D39331A336C6B92
int start() 
{
   double ld_16;
   double ld_24;
   double ld_40;
   double ld_48;
   double ld_56;
   double ld_64;
   double ld_72;
   int cmd_84;
   int ticket_88;
   double order_open_price_92;
   double order_lots_100;
   double order_open_price_108;
   double order_lots_116;
   double ld_124;
   double ld_132;
   double ld_140;
   double gd_212 = 0.0;
double gd_220 = 0.0;
double gd_228;
double gd_236;
   double lots_148;
   int cmd_160;
   double order_open_price_164;
   double order_lots_172;
   int cmd_180;
   double order_open_price_184;
   double order_lots_192;
   int cmd_200;
   double order_open_price_204;
   double order_lots_212;
   int cmd_220;
   double order_open_price_224;
   double order_lots_232;
   int li_240;
   gps_bool_136 = use_vertical_arrow;
   gps_bool_140 = use_filter_arrow;
   // EDUCATED by 4words (WWI)
   /*if (Kode_Aktifasi != MathAbs(AccountNumber() / 3) + 33228.0) {
      ObjectCreate("lbcom", OBJ_LABEL, 0, 0, 1.0);
      ObjectSet("lbcom", OBJPROP_CORNER, 0);
      ObjectSet("lbcom", OBJPROP_XDISTANCE, 3);
      ObjectSet("lbcom", OBJPROP_YDISTANCE, 10);
      ObjectSetText("lbcom", "Akun Tidak Terdaftar..! Contact: 08127673763 / email(FB) [email protected]", 8, "Times New Roman", White);
      return (0);
 */  }
// Фиксация просадки
ObjectDelete("WD2");
//   f0_5();
   gd_212 = 0;
   gd_220 = 0;
   gd_228 = 0;
   gd_236 = 0;
      for (int pos_4 = OrdersTotal() - 1; pos_4 >= 0; pos_4--)
    {
      OrderSelect(pos_4, SELECT_BY_POS);
      switch (OrderType())
          {
            case OP_BUY:
               gd_228 += OrderProfit();
               gd_212 += OrderLots();
               break;
            case OP_SELL:
               gd_236 += OrderProfit();
               gd_220 += OrderLots();
           }
      }

   if (MathMax((AccountBalance()+AccountCredit()-AccountEquity())/(AccountBalance()+AccountCredit())*100,0)>=Percent_Drowdown_Fix_Stop && Percent_Drowdown_Fix_Stop != 0)
      {
         if (AccountMargin() != 0 && NormalizeDouble(gd_212, 2) > NormalizeDouble(gd_220, 2))
            {
               OrderSend(Symbol(), OP_SELL, (NormalizeDouble(gd_212, 2) - NormalizeDouble(gd_220, 2)), Bid, gps_slippage_636, 0, 0, "SELL Drawdown Lock Order", gps_magic_744, 0, Red);
            }
         if (AccountMargin() != 0 && NormalizeDouble(gd_220, 2) > NormalizeDouble(gd_212, 2))
            {
               OrderSend(Symbol(), OP_BUY, (NormalizeDouble(gd_220, 2) - NormalizeDouble(gd_212, 2)), Ask, gps_slippage_636, 0, 0, "BUY Drawdown Lock Order", gps_magic_748, 0, Blue);
            }


         ObjectCreate("WD2", OBJ_TEXT, 0, iTime(Symbol(), 0, 0), iHigh(Symbol(), 0, 0));
         ObjectSetText("WD2", "MAXIMUM DRAWDOWN!!!", 14, "Times New Roman", Red);    
         return(0);
      }
//

   if ((!use_vertical_arrow) && !use_filter_arrow && (!use_po) && (!use_dot_filter) && (!gi_184)) {
      if (AccountProfit() < tp_01) return (0);
      f0_35();
      f0_35();
      f0_35();
      ObjectDelete("lbcom");
      return (0);
   }
   ObjectDelete("lbcom");
   gps_ask_908 = gps_ask_900;
   gps_ask_900 = gps_ask_892;
   gps_ask_892 = Ask;
   gps_ilow_916 = iLow(Symbol(), 0, 0);
   gps_ihigh_924 = iHigh(Symbol(), 0, 0);
   gi_664 = TrailingStop_Pip;
   if (iOpen(Symbol(), 0, 0) > iClose(Symbol(), 0, 0) && NormalizeDouble(iHigh(Symbol(), 0, 0) - iLow(Symbol(), 0, 0), Digits) / gd_1124 >= DANGER_PIP) {
      if (DANGER_PIP_close_position) {
         f0_34();
         f0_2();
      }
      gps_day_884 = Day();
      gi_876 = FALSE;
   }
   if (iOpen(Symbol(), 0, 0) < iClose(Symbol(), 0, 0) && NormalizeDouble(iHigh(Symbol(), 0, 0) - iLow(Symbol(), 0, 0), Digits) / gd_1124 >= DANGER_PIP) {
      if (DANGER_PIP_close_position) {
         f0_31();
         f0_29();
      }
      gps_day_884 = Day();
      gi_880 = FALSE;
   }
   if (GAP_Control) {
      if ((iClose(Symbol(), 0, 1) - iOpen(Symbol(), 0, 0)) / gd_1124 >= PIP_GAP) {
         gi_1116 = 2;
         gps_day_1120 = Day();
      }
      if ((iOpen(Symbol(), 0, 0) - iClose(Symbol(), 0, 1)) / gd_1124 >= PIP_GAP) {
         gi_1116 = 2;
         gps_day_1120 = Day();
      }
      if (no_trade_day == 2) {
         if (gi_1116 == 2 && Day() != gps_day_1120) {
            gi_1116 = 1;
            gps_day_1120 = Day();
         }
         if (gi_1116 == 1 && Day() != gps_day_1120) {
            gi_1116 = 0;
            gps_day_1120 = Day();
         }
      } else {
         if (no_trade_day == 1) {
            if (gi_1116 == 2 && Day() != gps_day_1120) {
               gi_1116 = 0;
               gps_day_1120 = Day();
            }
         }
      }
   } else gi_1116 = 0;
   if (gi_180 > 0 && Day() != gps_day_1120) {
      if (no_trade_day == 2) {
         if (gi_180 == 2 && Day() != gps_day_1120) {
            gi_180 = 1;
            gps_day_1120 = Day();
         }
         if (gi_180 == 1 && Day() != gps_day_1120) {
            gi_180 = 0;
            gps_day_1120 = Day();
         }
      } else {
         if (no_trade_day == 1) {
            if (gi_180 == 2 && Day() != gps_day_1120) {
               gi_180 = 0;
               gps_day_1120 = Day();
            }
         }
      }
   }
   if (Day() != gps_day_884) {
      if (gi_180 < 1) {
         gi_876 = TRUE;
         gi_880 = TRUE;
      }
   }
   if (Day() != gps_day_564) f0_40();
   if (NormalizeDouble(iOpen(Symbol(), 0, 0) - iHigh(Symbol(), 0, 0), 4) / gd_1124 > 50.0 || NormalizeDouble(iOpen(Symbol(), 0, 0) - iHigh(Symbol(), 0, 0), 4) / gd_1124 < -50.0) f0_40();
   gps_day_564 = Day();
   if (use_risk) {
      gd_308 = AccountBalance() * Percent_Use_Balance / 100.0;
      if (gi_1156 == 2) {
         if (gd_308 * Percent_Risk / 100.0 / 1000.0 < 0.01) {
            gps_lots_1052 = gd_1132;
            gps_lots_1068 = gd_1132;
            gps_lots_1084 = gd_1132;
            gps_lots_1076 = gd_1132;
            gd_640 = tp_01;
            gd_352 = sniper_01;
            gd_248 = daily_targets;
         } else {
            if (gd_308 * Percent_Risk / 100.0 / 1000.0 >= 0.01) {
               gps_lots_1052 = NormalizeDouble(gd_308 * Percent_Risk / 100.0 / 1000.0, gi_1156);
               gps_lots_1068 = NormalizeDouble(gd_308 * Percent_Risk / 100.0 / 1000.0, gi_1156);
               gps_lots_1084 = NormalizeDouble(gd_308 * Percent_Risk / 100.0 / 1000.0, gi_1156);
               gps_lots_1076 = NormalizeDouble(gd_308 * Percent_Risk / 100.0 / 1000.0, gi_1156);
               gd_640 = NormalizeDouble(100.0 * gps_lots_1052, 2) * tp_01;
               gd_352 = NormalizeDouble(100.0 * gps_lots_1052, 2) * sniper_01;
               gd_248 = NormalizeDouble(100.0 * gps_lots_1052, 2) * daily_targets;
            }
         }
      } else {
         if (gi_1156 == 1) {
            if (gd_308 * Percent_Risk / 100.0 / 10000.0 < 0.1) {
               gps_lots_1052 = gd_1132;
               gps_lots_1068 = gd_1132;
               gps_lots_1084 = gd_1132;
               gps_lots_1076 = gd_1132;
               gd_640 = tp_01;
               gd_352 = sniper_01;
               gd_248 = daily_targets;
            } else {
               if (1.0 * gd_308 / 100.0 / 10000.0 >= 0.1) {
                  gps_lots_1052 = NormalizeDouble(gd_308 * Percent_Risk / 100.0 / 10000.0, gi_1156);
                  gps_lots_1068 = NormalizeDouble(gd_308 * Percent_Risk / 100.0 / 10000.0, gi_1156);
                  gps_lots_1084 = NormalizeDouble(gd_308 * Percent_Risk / 100.0 / 10000.0, gi_1156);
                  gps_lots_1076 = NormalizeDouble(gd_308 * Percent_Risk / 100.0 / 10000.0, gi_1156);
                  gd_640 = NormalizeDouble(10.0 * gps_lots_1052, 1) * tp_01;
                  gd_352 = NormalizeDouble(10.0 * gps_lots_1052, 1) * sniper_01;
                  gd_248 = NormalizeDouble(10.0 * gps_lots_1052, 1) * daily_targets;
               }
            }
         }
      }
   } else {
      gps_lots_1052 = start_lots;
      gps_lots_1068 = start_lots;
      gps_lots_1084 = start_lots;
      gps_lots_1076 = start_lots;
      gd_640 = tp_01;
      gd_352 = sniper_01;
      gd_248 = daily_targets;
   }
   if (gps_lots_1052 > gps_lots_1140) gps_lots_1052 = gps_lots_1140;
   if (gps_lots_1084 > gps_lots_1140) gps_lots_1084 = gps_lots_1140;
   if (TrailingAll) {
      f0_28();
      f0_32();
   }
   double ld_0 = 0;
   double ld_8 = 0;
   for (int pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
      OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != magic || OrderType() > OP_SELL) continue;
      ld_0 += OrderProfit();
   }
   for (pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
      OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gps_magic_744 || OrderType() > OP_SELL) continue;
      ld_40 += OrderProfit();
   }
   for (pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
      OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gps_magic_752 || OrderType() > OP_SELL) continue;
      ld_48 += OrderProfit();
   }
   for (pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
      OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != magicbuy2 || OrderType() > OP_SELL) continue;
      ld_16 += OrderProfit();
   }
   for (pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
      OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != magicsell || OrderType() > OP_SELL) continue;
      ld_8 += OrderProfit();
   }
   for (pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
      OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gps_magic_748 || OrderType() > OP_SELL) continue;
      ld_56 += OrderProfit();
   }
   for (pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
      OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gps_magic_756 || OrderType() > OP_SELL) continue;
      ld_64 += OrderProfit();
   }
   for (pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
      OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != magicsell2 || OrderType() > OP_SELL) continue;
      ld_24 += OrderProfit();
   }
   for (pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
      OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != gps_magic_764 || OrderType() > OP_SELL) continue;
      ld_72 += OrderProfit();
   }
   double ld_32 = ld_72 + ld_0 + ld_16 + ld_8 + ld_24 + ld_40 + ld_48 + ld_56 + ld_64;
   if (f0_19() == 0) gi_780 = FALSE;
   if (f0_22() == 0) gi_788 = FALSE;
   if (f0_12() == 0) gi_784 = FALSE;
   if (f0_14() == 0) gi_792 = FALSE;
   if (ld_72 >= gd_352) f0_25();
   if ((ld_0 >= gd_640 && f0_19() > 1 && (!gi_860)) || gi_780 == TRUE) {
      f0_34();
      f0_34();
      f0_34();
      gi_780 = TRUE;
      gd_unused_828 = Ask;
      gps_count_1160++;
      if (f0_19() == 0) {
         gps_count_1160 = 0;
         gi_780 = FALSE;
      }
   }
   if ((ld_0 >= gd_640 && f0_19() > 1 && gi_860) || gi_780 == TRUE) {
      f0_34();
      f0_34();
      f0_34();
      gi_780 = TRUE;
      gd_unused_828 = Ask;
      gps_count_1160++;
      if (f0_19() == 0) {
         gps_count_1160 = 0;
         gi_780 = FALSE;
      }
   }
   if (ld_0 >= gd_352 && f0_19() == 1 && f0_22() == 0) {
      f0_34();
      f0_34();
      f0_34();
      gi_780 = TRUE;
      gd_unused_828 = Ask;
      gps_count_1160++;
      if (gps_bool_140 && (!gps_bool_136)) gps_datetime_964 = iTime(Symbol(), 0, 0);
      if (f0_19() == 0) {
         gps_count_1160 = 0;
         gi_780 = FALSE;
      }
   }
   if (ld_0 + ld_72 >= gd_352 && f0_19() == 1 && f0_22() == 0 && use_po) {
      f0_34();
      f0_34();
      f0_34();
      f0_25();
      f0_25();
      f0_25();
      gi_780 = TRUE;
      gd_unused_828 = Ask;
      gps_count_1160++;
      if (gps_bool_140 && (!gps_bool_136)) gps_datetime_964 = iTime(Symbol(), 0, 0);
      if (f0_19() == 0) {
         gps_count_1160 = 0;
         gi_780 = FALSE;
      }
   }
   if (ld_8 + ld_72 >= gd_352 && f0_12() == 1 && f0_14() == 0 && use_po) {
      f0_31();
      f0_31();
      f0_31();
      f0_25();
      f0_25();
      f0_25();
      gi_784 = TRUE;
      gd_unused_836 = Ask;
      gps_count_1160++;
      if (gps_bool_140 && (!gps_bool_136)) gps_datetime_964 = iTime(Symbol(), 0, 0);
      if (f0_19() == 0) {
         gps_count_1160 = 0;
         gi_780 = FALSE;
      }
   }
   if (ld_0 + ld_40 >= gd_640 && gi_860 == TRUE && f0_0() > 0) {
      f0_34();
      f0_34();
      f0_34();
      gi_780 = TRUE;
      gd_unused_828 = Ask;
      f0_33();
      gi_860 = FALSE;
   }
   if (ld_16 + ld_48 >= gd_640 && gi_868 == TRUE && f0_5() > 0) {
      f0_2();
      f0_2();
      f0_2();
      f0_18();
      gi_868 = FALSE;
      gi_788 = TRUE;
      gd_unused_844 = Ask;
   }
   if (ld_40 >= gd_640 && f0_19() == 0) {
      f0_33();
      f0_33();
   }
   if (ld_48 >= gd_640 && f0_22() == 0) {
      f0_18();
      f0_18();
   }
   if ((ld_16 >= gd_640 && f0_22() > 1 && (!gi_868)) || gi_788 == TRUE) {
      f0_2();
      f0_2();
      f0_2();
      gi_788 = TRUE;
      gd_unused_844 = Ask;
      gps_count_1164++;
      if (f0_22() == 0) {
         gps_count_1164 = 0;
         gi_788 = FALSE;
      }
   }
   if ((ld_16 >= gd_640 && f0_22() > 1 && gi_868) || gi_788 == TRUE) {
      f0_2();
      f0_2();
      f0_2();
      gi_788 = TRUE;
      gd_unused_844 = Ask;
      gps_count_1164++;
      if (f0_22() == 0) {
         gps_count_1164 = 0;
         gi_788 = FALSE;
      }
   }
   if ((ld_8 >= gd_640 && f0_12() > 1 && (!gi_864)) || gi_784 == TRUE) {
      f0_31();
      f0_31();
      f0_31();
      gi_784 = TRUE;
      gd_unused_836 = Bid;
      if (f0_12() == 0) {
         gi_unused_1172 = 0;
         gi_784 = FALSE;
      }
   }
   if ((ld_8 >= gd_640 && f0_12() > 1 && gi_864) || gi_784 == TRUE) {
      f0_31();
      f0_31();
      f0_31();
      gi_784 = TRUE;
      gd_unused_836 = Bid;
      if (f0_12() == 0) {
         gi_unused_1172 = 0;
         gi_784 = FALSE;
      }
   }
   if (ld_56 >= gd_640 && f0_12() == 0) {
      f0_10();
      f0_10();
   }
   if (ld_64 >= gd_640 && f0_14() == 0) {
      f0_4();
      f0_4();
   }
   if (ld_8 >= gd_352 && f0_12() == 1 && (!gi_864) && f0_14() == 0) {
      f0_31();
      f0_31();
      f0_31();
      gi_784 = TRUE;
      gd_unused_836 = Bid;
      if (gps_bool_140 && (!gps_bool_136)) gps_datetime_972 = iTime(Symbol(), 0, 0);
      if (f0_12() == 0) {
         gi_unused_1172 = 0;
         gi_784 = FALSE;
      }
   }
   if (ld_8 + ld_56 >= gd_640 && gi_864 == TRUE && f0_3() > 0) {
      f0_31();
      f0_31();
      f0_31();
      f0_10();
      f0_10();
      gi_864 = FALSE;
   }
   if (ld_24 + ld_64 >= gd_640 && gi_872 == TRUE && f0_7() > 0) {
      f0_29();
      f0_29();
      f0_29();
      f0_4();
      f0_4();
      gi_872 = FALSE;
   }
   if ((ld_24 >= gd_640 && f0_14() > 1 && (!gi_872)) || gi_792 == TRUE) {
      f0_29();
      f0_29();
      f0_29();
      gi_792 = TRUE;
      gd_unused_852 = Bid;
      gps_count_1168++;
      if (f0_14() == 0) {
         gps_count_1168 = 0;
         gi_792 = FALSE;
      }
   }
   if (!use_sl_and_tp) {
      if (OrdersTotal() > 0) {
         for (pos_80 = 0; pos_80 < OrdersTotal(); pos_80++) {
            OrderSelect(pos_80, SELECT_BY_POS, MODE_TRADES);
            if (OrderSymbol() != Symbol() || (OrderMagicNumber() != gps_magic_764 && OrderMagicNumber() != gps_magic_756 && OrderMagicNumber() != gps_magic_748 && OrderMagicNumber() != gps_magic_752 &&
               OrderMagicNumber() != gps_magic_744 && OrderMagicNumber() != magic && OrderMagicNumber() != magicbuy2 && OrderMagicNumber() != magicsell && OrderMagicNumber() != magicsell2) ||
               OrderType() > OP_SELL) continue;
            if (OrderType() == OP_BUY) {
               ld_0 = NormalizeDouble((Bid - OrderOpenPrice()) / gd_1124, 0);
               if (OrderStopLoss() != 0.0 && ld_0 <= 3.0 && ld_0 > 1.0) OrderClose(OrderTicket(), OrderLots(), Bid, gps_slippage_636, CLR_NONE);
            }
            if (OrderType() == OP_SELL) {
               ld_0 = NormalizeDouble((OrderOpenPrice() - Ask) / gd_1124, 0);
               if (OrderStopLoss() != 0.0 && ld_0 <= 3.0 && ld_0 > 1.0) OrderClose(OrderTicket(), OrderLots(), Ask, gps_slippage_636, CLR_NONE);
            }
         }
      }
   }
   if ((!stealth_mode) && use_sl_and_tp && f0_19() < level) f0_34();
   if (use_risk && ld_32 <= (-Percent_Maks_Lost) / 100.0 * gd_308) {
      f0_34();
      f0_2();
      f0_31();
      f0_29();
      f0_33();
      f0_18();
      f0_10();
      f0_4();
      f0_33();
      f0_18();
      f0_10();
      f0_4();
      f0_33();
      f0_18();
      f0_10();
      f0_4();
   }
   if (use_daily_target && f0_30() >= gd_248) {
      Comment("\ndaily target achieved.");
      if (f0_19() == 0) gi_876 = FALSE;
      if (f0_12() == 0) gi_880 = FALSE;
      gps_day_884 = Day();
   }
   if (!trade_friday && DayOfWeek() == 5) {
      Comment("\nstop trading in Friday.");
      if (f0_19() == 0) gi_876 = FALSE;
      if (f0_12() == 0) gi_880 = FALSE;
      gps_day_884 = Day();
   }
   if (UseHourTrade) {
      if (!(Hour() >= OpenHour && Hour() <= CloseHour)) {
         Comment("Non-Trading Hours!");
         return (0);
      }
   }
   if (LADS_by_Mas_Pupung) {
      if (f0_15() > 1) f0_21();
      if (f0_38() > 1) f0_16();
      if (f0_39() > 1) f0_37();
      if (f0_20() > 1) f0_9();
      for (int pos_156 = 0; pos_156 < OrdersTotal(); pos_156++) {
         OrderSelect(pos_156, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != magic) continue;
         cmd_84 = OrderType();
         order_open_price_92 = OrderOpenPrice();
         order_lots_100 = OrderLots();
         if (OrderType() == OP_BUY) ld_132 += OrderLots();
         if (OrderType() == OP_SELL) ld_140 += OrderLots();
         if (OrderType() == OP_SELLSTOP) {
            order_open_price_108 = OrderOpenPrice();
            order_lots_116 = OrderLots();
            ld_124 = OrderType();
            ticket_88 = OrderTicket();
         }
         if (OrderType() == OP_BUYSTOP) {
            order_open_price_108 = OrderOpenPrice();
            order_lots_116 = OrderLots();
            ld_124 = OrderType();
            ticket_88 = OrderTicket();
         }
      }
      if ((!LADS_by_signal) && !LADS_by_lo_hi_MA && (!LADS_by_dot_filter) && (!LADS_by_lo_hi_candle) && (!LADS_by_level)) {
         if (f0_19() == 0 && f0_15() > 0) f0_34();
         if (f0_12() == 0 && f0_39() > 0) f0_31();
         if (f0_19() > 0 && f0_19() < lvl_LADS && gi_780 == FALSE) {
            if (cmd_84 == OP_BUY && f0_15() == 0) {
               lots_148 = ld_132 * multiplier_LADS - ld_140;
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 - pip_op_LADS * gd_1124 +
                     sl * gd_1124, order_open_price_92 - pip_op_LADS * gd_1124 - tp * gd_1124, "", magic, 0, Red);
               } else {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", magic,
                     0, Red);
               }
            }
            if (cmd_84 == OP_SELL && f0_15() == 0) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 +
                     pip_op_LADS * gd_1124 - sl * gd_1124, order_open_price_92 + pip_op_LADS * gd_1124 + tp * gd_1124, "", magic, 0, Blue);
               } else {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", magic,
                     0, Blue);
               }
            }
            if (ld_124 == 5.0 && order_lots_116 < NormalizeDouble(ld_132 * multiplier_LADS - ld_140, gi_1156) && Fix_LADS && f0_15() > 0) {
               lots_148 = ld_132 * multiplier_LADS - ld_140;
               OrderDelete(ticket_88);
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, order_open_price_108 + sl * gd_1124, order_open_price_108 - tp * gd_1124,
                     "", magic, 0, Red);
               } else gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, 0, 0, "", magic, 0, Red);
            }
            if (ld_124 == 4.0 && order_lots_116 < NormalizeDouble(ld_140 * multiplier_LADS - ld_132, gi_1156) && Fix_LADS && f0_15() > 0) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               OrderDelete(ticket_88);
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, order_open_price_108 - sl * gd_1124, order_open_price_108 +
                     tp * gd_1124, "", magic, 0, Blue);
               } else gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, 0, 0, "", magic, 0, Blue);
            }
         }
      } else {
         if ((!LADS_by_lo_hi_candle) && LADS_by_signal && f0_19() > 0 && f0_19() < lvl_LADS && gi_780 == FALSE) {
            if (f0_26() == -2 && ld_132 <= ld_140) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magic, 0, Blue);
               else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magic, 0, Blue);
            } else {
               if (f0_26() == 2 && ld_140 <= ld_132) {
                  lots_148 = ld_132 * multiplier_LADS - ld_140;
                  if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magic, 0, Red);
                  else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magic, 0, Red);
               }
            }
         } else {
            if ((!LADS_by_lo_hi_candle) && LADS_by_lo_hi_MA && f0_19() > 0 && f0_19() < lvl_LADS && gi_780 == FALSE) {
               if (f0_6() == -2 && ld_132 <= ld_140) {
                  lots_148 = ld_140 * multiplier_LADS - ld_132;
                  if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magic, 0, Blue);
                  else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magic, 0, Blue);
               } else {
                  if (f0_6() == 2 && ld_140 <= ld_132) {
                     lots_148 = ld_132 * multiplier_LADS - ld_140;
                     if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magic, 0, Red);
                     else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magic, 0, Red);
                  }
               }
            } else {
               if ((!LADS_by_lo_hi_candle) && LADS_by_dot_filter && f0_19() > 0 && f0_19() < lvl_LADS && gi_780 == FALSE) {
                  if (f0_24() == -2 && ld_132 <= ld_140) {
                     lots_148 = ld_140 * multiplier_LADS - ld_132;
                     if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magic, 0, Blue);
                     else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magic, 0, Blue);
                  } else {
                     if (f0_24() == 2 && ld_140 <= ld_132) {
                        lots_148 = ld_132 * multiplier_LADS - ld_140;
                        if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magic, 0, Red);
                        else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magic, 0, Red);
                     }
                  }
               } else {
                  if (LADS_by_lo_hi_candle && f0_19() > 0 && f0_19() < lvl_LADS && gi_780 == FALSE) {
                     if (f0_23() == -2 && ld_132 <= ld_140) {
                        lots_148 = ld_140 * multiplier_LADS - ld_132;
                        if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magic, 0, Blue);
                        else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magic, 0, Blue);
                     } else {
                        if (f0_23() == 2 && ld_140 <= ld_132) {
                           lots_148 = ld_132 * multiplier_LADS - ld_140;
                           if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magic, 0, Red);
                           else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magic, 0, Red);
                        }
                     }
                  }
               }
            }
         }
      }
      ld_132 = 0;
      ld_140 = 0;
      lots_148 = 0;
      for (pos_156 = 0; pos_156 < OrdersTotal(); pos_156++) {
         OrderSelect(pos_156, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != magicsell) continue;
         cmd_84 = OrderType();
         order_open_price_92 = OrderOpenPrice();
         order_lots_100 = OrderLots();
         if (OrderType() == OP_BUY) ld_132 += OrderLots();
         if (OrderType() == OP_SELL) ld_140 += OrderLots();
         if (OrderType() == OP_SELLSTOP) {
            order_open_price_108 = OrderOpenPrice();
            order_lots_116 = OrderLots();
            ld_124 = OrderType();
            ticket_88 = OrderTicket();
         }
         if (OrderType() == OP_BUYSTOP) {
            order_open_price_108 = OrderOpenPrice();
            order_lots_116 = OrderLots();
            ld_124 = OrderType();
            ticket_88 = OrderTicket();
         }
      }
      if ((!LADS_by_signal) && !LADS_by_lo_hi_MA && (!LADS_by_dot_filter) && (!LADS_by_lo_hi_candle)) {
         if (f0_12() > 0 && f0_12() < lvl_LADS && gi_784 == FALSE) {
            if (cmd_84 == OP_BUY && f0_39() == 0) {
               lots_148 = ld_132 * multiplier_LADS - ld_140;
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 - pip_op_LADS * gd_1124 +
                     sl * gd_1124, order_open_price_92 - pip_op_LADS * gd_1124 - tp * gd_1124, "", magicsell, 0, Red);
               } else {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", magicsell,
                     0, Red);
               }
            }
            if (cmd_84 == OP_SELL && f0_39() == 0) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 +
                     pip_op_LADS * gd_1124 - sl * gd_1124, order_open_price_92 + pip_op_LADS * gd_1124 + tp * gd_1124, "", magicsell, 0, Blue);
               } else {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", magicsell,
                     0, Blue);
               }
            }
            if (ld_124 == 5.0 && order_lots_116 < NormalizeDouble(ld_132 * multiplier_LADS - ld_140, gi_1156) && Fix_LADS && f0_39() > 0) {
               lots_148 = ld_132 * multiplier_LADS - ld_140;
               OrderDelete(ticket_88);
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, order_open_price_108 + sl * gd_1124, order_open_price_108 - tp * gd_1124,
                     "", magicsell, 0, Red);
               } else gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, 0, 0, "", magicsell, 0, Red);
            }
            if (ld_124 == 4.0 && order_lots_116 < NormalizeDouble(ld_140 * multiplier_LADS - ld_132, gi_1156) && Fix_LADS && f0_39() > 0) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               OrderDelete(ticket_88);
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, order_open_price_108 - sl * gd_1124, order_open_price_108 +
                     tp * gd_1124, "", magicsell, 0, Blue);
               } else gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, 0, 0, "", magicsell, 0, Blue);
            }
         }
      } else {
         if ((!LADS_by_lo_hi_candle) && LADS_by_signal && f0_12() > 0 && f0_12() < lvl_LADS && gi_784 == FALSE) {
            if (f0_26() == -2 && ld_132 <= ld_140) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicsell, 0, Blue);
               else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicsell, 0, Blue);
            } else {
               if (f0_26() == 2 && ld_140 <= ld_132) {
                  lots_148 = ld_132 * multiplier_LADS - ld_140;
                  if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicsell, 0, Red);
                  else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicsell, 0, Red);
               }
            }
         } else {
            if ((!LADS_by_lo_hi_candle) && LADS_by_lo_hi_MA && f0_12() > 0 && f0_12() < lvl_LADS && gi_784 == FALSE) {
               if (f0_6() == -2 && ld_132 <= ld_140) {
                  lots_148 = ld_140 * multiplier_LADS - ld_132;
                  if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicsell, 0, Blue);
                  else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicsell, 0, Blue);
               } else {
                  if (f0_6() == 2 && ld_140 <= ld_132) {
                     lots_148 = ld_132 * multiplier_LADS - ld_140;
                     if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicsell, 0, Red);
                     else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicsell, 0, Red);
                  }
               }
            } else {
               if ((!LADS_by_lo_hi_candle) && LADS_by_dot_filter && f0_12() > 0 && f0_12() < lvl_LADS && gi_784 == FALSE) {
                  if (f0_24() == -2 && ld_132 <= ld_140) {
                     lots_148 = ld_140 * multiplier_LADS - ld_132;
                     if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicsell, 0, Blue);
                     else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicsell, 0, Blue);
                  } else {
                     if (f0_24() == 2 && ld_140 <= ld_132) {
                        lots_148 = ld_132 * multiplier_LADS - ld_140;
                        if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicsell, 0, Red);
                        else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicsell, 0, Red);
                     }
                  }
               } else {
                  if (LADS_by_lo_hi_candle && f0_12() > 0 && f0_12() < lvl_LADS && gi_784 == FALSE) {
                     if (f0_23() == -2 && ld_132 <= ld_140) {
                        lots_148 = ld_140 * multiplier_LADS - ld_132;
                        if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicsell, 0, Blue);
                        else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicsell, 0, Blue);
                     } else {
                        if (f0_23() == 2 && ld_140 <= ld_132) {
                           lots_148 = ld_132 * multiplier_LADS - ld_140;
                           if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicsell, 0, Red);
                           else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicsell, 0, Red);
                        }
                     }
                  }
               }
            }
         }
      }
      ld_132 = 0;
      ld_140 = 0;
      lots_148 = 0;
      for (pos_156 = 0; pos_156 < OrdersTotal(); pos_156++) {
         OrderSelect(pos_156, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != magicbuy2) continue;
         cmd_84 = OrderType();
         order_open_price_92 = OrderOpenPrice();
         order_lots_100 = OrderLots();
         if (OrderType() == OP_BUY) ld_132 += OrderLots();
         if (OrderType() == OP_SELL) ld_140 += OrderLots();
         if (OrderType() == OP_SELLSTOP) {
            order_open_price_108 = OrderOpenPrice();
            order_lots_116 = OrderLots();
            ld_124 = OrderType();
            ticket_88 = OrderTicket();
         }
         if (OrderType() == OP_BUYSTOP) {
            order_open_price_108 = OrderOpenPrice();
            order_lots_116 = OrderLots();
            ld_124 = OrderType();
            ticket_88 = OrderTicket();
         }
      }
      if ((!LADS_by_signal) && !LADS_by_lo_hi_MA && (!LADS_by_dot_filter)) {
         if (f0_22() == 0 && f0_38() > 0) f0_2();
         if (f0_14() == 0 && f0_20() > 0) f0_29();
         if (f0_22() > 0 && f0_22() < lvl_LADS && gi_788 == FALSE) {
            if (cmd_84 == OP_BUY && f0_38() == 0) {
               lots_148 = ld_132 * multiplier_LADS - ld_140;
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 - pip_op_LADS * gd_1124 +
                     sl * gd_1124, order_open_price_92 - pip_op_LADS * gd_1124 - tp * gd_1124, "", magicbuy2, 0, Red);
               } else {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", magicbuy2,
                     0, Red);
               }
            }
            if (cmd_84 == OP_SELL && f0_38() == 0) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 +
                     pip_op_LADS * gd_1124 - sl * gd_1124, order_open_price_92 + pip_op_LADS * gd_1124 + tp * gd_1124, "", magicbuy2, 0, Blue);
               } else {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", magicbuy2,
                     0, Blue);
               }
            }
            if (ld_124 == 5.0 && order_lots_116 < NormalizeDouble(ld_132 * multiplier_LADS - ld_140, gi_1156) && Fix_LADS && f0_38() > 0) {
               lots_148 = ld_132 * multiplier_LADS - ld_140;
               OrderDelete(ticket_88);
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, order_open_price_108 + sl * gd_1124, order_open_price_108 - tp * gd_1124,
                     "", magicbuy2, 0, Red);
               } else gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, 0, 0, "", magicbuy2, 0, Red);
            }
            if (ld_124 == 4.0 && order_lots_116 < NormalizeDouble(ld_140 * multiplier_LADS - ld_132, gi_1156) && Fix_LADS && f0_38() > 0) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               OrderDelete(ticket_88);
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, order_open_price_108 - sl * gd_1124, order_open_price_108 +
                     tp * gd_1124, "", magicbuy2, 0, Blue);
               } else gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, 0, 0, "", magicbuy2, 0, Blue);
            }
         }
      } else {
         if (LADS_by_signal && f0_22() > 0 && f0_22() < lvl_LADS && gi_788 == FALSE) {
            if (f0_26() == -2 && ld_132 <= ld_140) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicbuy2, 0, Blue);
               else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicbuy2, 0, Blue);
            } else {
               if (f0_26() == 2 && ld_140 <= ld_132) {
                  lots_148 = ld_132 * multiplier_LADS - ld_140;
                  if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicbuy2, 0, Red);
                  else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicbuy2, 0, Red);
               }
            }
         } else {
            if (LADS_by_lo_hi_MA && f0_22() > 0 && f0_22() < lvl_LADS && gi_788 == FALSE) {
               if (f0_6() == -2 && ld_132 <= ld_140) {
                  lots_148 = ld_140 * multiplier_LADS - ld_132;
                  if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicbuy2, 0, Blue);
                  else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicbuy2, 0, Blue);
               } else {
                  if (f0_6() == 2 && ld_140 <= ld_132) {
                     lots_148 = ld_132 * multiplier_LADS - ld_140;
                     if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicbuy2, 0, Red);
                     else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicbuy2, 0, Red);
                  }
               }
            } else {
               if (LADS_by_dot_filter && f0_22() > 0 && f0_22() < lvl_LADS && gi_788 == FALSE) {
                  if (f0_24() == -2 && ld_132 <= ld_140) {
                     lots_148 = ld_140 * multiplier_LADS - ld_132;
                     if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicbuy2, 0, Blue);
                     else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicbuy2, 0, Blue);
                  } else {
                     if (f0_24() == 2 && ld_140 <= ld_132) {
                        lots_148 = ld_132 * multiplier_LADS - ld_140;
                        if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicbuy2, 0, Red);
                        else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicbuy2, 0, Red);
                     }
                  }
               }
            }
         }
      }
      ld_132 = 0;
      ld_140 = 0;
      lots_148 = 0;
      for (pos_156 = 0; pos_156 < OrdersTotal(); pos_156++) {
         OrderSelect(pos_156, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != magicsell2) continue;
         cmd_84 = OrderType();
         order_open_price_92 = OrderOpenPrice();
         order_lots_100 = OrderLots();
         if (OrderType() == OP_BUY) ld_132 += OrderLots();
         if (OrderType() == OP_SELL) ld_140 += OrderLots();
         if (OrderType() == OP_SELLSTOP) {
            order_open_price_108 = OrderOpenPrice();
            order_lots_116 = OrderLots();
            ld_124 = OrderType();
            ticket_88 = OrderTicket();
         }
         if (OrderType() == OP_BUYSTOP) {
            order_open_price_108 = OrderOpenPrice();
            order_lots_116 = OrderLots();
            ld_124 = OrderType();
            ticket_88 = OrderTicket();
         }
      }
      if ((!LADS_by_signal) && !LADS_by_lo_hi_MA && (!LADS_by_dot_filter)) {
         if (f0_14() > 0 && f0_14() < lvl_LADS && gi_792 == FALSE) {
            if (cmd_84 == OP_BUY && f0_20() == 0) {
               lots_148 = ld_132 * multiplier_LADS - ld_140;
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 - pip_op_LADS * gd_1124 +
                     sl * gd_1124, order_open_price_92 - pip_op_LADS * gd_1124 - tp * gd_1124, "", magicsell2, 0, Red);
               } else {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", magicsell2,
                     0, Red);
               }
            }
            if (cmd_84 == OP_SELL && f0_20() == 0) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 +
                     pip_op_LADS * gd_1124 - sl * gd_1124, order_open_price_92 + pip_op_LADS * gd_1124 + tp * gd_1124, "", magicsell2, 0, Blue);
               } else {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", magicsell2,
                     0, Blue);
               }
            }
            if (ld_124 == 5.0 && order_lots_116 < NormalizeDouble(ld_132 * multiplier_LADS - ld_140, gi_1156) && Fix_LADS && f0_20() > 0) {
               lots_148 = ld_132 * multiplier_LADS - ld_140;
               OrderDelete(ticket_88);
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, order_open_price_108 + sl * gd_1124, order_open_price_108 - tp * gd_1124,
                     "", magicsell2, 0, Red);
               } else gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, 0, 0, "", magicsell2, 0, Red);
            }
            if (ld_124 == 4.0 && order_lots_116 < NormalizeDouble(ld_140 * multiplier_LADS - ld_132, gi_1156) && Fix_LADS && f0_20() > 0) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               OrderDelete(ticket_88);
               if (use_sl_and_tp) {
                  gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, order_open_price_108 - sl * gd_1124, order_open_price_108 +
                     tp * gd_1124, "", magicsell2, 0, Blue);
               } else gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_108, gps_slippage_636, 0, 0, "", magicsell2, 0, Blue);
            }
         }
      } else {
         if (LADS_by_signal && f0_14() > 0 && f0_14() < lvl_LADS && gi_792 == FALSE) {
            if (f0_26() == -2 && ld_132 <= ld_140) {
               lots_148 = ld_140 * multiplier_LADS - ld_132;
               if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicsell2, 0, Blue);
               else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicsell2, 0, Blue);
            } else {
               if (f0_26() == 2 && ld_140 <= ld_132) {
                  lots_148 = ld_132 * multiplier_LADS - ld_140;
                  if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicsell2, 0, Red);
                  else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicsell2, 0, Red);
               }
            }
         } else {
            if (LADS_by_lo_hi_MA && f0_14() > 0 && f0_14() < lvl_LADS && gi_792 == FALSE) {
               if (f0_6() == -2 && ld_132 <= ld_140) {
                  lots_148 = ld_140 * multiplier_LADS - ld_132;
                  if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicsell2, 0, Blue);
                  else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicsell2, 0, Blue);
               } else {
                  if (f0_6() == 2 && ld_140 <= ld_132) {
                     lots_148 = ld_132 * multiplier_LADS - ld_140;
                     if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicsell2, 0, Red);
                     else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicsell2, 0, Red);
                  }
               }
            } else {
               if (LADS_by_dot_filter && f0_14() > 0 && f0_14() < lvl_LADS && gi_792 == FALSE) {
                  if (f0_24() == -2 && ld_132 <= ld_140) {
                     lots_148 = ld_140 * multiplier_LADS - ld_132;
                     if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magicsell2, 0, Blue);
                     else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, gps_slippage_636, 0, 0, "", magicsell2, 0, Blue);
                  } else {
                     if (f0_24() == 2 && ld_140 <= ld_132) {
                        lots_148 = ld_132 * multiplier_LADS - ld_140;
                        if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, Bid + sl * gd_1124, Ask - tp * gd_1124, "", magicsell2, 0, Red);
                        else gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, lots_148, Bid, gps_slippage_636, 0, 0, "", magicsell2, 0, Red);
                     }
                  }
               }
            }
         }
      }
      ld_132 = 0;
      ld_140 = 0;
      lots_148 = 0;
      for (pos_156 = 0; pos_156 < OrdersTotal(); pos_156++) {
         OrderSelect(pos_156, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != gps_magic_764) continue;
         cmd_84 = OrderType();
         order_open_price_92 = OrderOpenPrice();
         order_lots_100 = OrderLots();
         if (OrderType() == OP_BUY) ld_132 += OrderLots();
         if (OrderType() == OP_SELL) ld_140 += OrderLots();
      }
      if (f0_27() == 0 && f0_36() > 0) f0_25();
      if (f0_27() > 0 && f0_27() < lvl_LADS && f0_36() == 0) {
         if (cmd_84 == OP_BUY) {
            lots_148 = ld_132 * multiplier_LADS - ld_140;
            if (use_sl_and_tp) {
               gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 - pip_op_LADS * gd_1124 +
                  sl * gd_1124, order_open_price_92 - pip_op_LADS * gd_1124 - tp * gd_1124, "", gps_magic_764, 0, Red);
            } else {
               gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 - pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", gps_magic_764,
                  0, Red);
            }
         }
         if (cmd_84 == OP_SELL) {
            lots_148 = ld_140 * multiplier_LADS - ld_132;
            if (use_sl_and_tp) {
               gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, order_open_price_92 +
                  pip_op_LADS * gd_1124 - sl * gd_1124, order_open_price_92 + pip_op_LADS * gd_1124 + tp * gd_1124, "", gps_magic_764, 0, Blue);
            } else {
               gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, NormalizeDouble(lots_148, gi_1156), order_open_price_92 + pip_op_LADS * gd_1124, gps_slippage_636, 0, 0, "", gps_magic_764,
                  0, Blue);
            }
         }
      }
   }
   if (f0_17() == 0 && use_po && f0_24() == -2 && gps_datetime_216 != iTime(Symbol(), 0, 0) && gi_1116 < 1 && gi_876 && gi_220 == -2) {
      gd_200 = NormalizeDouble(gps_price_192 + 20.0 * gd_1124, 4);
      gd_208 = NormalizeDouble(gps_price_192 - 20.0 * gd_1124, 4);
      if (Ask < gd_208) {
         if (use_sl_and_tp) {
            gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, gps_lots_1052, gps_price_192, gps_slippage_636, gps_price_192 - sl * gd_1124, gps_price_192 + tp * gd_1124, "", gps_magic_764,
               0, Blue);
         } else gps_ticket_1176 = OrderSend(Symbol(), OP_BUYSTOP, gps_lots_1052, gps_price_192, gps_slippage_636, 0, 0, "", gps_magic_764, 0, Blue);
      }
      gps_datetime_216 = iTime(Symbol(), 0, 0);
   } else {
      if (f0_17() == 0 && use_po && f0_24() == 2 && gps_datetime_216 != iTime(Symbol(), 0, 0) && gi_1116 < 1 && gi_880 && gi_220 == 2) {
         gd_200 = NormalizeDouble(gps_price_192 + 20.0 * gd_1124, 4);
         gd_208 = NormalizeDouble(gps_price_192 - 20.0 * gd_1124, 4);
         if (Bid > gd_200) {
            if (use_sl_and_tp) {
               gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, gps_lots_1052, gps_price_192, gps_slippage_636, gps_price_192 + sl * gd_1124, gps_price_192 - tp * gd_1124, "", gps_magic_764,
                  0, Red);
            } else gps_ticket_1176 = OrderSend(Symbol(), OP_SELLSTOP, gps_lots_1052, gps_price_192, gps_slippage_636, 0, 0, "", gps_magic_764, 0, Red);
         }
         gps_datetime_216 = iTime(Symbol(), 0, 0);
      }
   }
   if (gi_1092 == TRUE && gi_876 == TRUE && gi_184 && f0_24() == 2 && gi_220 == 2 && f0_1() == 0 && gps_ask_892 > gps_ask_900 && gps_ask_900 > gps_ask_908 && gps_ilow_916 < gps_price_192 &&
      gps_ask_892 >= gps_price_192 && gi_876 && gi_1116 < 1) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, gps_lots_1052, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", gps_magic_760, 0, Blue);
   else {
      if (gi_1096 == TRUE && gi_880 == TRUE && gi_184 && f0_24() == -2 && gi_220 == -2 && f0_1() == 0 && gps_ask_892 < gps_ask_900 && gps_ask_900 < gps_ask_908 && gps_ihigh_924 > gps_price_192 &&
         gps_ask_892 <= gps_price_192 && gi_880 && gi_1116 < 1) gps_ticket_1176 = OrderSend(Symbol(), OP_SELL, gps_lots_1052, Bid, gps_slippage_636, Bid + sl * gd_1124, Bid - tp * gd_1124, "", gps_magic_760, 0, Red);
   }
   if ((!gi_780 && f0_26() == -2 && f0_19() == 0 && f0_22() == 0) && !singgle_op && (!gi_860) && gi_876 == TRUE && gi_1092 == TRUE && gi_1116 < 1 && (!gi_768) && gps_bool_136 || gps_bool_140 || use_dot_filter) 
   {
      gd_92 = jarak_op_pip1;
      gd_772 = multiplier1;
      if (stealth_mode) {
         gps_datetime_964 = iTime(Symbol(), 0, 0);
         if (use_sl_and_tp) gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, gps_lots_1052, Ask, gps_slippage_636, Ask - sl * gd_1124, Ask + tp * gd_1124, "", magic, 0, Blue);
         else gps_ticket_1176 = OrderSend(Symbol(), OP_BUY, gps_lots_1052, Ask, gps_slip         
Download link:WinFX_EA_V4.2_compiler_FIX.mq4 Size:241KB
Contact us:[email protected]