
extern string t1 = "Global Setting";
extern double Account = 1872377.0;
extern double Lots = 0.01;
extern double LotExponent = 1.3;
int gi_108 = 2;
extern double MaxLots = 1.0;
extern bool MM = FALSE;
extern double TakeProfit = 30.0;
extern bool UseEquityStop = FALSE;
extern double TotalEquityRisk = 20.0;
extern string t2 = "Time Setting";
extern bool CloseFriday = TRUE;
extern int CloseFridayHour = 17;
extern bool OpenMondey = TRUE;
extern int OpenMondeyHour = 0;
extern string t3 = "Setting for Dancing Jaipong";
extern int MaxTrades_Hilo = 10;
bool gi_220 = FALSE;
double gd_224 = 48.0;
extern bool UseTrailingStop_Hilo = FALSE;
double g_pips_236 = 500.0;
extern double TrailStart_Hilo = 10.0;
extern double TrailStop_Hilo = 5.0;
extern double PipStep_Hilo = 30.0;
extern double slip_Hilo = 3.0;
extern int MagicNumber_Hilo = 11111;
double g_price_280;
double gd_288;
double gd_unused_296;
double gd_unused_304;
double g_price_312;
double g_bid_320;
double g_ask_328;
double gd_336;
double gd_344;
double gd_352;
bool gi_360;
string gs_364 = "Dancing Jaipong";
int gi_372 = 0;
int gi_376;
int gi_380 = 0;
double gd_384;
int g_pos_392 = 0;
int gi_396;
double gd_400 = 0.0;
bool gi_408 = FALSE;
bool gi_412 = FALSE;
bool gi_416 = FALSE;
int gi_420;
bool gi_424 = FALSE;
double gd_428;
double gd_436;
extern string t4 = "Setting for Dancing Keroncong";
extern int MaxTrades_15 = 10;
int g_timeframe_496 = PERIOD_H1;
extern bool UseTrailingStop_15 = FALSE;
double g_pips_508 = 500.0;
extern double TrailStart_15 = 10.0;
extern double TrailStop_15 = 5.0;
bool gi_532 = FALSE;
double gd_536 = 48.0;
extern double PipStep_15 = 30.0;
extern double slip_15 = 3.0;
extern int g_magic_176_15 = 12324;
double g_price_564;
double gd_572;
double gd_unused_580;
double gd_unused_588;
double g_price_596;
double g_bid_604;
double g_ask_612;
double gd_620;
double gd_628;
double gd_636;
bool gi_644;
string gs_648 = "Dancing Keroncong";
int gi_656 = 0;
int gi_660;
int gi_664 = 0;
double gd_668;
int g_pos_676 = 0;
int gi_680;
double gd_684 = 0.0;
bool gi_692 = FALSE;
bool gi_696 = FALSE;
bool gi_700 = FALSE;
int gi_704;
bool gi_708 = FALSE;
double gd_712;
double gd_720;
int g_datetime_728 = 1;
extern string t5 = "Setting for Dancing Tortor";
extern int MaxTrades_16 = 10;
int g_timeframe_784 = PERIOD_M1;
extern bool UseTrailingStop_16 = FALSE;
double g_pips_792 = 500.0;
extern double TrailStart_16 = 10.0;
extern double TrailStop_16 = 5.0;
bool gi_816 = FALSE;
double gd_820 = 48.0;
extern double PipStep_16 = 30.0;
extern double slip_16 = 3.0;
extern int g_magic_176_16 = 16794;
double g_price_848;
double gd_856;
double gd_unused_864;
double gd_unused_872;
double g_price_880;
double g_bid_888;
double g_ask_896;
double gd_904;
double gd_912;
double gd_920;
bool gi_928;
string gs_932 = "Dancing Tortor";
int gi_940 = 0;
int gi_944;
int gi_948 = 0;
double gd_952;
int g_pos_960 = 0;
int gi_964;
double gd_968 = 0.0;
bool gi_976 = FALSE;
bool gi_980 = FALSE;
bool gi_984 = FALSE;
int gi_988;
bool gi_992 = FALSE;
double gd_996;
double gd_1004;
int g_datetime_1012 = 1;
int g_timeframe_1024 = PERIOD_M1;
int g_timeframe_1028 = PERIOD_M5;
int g_timeframe_1032 = PERIOD_M15;
int g_timeframe_1036 = PERIOD_M30;
int g_timeframe_1040 = PERIOD_H1;
int g_timeframe_1044 = PERIOD_H4;
int g_timeframe_1048 = PERIOD_D1;
bool g_corner_1052 = TRUE;
int gi_1056 = 0;
int gi_1060 = 10;
int g_window_1064 = 0;
bool gi_1068 = TRUE;
bool gi_unused_1072 = TRUE;
bool gi_1076 = FALSE;
int g_color_1080 = Gray;
int g_color_1084 = Gray;
int g_color_1088 = Gray;
int g_color_1092 = DarkOrange;
int gi_unused_1096 = 36095;
int g_color_1100 = Lime;
int g_color_1104 = OrangeRed;
int gi_1108 = 65280;
int gi_1112 = 17919;
int g_color_1116 = Lime;
int g_color_1120 = Red;
int g_color_1124 = Orange;
int g_period_1128 = 8;
int g_period_1132 = 17;
int g_period_1136 = 9;
int g_applied_price_1140 = PRICE_CLOSE;
int g_color_1144 = Lime;
int g_color_1148 = Tomato;
int g_color_1152 = Green;
int g_color_1156 = Red;
string gs_unused_1160 = "<<<< STR Indicator Settings >>>>>>>>>>>>>";
string gs_unused_1168 = "<<<< RSI Settings >>>>>>>>>>>>>";
int g_period_1176 = 9;
int g_applied_price_1180 = PRICE_CLOSE;
string gs_unused_1184 = "<<<< CCI Settings >>>>>>>>>>>>>>";
int g_period_1192 = 13;
int g_applied_price_1196 = PRICE_CLOSE;
string gs_unused_1200 = "<<<< STOCH Settings >>>>>>>>>>>";
int g_period_1208 = 5;
int g_period_1212 = 3;
int g_slowing_1216 = 3;
int g_ma_method_1220 = MODE_EMA;
string gs_unused_1224 = "<<<< STR Colors >>>>>>>>>>>>>>>>";
int g_color_1232 = Lime;
int g_color_1236 = Red;
int g_color_1240 = Orange;
string gs_unused_1244 = "<<<< MA Settings >>>>>>>>>>>>>>";
int g_period_1252 = 5;
int g_period_1256 = 9;
int g_ma_method_1260 = MODE_EMA;
int g_applied_price_1264 = PRICE_CLOSE;
string gs_unused_1268 = "<<<< MA Colors >>>>>>>>>>>>>>";
int g_color_1276 = Lime;
int g_color_1280 = Red;
string gs_dummy_1292;
string g_text_1464;
string g_text_1472;
bool gi_1480 = TRUE;
extern string KEY = "";
int gi_1492;
int g_str2int_1496;
int g_str2int_1500;
int g_str2int_1504;

int init() {
   string ls_4;
   string ls_12;
   string ls_20;
   string ls_28;
   string ls_36;
   string ls_44;
   gd_352 = MarketInfo(Symbol(), MODE_SPREAD) * Point;
   gd_636 = MarketInfo(Symbol(), MODE_SPREAD) * Point;
   gd_920 = MarketInfo(Symbol(), MODE_SPREAD) * Point;
   ObjectCreate("Lable1", OBJ_LABEL, 0, 0, 1.0);
   ObjectSet("Lable1", OBJPROP_CORNER, 2);
   ObjectSet("Lable1", OBJPROP_XDISTANCE, 23);
   ObjectSet("Lable1", OBJPROP_YDISTANCE, 21);
   g_text_1472 = "ATTENTION. Count your margin. use smallest lot";
   ObjectSetText("Lable1", g_text_1472, 12, "Arial", DeepSkyBlue);
   ObjectCreate("Lable", OBJ_LABEL, 0, 0, 1.0);
   ObjectSet("Lable", OBJPROP_CORNER, 2);
   ObjectSet("Lable", OBJPROP_XDISTANCE, 3);
   ObjectSet("Lable", OBJPROP_YDISTANCE, 1);
   g_text_1464 = "     Trade with your own risk";
   ObjectSetText("Lable", g_text_1464, 10, "Arial", DeepSkyBlue);
   if (gi_1480) {
      if (KEY != "") {
         gi_1492 = 0;
         for (int li_0 = 0; li_0 < StringLen(KEY); li_0++) {
            if (StringSubstr(KEY, li_0, 1) != "X") ls_4 = ls_4 + StringSubstr(KEY, li_0, 1);
            else {
               ls_12 = ls_12 + f0_15(ls_4);
               ls_4 = "";
            }
         }
         for (li_0 = 0; li_0 < StringLen(ls_12); li_0 += 2) {
            if (StringSubstr(ls_12, li_0, 2) == "55") ls_20 = ls_20 + "0";
            else {
               if (StringSubstr(ls_12, li_0, 2) == "21") ls_20 = ls_20 + "1";
               else {
                  if (StringSubstr(ls_12, li_0, 2) == "98") ls_20 = ls_20 + "2";
                  else {
                     if (StringSubstr(ls_12, li_0, 2) == "42") ls_20 = ls_20 + "3";
                     else {
                        if (StringSubstr(ls_12, li_0, 2) == "10") ls_20 = ls_20 + "4";
                        else {
                           if (StringSubstr(ls_12, li_0, 2) == "14") ls_20 = ls_20 + "5";
                           else {
                              if (StringSubstr(ls_12, li_0, 2) == "88") ls_20 = ls_20 + "6";
                              else {
                                 if (StringSubstr(ls_12, li_0, 2) == "66") ls_20 = ls_20 + "7";
                                 else {
                                    if (StringSubstr(ls_12, li_0, 2) == "33") ls_20 = ls_20 + "8";
                                    else {
                                       if (StringSubstr(ls_12, li_0, 2) == "32") ls_20 = ls_20 + "9";
                                       else {
                                          if (StringSubstr(ls_12, li_0, 2) == "96") ls_20 = ls_20 + "a";
                                          else {
                                             if (StringSubstr(ls_12, li_0, 2) == "30") ls_20 = ls_20 + "b";
                                             else {
                                                if (StringSubstr(ls_12, li_0, 2) == "77") ls_20 = ls_20 + "c";
                                                else {
                                                   if (StringSubstr(ls_12, li_0, 2) == "90") ls_20 = ls_20 + "d";
                                                   else {
                                                      if (StringSubstr(ls_12, li_0, 2) == "24") ls_20 = ls_20 + "e";
                                                      else {
                                                         if (StringSubstr(ls_12, li_0, 2) == "29") ls_20 = ls_20 + "f";
                                                         else {
                                                            if (StringSubstr(ls_12, li_0, 2) == "39") ls_20 = ls_20 + "g";
                                                            else {
                                                               if (StringSubstr(ls_12, li_0, 2) == "48") ls_20 = ls_20 + "h";
                                                               else {
                                                                  if (StringSubstr(ls_12, li_0, 2) == "56") ls_20 = ls_20 + "i";
                                                                  else {
                                                                     if (StringSubstr(ls_12, li_0, 2) == "16") ls_20 = ls_20 + "j";
                                                                     else {
                                                                        if (StringSubstr(ls_12, li_0, 2) == "62") ls_20 = ls_20 + "k";
                                                                        else {
                                                                           if (StringSubstr(ls_12, li_0, 2) == "15") ls_20 = ls_20 + "l";
                                                                           else {
                                                                              if (StringSubstr(ls_12, li_0, 2) == "71") ls_20 = ls_20 + "m";
                                                                              else {
                                                                                 if (StringSubstr(ls_12, li_0, 2) == "81") ls_20 = ls_20 + "n";
                                                                                 else {
                                                                                    if (StringSubstr(ls_12, li_0, 2) == "93") ls_20 = ls_20 + "o";
                                                                                    else {
                                                                                       if (StringSubstr(ls_12, li_0, 2) == "74") ls_20 = ls_20 + "p";
                                                                                       else {
                                                                                          if (StringSubstr(ls_12, li_0, 2) == "83") ls_20 = ls_20 + "q";
                                                                                          else {
                                                                                             if (StringSubstr(ls_12, li_0, 2) == "44") ls_20 = ls_20 + "r";
                                                                                             else {
                                                                                                if (StringSubstr(ls_12, li_0, 2) == "51") ls_20 = ls_20 + "s";
                                                                                                else {
                                                                                                   if (StringSubstr(ls_12, li_0, 2) == "69") ls_20 = ls_20 + "t";
                                                                                                   else {
                                                                                                      if (StringSubstr(ls_12, li_0, 2) == "40") ls_20 = ls_20 + "u";
                                                                                                      else {
                                                                                                         if (StringSubstr(ls_12, li_0, 2) == "73") ls_20 = ls_20 + "v";
                                                                                                         else {
                                                                                                            if (StringSubstr(ls_12, li_0, 2) == "59") ls_20 = ls_20 + "w";
                                                                                                            else {
                                                                                                               if (StringSubstr(ls_12, li_0, 2) == "36") ls_20 = ls_20 + "x";
                                                                                                               else {
                                                                                                                  if (StringSubstr(ls_12, li_0, 2) == "26") ls_20 = ls_20 + "y";
                                                                                                                  else {
                                                                                                                     if (StringSubstr(ls_12, li_0, 2) == "25") ls_20 = ls_20 + "z";
                                                                                                                     else {
                                                                                                                        if (StringSubstr(ls_12, li_0, 2) == "28") ls_20 = ls_20 + "!";
                                                                                                                        else {
                                                                                                                           if (StringSubstr(ls_12, li_0, 2) == "65") ls_20 = ls_20 + "&";
                                                                                                                           else {
                                                                                                                              if (StringSubstr(ls_12, li_0, 2) == "52") ls_20 = ls_20 + "#";
                                                                                                                              else {
                                                                                                                                 if (StringSubstr(ls_12, li_0, 2) == "57") ls_20 = ls_20 + "$";
                                                                                                                                 else {
                                                                                                                                    if (StringSubstr(ls_12, li_0, 2) == "31") ls_20 = ls_20 + "%";
                                                                                                                                    else {
                                                                                                                                       if (StringSubstr(ls_12, li_0, 2) == "91") ls_20 = ls_20 + "*";
                                                                                                                                       else {
                                                                                                                                          if (StringSubstr(ls_12, li_0, 2) == "60") ls_20 = ls_20 + "+";
                                                                                                                                          else {
                                                                                                                                             if (StringSubstr(ls_12, li_0, 2) == "92") ls_20 = ls_20 + "-";
                                                                                                                                             else {
                                                                                                                                                if (StringSubstr(ls_12, li_0, 2) == "34") ls_20 = ls_20 + "?";
                                                                                                                                                else {
                                                                                                                                                   if (StringSubstr(ls_12, li_0, 2) == "46") ls_20 = ls_20 + "^";
                                                                                                                                                   else {
                                                                                                                                                      if (StringSubstr(ls_12, li_0, 2) == "38") ls_20 = ls_20 + "|";
                                                                                                                                                      else {
                                                                                                                                                         if (StringSubstr(ls_12, li_0, 2) == "37") ls_20 = ls_20 + "@";
                                                                                                                                                         else {
                                                                                                                                                            if (StringSubstr(ls_12, li_0, 2) == "49") ls_20 = ls_20 + "_";
                                                                                                                                                            else {
                                                                                                                                                               if (StringSubstr(ls_12, li_0, 2) == "50") ls_20 = ls_20 + "S";
                                                                                                                                                               else
                                                                                                                                                                  if (StringSubstr(ls_12, li_0, 2) == "19") ls_20 = ls_20 + ".";
                                                                                                                                                            }
                                                                                                                                                         }
                                                                                                                                                      }
                                                                                                                                                   }
                                                                                                                                                }
                                                                                                                                             }
                                                                                                                                          }
                                                                                                                                       }
                                                                                                                                    }
                                                                                                                                 }
                                                                                                                              }
                                                                                                                           }
                                                                                                                        }
                                                                                                                     }
                                                                                                                  }
                                                                                                               }
                                                                                                            }
                                                                                                         }
                                                                                                      }
                                                                                                   }
                                                                                                }
                                                                                             }
                                                                                          }
                                                                                       }
                                                                                    }
                                                                                 }
                                                                              }
                                                                           }
                                                                        }
                                                                     }
                                                                  }
                                                               }
                                                            }
                                                         }
                                                      }
                                                   }
                                                }
                                             }
                                          }
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
         ls_28 = StringSubstr(ls_20, 1, 2);
         ls_36 = StringSubstr(ls_20, 3, 2);
         ls_44 = StringSubstr(ls_20, 5, 4);
         g_str2int_1496 = StrToInteger(ls_28);
         g_str2int_1500 = StrToInteger(ls_36);
         g_str2int_1504 = StrToInteger(ls_44);
         if (Year() > g_str2int_1504) gi_1492 = 3;
         if (Year() == g_str2int_1504) {
            if (Month() > g_str2int_1500) gi_1492 = 3;
            if (Month() == g_str2int_1500)
               if (Day() > g_str2int_1496) gi_1492 = 3;
         }
      } else gi_1492 = 1;
      gi_1480 = FALSE;
   }
   Comment("\n", "License will expire on ", g_str2int_1496, "/", g_str2int_1500, "/", g_str2int_1504);
   return (0);
}

int deinit() {
   ObjectDelete("cja");
   ObjectDelete("Signalprice");
   ObjectDelete("SIG_BARS_TF1");
   ObjectDelete("SIG_BARS_TF2");
   ObjectDelete("SIG_BARS_TF3");
   ObjectDelete("SIG_BARS_TF4");
   ObjectDelete("SIG_BARS_TF5");
   ObjectDelete("SIG_BARS_TF6");
   ObjectDelete("SIG_BARS_TF7");
   ObjectDelete("SSignalMACD_TEXT");
   ObjectDelete("SSignalMACDM1");
   ObjectDelete("SSignalMACDM5");
   ObjectDelete("SSignalMACDM15");
   ObjectDelete("SSignalMACDM30");
   ObjectDelete("SSignalMACDH1");
   ObjectDelete("SSignalMACDH4");
   ObjectDelete("SSignalMACDD1");
   ObjectDelete("SSignalSTR_TEXT");
   ObjectDelete("SignalSTRM1");
   ObjectDelete("SignalSTRM5");
   ObjectDelete("SignalSTRM15");
   ObjectDelete("SignalSTRM30");
   ObjectDelete("SignalSTRH1");
   ObjectDelete("SignalSTRH4");
   ObjectDelete("SignalSTRD1");
   ObjectDelete("SignalEMA_TEXT");
   ObjectDelete("SignalEMAM1");
   ObjectDelete("SignalEMAM5");
   ObjectDelete("SignalEMAM15");
   ObjectDelete("SignalEMAM30");
   ObjectDelete("SignalEMAH1");
   ObjectDelete("SignalEMAH4");
   ObjectDelete("SignalEMAD1");
   ObjectDelete("SIG_DETAIL_1");
   ObjectDelete("SIG_DETAIL_2");
   ObjectDelete("SIG_DETAIL_3");
   ObjectDelete("SIG_DETAIL_4");
   ObjectDelete("SIG_DETAIL_5");
   ObjectDelete("SIG_DETAIL_6");
   ObjectDelete("SIG_DETAIL_7");
   ObjectDelete("SIG_DETAIL_8");
   ObjectDelete("Lable");
   ObjectDelete("Lable1");
   return (0);
}

int start() {
   int li_4;
   int li_8;
   int li_12;
   int li_16;
   int li_20;
   int li_24;
   int li_28;
   color color_32;
   color color_36;
   color color_40;
   color color_44;
   color color_48;
   color color_52;
   color color_56;
   string ls_unused_60;
   color color_68;
   color color_72;
   color color_76;
   color color_80;
   color color_84;
   color color_88;
   color color_92;
   color color_96;
   string ls_unused_100;
   color color_108;
   int li_unused_112;
   double ihigh_1128;
   double ilow_1136;
   double iclose_1144;
   double iclose_1152;
   double ld_1192;
   double ld_1248;
   double ld_1256;
   int li_1264;
   int count_1268;
   double ld_1316;
   double ld_1324;
   int li_1332;
   int count_1336;
  // if (gi_1492 == 1) {
   //   Alert("Empty license KEY! Please enter the license KEY!");
   //   return;
  // }
  // if (gi_1492 == 2) {
   //   Alert("Invalid license KEY! Please enter a valid license KEY!");
  //    return;
  //}
  // if (gi_1492 == 3) {
  //    Alert("The license KEY has expired!");
  //    return;
  // }
   int ind_counted_0 = IndicatorCounted();
  // if (!IsDemo())
   //   if (AccountNumber() != Account) return (0);
   if (Lots > MaxLots) Lots = MaxLots;
   Comment("" 
      + "\n" 
      + "   Dance on market." 
      + "\n" 
      + "=====================" 
      + "\n" 
      + "Your Broker  : " + AccountCompany() 
      + "\n" 
      + "Server Time : " + TimeToStr(TimeCurrent(), TIME_DATE|TIME_SECONDS) 
      + "\n" 
      + "=====================" 
      + "\n" 
      + "Your Name    : " + AccountName() 
      + "\n" 
      + "Your Acc.No  : " + AccountNumber() 
      + "\n" 
      + "Acc Currency : " + AccountCurrency() 
      + "\n" 
      + "=====================" 
      + "\n" 
      + "Total Dancing Now : " + OrdersTotal() 
      + "\n" 
      + "=====================" 
      + "\n" 
      + "Your Balance : " + DoubleToStr(AccountBalance(), 2) 
      + "\n" 
      + "Your Equity   : " + DoubleToStr(AccountEquity(), 2) 
      + "\n" 
   + "=====================");
   int ind_counted_272 = IndicatorCounted();
   string text_276 = "";
   string text_284 = "";
   string text_292 = "";
   string text_300 = "";
   string text_308 = "";
   string text_316 = "";
   string text_324 = "";
   if (g_timeframe_1024 == PERIOD_M1) text_276 = "M1";
   if (g_timeframe_1024 == PERIOD_M5) text_276 = "M5";
   if (g_timeframe_1024 == PERIOD_M15) text_276 = "M15";
   if (g_timeframe_1024 == PERIOD_M30) text_276 = "M30";
   if (g_timeframe_1024 == PERIOD_H1) text_276 = "H1";
   if (g_timeframe_1024 == PERIOD_H4) text_276 = "H4";
   if (g_timeframe_1024 == PERIOD_D1) text_276 = "D1";
   if (g_timeframe_1024 == PERIOD_W1) text_276 = "W1";
   if (g_timeframe_1024 == PERIOD_MN1) text_276 = "MN";
   if (g_timeframe_1028 == PERIOD_M1) text_284 = "M1";
   if (g_timeframe_1028 == PERIOD_M5) text_284 = "M5";
   if (g_timeframe_1028 == PERIOD_M15) text_284 = "M15";
   if (g_timeframe_1028 == PERIOD_M30) text_284 = "M30";
   if (g_timeframe_1028 == PERIOD_H1) text_284 = "H1";
   if (g_timeframe_1028 == PERIOD_H4) text_284 = "H4";
   if (g_timeframe_1028 == PERIOD_D1) text_284 = "D1";
   if (g_timeframe_1028 == PERIOD_W1) text_284 = "W1";
   if (g_timeframe_1028 == PERIOD_MN1) text_284 = "MN";
   if (g_timeframe_1032 == PERIOD_M1) text_292 = "M1";
   if (g_timeframe_1032 == PERIOD_M5) text_292 = "M5";
   if (g_timeframe_1032 == PERIOD_M15) text_292 = "M15";
   if (g_timeframe_1032 == PERIOD_M30) text_292 = "M30";
   if (g_timeframe_1032 == PERIOD_H1) text_292 = "H1";
   if (g_timeframe_1032 == PERIOD_H4) text_292 = "H4";
   if (g_timeframe_1032 == PERIOD_D1) text_292 = "D1";
   if (g_timeframe_1032 == PERIOD_W1) text_292 = "W1";
   if (g_timeframe_1032 == PERIOD_MN1) text_292 = "MN";
   if (g_timeframe_1036 == PERIOD_M1) text_300 = "M1";
   if (g_timeframe_1036 == PERIOD_M5) text_300 = "M5";
   if (g_timeframe_1036 == PERIOD_M15) text_300 = "M15";
   if (g_timeframe_1036 == PERIOD_M30) text_300 = "M30";
   if (g_timeframe_1036 == PERIOD_H1) text_300 = "H1";
   if (g_timeframe_1036 == PERIOD_H4) text_300 = "H4";
   if (g_timeframe_1036 == PERIOD_D1) text_300 = "D1";
   if (g_timeframe_1036 == PERIOD_W1) text_300 = "W1";
   if (g_timeframe_1036 == PERIOD_MN1) text_300 = "MN";
   if (g_timeframe_1040 == PERIOD_M1) text_308 = "M1";
   if (g_timeframe_1040 == PERIOD_M5) text_308 = "M5";
   if (g_timeframe_1040 == PERIOD_M15) text_308 = "M15";
   if (g_timeframe_1040 == PERIOD_M30) text_308 = "M30";
   if (g_timeframe_1040 == PERIOD_H1) text_308 = "H1";
   if (g_timeframe_1040 == PERIOD_H4) text_308 = "H4";
   if (g_timeframe_1040 == PERIOD_D1) text_308 = "D1";
   if (g_timeframe_1040 == PERIOD_W1) text_308 = "W1";
   if (g_timeframe_1040 == PERIOD_MN1) text_308 = "MN";
   if (g_timeframe_1044 == PERIOD_M1) text_316 = "M1";
   if (g_timeframe_1044 == PERIOD_M5) text_316 = "M5";
   if (g_timeframe_1044 == PERIOD_M15) text_316 = "M15";
   if (g_timeframe_1044 == PERIOD_M30) text_316 = "M30";
   if (g_timeframe_1044 == PERIOD_H1) text_316 = "H1";
   if (g_timeframe_1044 == PERIOD_H4) text_316 = "H4";
   if (g_timeframe_1044 == PERIOD_D1) text_316 = "D1";
   if (g_timeframe_1044 == PERIOD_W1) text_316 = "W1";
   if (g_timeframe_1044 == PERIOD_MN1) text_316 = "MN";
   if (g_timeframe_1048 == PERIOD_M1) text_324 = "M1";
   if (g_timeframe_1048 == PERIOD_M5) text_324 = "M5";
   if (g_timeframe_1048 == PERIOD_M15) text_324 = "M15";
   if (g_timeframe_1048 == PERIOD_M30) text_324 = "M30";
   if (g_timeframe_1048 == PERIOD_H1) text_324 = "H1";
   if (g_timeframe_1048 == PERIOD_H4) text_324 = "H4";
   if (g_timeframe_1048 == PERIOD_D1) text_324 = "D1";
   if (g_timeframe_1048 == PERIOD_W1) text_324 = "W1";
   if (g_timeframe_1048 == PERIOD_MN1) text_324 = "MN";
   if (g_timeframe_1024 == PERIOD_M15) li_4 = -2;
   if (g_timeframe_1024 == PERIOD_M30) li_4 = -2;
   if (g_timeframe_1028 == PERIOD_M15) li_8 = -2;
   if (g_timeframe_1028 == PERIOD_M30) li_8 = -2;
   if (g_timeframe_1032 == PERIOD_M15) li_12 = -2;
   if (g_timeframe_1032 == PERIOD_M30) li_12 = -2;
   if (g_timeframe_1036 == PERIOD_M15) li_16 = -2;
   if (g_timeframe_1036 == PERIOD_M30) li_16 = -2;
   if (g_timeframe_1040 == PERIOD_M15) li_20 = -2;
   if (g_timeframe_1040 == PERIOD_M30) li_20 = -2;
   if (g_timeframe_1044 == PERIOD_M15) li_24 = -2;
   if (g_timeframe_1044 == PERIOD_M30) li_24 = -2;
   if (g_timeframe_1048 == PERIOD_M15) li_28 = -2;
   if (g_timeframe_1044 == PERIOD_M30) li_28 = -2;
   if (gi_1056 < 0) return (0);
   ObjectDelete("SIG_BARS_TF1");
   ObjectCreate("SIG_BARS_TF1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_BARS_TF1", text_276, 7, "Arial Bold", g_color_1080);
   ObjectSet("SIG_BARS_TF1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_BARS_TF1", OBJPROP_XDISTANCE, gi_1060 + 134 + li_4);
   ObjectSet("SIG_BARS_TF1", OBJPROP_YDISTANCE, gi_1056 + 25);
   ObjectDelete("SIG_BARS_TF2");
   ObjectCreate("SIG_BARS_TF2", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_BARS_TF2", text_284, 7, "Arial Bold", g_color_1080);
   ObjectSet("SIG_BARS_TF2", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_BARS_TF2", OBJPROP_XDISTANCE, gi_1060 + 114 + li_8);
   ObjectSet("SIG_BARS_TF2", OBJPROP_YDISTANCE, gi_1056 + 25);
   ObjectDelete("SIG_BARS_TF3");
   ObjectCreate("SIG_BARS_TF3", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_BARS_TF3", text_292, 7, "Arial Bold", g_color_1080);
   ObjectSet("SIG_BARS_TF3", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_BARS_TF3", OBJPROP_XDISTANCE, gi_1060 + 94 + li_12);
   ObjectSet("SIG_BARS_TF3", OBJPROP_YDISTANCE, gi_1056 + 25);
   ObjectDelete("SIG_BARS_TF4");
   ObjectCreate("SIG_BARS_TF4", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_BARS_TF4", text_300, 7, "Arial Bold", g_color_1080);
   ObjectSet("SIG_BARS_TF4", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_BARS_TF4", OBJPROP_XDISTANCE, gi_1060 + 74 + li_16);
   ObjectSet("SIG_BARS_TF4", OBJPROP_YDISTANCE, gi_1056 + 25);
   ObjectDelete("SIG_BARS_TF5");
   ObjectCreate("SIG_BARS_TF5", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_BARS_TF5", text_308, 7, "Arial Bold", g_color_1080);
   ObjectSet("SIG_BARS_TF5", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_BARS_TF5", OBJPROP_XDISTANCE, gi_1060 + 54 + li_20);
   ObjectSet("SIG_BARS_TF5", OBJPROP_YDISTANCE, gi_1056 + 25);
   ObjectDelete("SIG_BARS_TF6");
   ObjectCreate("SIG_BARS_TF6", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_BARS_TF6", text_316, 7, "Arial Bold", g_color_1080);
   ObjectSet("SIG_BARS_TF6", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_BARS_TF6", OBJPROP_XDISTANCE, gi_1060 + 34 + li_24);
   ObjectSet("SIG_BARS_TF6", OBJPROP_YDISTANCE, gi_1056 + 25);
   ObjectDelete("SIG_BARS_TF7");
   ObjectCreate("SIG_BARS_TF7", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_BARS_TF7", text_324, 7, "Arial Bold", g_color_1080);
   ObjectSet("SIG_BARS_TF7", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_BARS_TF7", OBJPROP_XDISTANCE, gi_1060 + 14 + li_28);
   ObjectSet("SIG_BARS_TF7", OBJPROP_YDISTANCE, gi_1056 + 25);
   string text_332 = "";
   string text_340 = "";
   string text_348 = "";
   string text_356 = "";
   string text_364 = "";
   string text_372 = "";
   string text_380 = "";
   string ls_unused_388 = "";
   string ls_unused_396 = "";
   double imacd_404 = iMACD(NULL, g_timeframe_1024, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_MAIN, 0);
   double imacd_412 = iMACD(NULL, g_timeframe_1024, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_SIGNAL, 0);
   double imacd_420 = iMACD(NULL, g_timeframe_1028, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_MAIN, 0);
   double imacd_428 = iMACD(NULL, g_timeframe_1028, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_SIGNAL, 0);
   double imacd_436 = iMACD(NULL, g_timeframe_1032, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_MAIN, 0);
   double imacd_444 = iMACD(NULL, g_timeframe_1032, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_SIGNAL, 0);
   double imacd_452 = iMACD(NULL, g_timeframe_1036, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_MAIN, 0);
   double imacd_460 = iMACD(NULL, g_timeframe_1036, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_SIGNAL, 0);
   double imacd_468 = iMACD(NULL, g_timeframe_1040, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_MAIN, 0);
   double imacd_476 = iMACD(NULL, g_timeframe_1040, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_SIGNAL, 0);
   double imacd_484 = iMACD(NULL, g_timeframe_1044, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_MAIN, 0);
   double imacd_492 = iMACD(NULL, g_timeframe_1044, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_SIGNAL, 0);
   double imacd_500 = iMACD(NULL, g_timeframe_1048, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_MAIN, 0);
   double imacd_508 = iMACD(NULL, g_timeframe_1048, g_period_1128, g_period_1132, g_period_1136, g_applied_price_1140, MODE_SIGNAL, 0);
   if (imacd_404 > imacd_412) {
      text_356 = "-";
      color_44 = g_color_1152;
   }
   if (imacd_404 <= imacd_412) {
      text_356 = "-";
      color_44 = g_color_1148;
   }
   if (imacd_404 > imacd_412 && imacd_404 > 0.0) {
      text_356 = "-";
      color_44 = g_color_1144;
   }
   if (imacd_404 <= imacd_412 && imacd_404 < 0.0) {
      text_356 = "-";
      color_44 = g_color_1156;
   }
   if (imacd_420 > imacd_428) {
      text_364 = "-";
      color_48 = g_color_1152;
   }
   if (imacd_420 <= imacd_428) {
      text_364 = "-";
      color_48 = g_color_1148;
   }
   if (imacd_420 > imacd_428 && imacd_420 > 0.0) {
      text_364 = "-";
      color_48 = g_color_1144;
   }
   if (imacd_420 <= imacd_428 && imacd_420 < 0.0) {
      text_364 = "-";
      color_48 = g_color_1156;
   }
   if (imacd_436 > imacd_444) {
      text_372 = "-";
      color_52 = g_color_1152;
   }
   if (imacd_436 <= imacd_444) {
      text_372 = "-";
      color_52 = g_color_1148;
   }
   if (imacd_436 > imacd_444 && imacd_436 > 0.0) {
      text_372 = "-";
      color_52 = g_color_1144;
   }
   if (imacd_436 <= imacd_444 && imacd_436 < 0.0) {
      text_372 = "-";
      color_52 = g_color_1156;
   }
   if (imacd_452 > imacd_460) {
      text_380 = "-";
      color_56 = g_color_1152;
   }
   if (imacd_452 <= imacd_460) {
      text_380 = "-";
      color_56 = g_color_1148;
   }
   if (imacd_452 > imacd_460 && imacd_452 > 0.0) {
      text_380 = "-";
      color_56 = g_color_1144;
   }
   if (imacd_452 <= imacd_460 && imacd_452 < 0.0) {
      text_380 = "-";
      color_56 = g_color_1156;
   }
   if (imacd_468 > imacd_476) {
      text_340 = "-";
      color_36 = g_color_1152;
   }
   if (imacd_468 <= imacd_476) {
      text_340 = "-";
      color_36 = g_color_1148;
   }
   if (imacd_468 > imacd_476 && imacd_468 > 0.0) {
      text_340 = "-";
      color_36 = g_color_1144;
   }
   if (imacd_468 <= imacd_476 && imacd_468 < 0.0) {
      text_340 = "-";
      color_36 = g_color_1156;
   }
   if (imacd_484 > imacd_492) {
      text_348 = "-";
      color_40 = g_color_1152;
   }
   if (imacd_484 <= imacd_492) {
      text_348 = "-";
      color_40 = g_color_1148;
   }
   if (imacd_484 > imacd_492 && imacd_484 > 0.0) {
      text_348 = "-";
      color_40 = g_color_1144;
   }
   if (imacd_484 <= imacd_492 && imacd_484 < 0.0) {
      text_348 = "-";
      color_40 = g_color_1156;
   }
   if (imacd_500 > imacd_508) {
      text_332 = "-";
      color_32 = g_color_1152;
   }
   if (imacd_500 <= imacd_508) {
      text_332 = "-";
      color_32 = g_color_1148;
   }
   if (imacd_500 > imacd_508 && imacd_500 > 0.0) {
      text_332 = "-";
      color_32 = g_color_1144;
   }
   if (imacd_500 <= imacd_508 && imacd_500 < 0.0) {
      text_332 = "-";
      color_32 = g_color_1156;
   }
   ObjectDelete("SSignalMACD_TEXT");
   ObjectCreate("SSignalMACD_TEXT", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SSignalMACD_TEXT", "MACD", 6, "Tahoma Narrow", g_color_1084);
   ObjectSet("SSignalMACD_TEXT", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SSignalMACD_TEXT", OBJPROP_XDISTANCE, gi_1060 + 153);
   ObjectSet("SSignalMACD_TEXT", OBJPROP_YDISTANCE, gi_1056 + 35);
   ObjectDelete("SSignalMACDM1");
   ObjectCreate("SSignalMACDM1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SSignalMACDM1", text_356, 45, "Tahoma Narrow", color_44);
   ObjectSet("SSignalMACDM1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SSignalMACDM1", OBJPROP_XDISTANCE, gi_1060 + 130);
   ObjectSet("SSignalMACDM1", OBJPROP_YDISTANCE, gi_1056 + 2);
   ObjectDelete("SSignalMACDM5");
   ObjectCreate("SSignalMACDM5", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SSignalMACDM5", text_364, 45, "Tahoma Narrow", color_48);
   ObjectSet("SSignalMACDM5", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SSignalMACDM5", OBJPROP_XDISTANCE, gi_1060 + 110);
   ObjectSet("SSignalMACDM5", OBJPROP_YDISTANCE, gi_1056 + 2);
   ObjectDelete("SSignalMACDM15");
   ObjectCreate("SSignalMACDM15", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SSignalMACDM15", text_372, 45, "Tahoma Narrow", color_52);
   ObjectSet("SSignalMACDM15", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SSignalMACDM15", OBJPROP_XDISTANCE, gi_1060 + 90);
   ObjectSet("SSignalMACDM15", OBJPROP_YDISTANCE, gi_1056 + 2);
   ObjectDelete("SSignalMACDM30");
   ObjectCreate("SSignalMACDM30", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SSignalMACDM30", text_380, 45, "Tahoma Narrow", color_56);
   ObjectSet("SSignalMACDM30", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SSignalMACDM30", OBJPROP_XDISTANCE, gi_1060 + 70);
   ObjectSet("SSignalMACDM30", OBJPROP_YDISTANCE, gi_1056 + 2);
   ObjectDelete("SSignalMACDH1");
   ObjectCreate("SSignalMACDH1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SSignalMACDH1", text_340, 45, "Tahoma Narrow", color_36);
   ObjectSet("SSignalMACDH1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SSignalMACDH1", OBJPROP_XDISTANCE, gi_1060 + 50);
   ObjectSet("SSignalMACDH1", OBJPROP_YDISTANCE, gi_1056 + 2);
   ObjectDelete("SSignalMACDH4");
   ObjectCreate("SSignalMACDH4", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SSignalMACDH4", text_348, 45, "Tahoma Narrow", color_40);
   ObjectSet("SSignalMACDH4", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SSignalMACDH4", OBJPROP_XDISTANCE, gi_1060 + 30);
   ObjectSet("SSignalMACDH4", OBJPROP_YDISTANCE, gi_1056 + 2);
   ObjectDelete("SSignalMACDD1");
   ObjectCreate("SSignalMACDD1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SSignalMACDD1", text_332, 45, "Tahoma Narrow", color_32);
   ObjectSet("SSignalMACDD1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SSignalMACDD1", OBJPROP_XDISTANCE, gi_1060 + 10);
   ObjectSet("SSignalMACDD1", OBJPROP_YDISTANCE, gi_1056 + 2);
   double irsi_516 = iRSI(NULL, g_timeframe_1048, g_period_1176, g_applied_price_1180, 0);
   double irsi_524 = iRSI(NULL, g_timeframe_1044, g_period_1176, g_applied_price_1180, 0);
   double irsi_532 = iRSI(NULL, g_timeframe_1040, g_period_1176, g_applied_price_1180, 0);
   double irsi_540 = iRSI(NULL, g_timeframe_1036, g_period_1176, g_applied_price_1180, 0);
   double irsi_548 = iRSI(NULL, g_timeframe_1032, g_period_1176, g_applied_price_1180, 0);
   double irsi_556 = iRSI(NULL, g_timeframe_1028, g_period_1176, g_applied_price_1180, 0);
   double irsi_564 = iRSI(NULL, g_timeframe_1024, g_period_1176, g_applied_price_1180, 0);
   double istochastic_572 = iStochastic(NULL, g_timeframe_1048, g_period_1208, g_period_1212, g_slowing_1216, g_ma_method_1220, 0, MODE_MAIN, 0);
   double istochastic_580 = iStochastic(NULL, g_timeframe_1044, g_period_1208, g_period_1212, g_slowing_1216, g_ma_method_1220, 0, MODE_MAIN, 0);
   double istochastic_588 = iStochastic(NULL, g_timeframe_1040, g_period_1208, g_period_1212, g_slowing_1216, g_ma_method_1220, 0, MODE_MAIN, 0);
   double istochastic_596 = iStochastic(NULL, g_timeframe_1036, g_period_1208, g_period_1212, g_slowing_1216, g_ma_method_1220, 0, MODE_MAIN, 0);
   double istochastic_604 = iStochastic(NULL, g_timeframe_1032, g_period_1208, g_period_1212, g_slowing_1216, g_ma_method_1220, 0, MODE_MAIN, 0);
   double istochastic_612 = iStochastic(NULL, g_timeframe_1028, g_period_1208, g_period_1212, g_slowing_1216, g_ma_method_1220, 0, MODE_MAIN, 0);
   double istochastic_620 = iStochastic(NULL, g_timeframe_1024, g_period_1208, g_period_1212, g_slowing_1216, g_ma_method_1220, 0, MODE_MAIN, 0);
   double icci_628 = iCCI(NULL, g_timeframe_1048, g_period_1192, g_applied_price_1196, 0);
   double icci_636 = iCCI(NULL, g_timeframe_1044, g_period_1192, g_applied_price_1196, 0);
   double icci_644 = iCCI(NULL, g_timeframe_1040, g_period_1192, g_applied_price_1196, 0);
   double icci_652 = iCCI(NULL, g_timeframe_1036, g_period_1192, g_applied_price_1196, 0);
   double icci_660 = iCCI(NULL, g_timeframe_1032, g_period_1192, g_applied_price_1196, 0);
   double icci_668 = iCCI(NULL, g_timeframe_1028, g_period_1192, g_applied_price_1196, 0);
   double icci_676 = iCCI(NULL, g_timeframe_1024, g_period_1192, g_applied_price_1196, 0);
   string text_684 = "";
   string text_692 = "";
   string text_700 = "";
   string text_708 = "";
   string text_716 = "";
   string text_724 = "";
   string text_732 = "";
   string ls_unused_740 = "";
   string ls_unused_748 = "";
   text_732 = "-";
   color color_756 = g_color_1240;
   text_716 = "-";
   color color_760 = g_color_1240;
   text_684 = "-";
   color color_764 = g_color_1240;
   text_724 = "-";
   color color_768 = g_color_1240;
   text_692 = "-";
   color color_772 = g_color_1240;
   text_700 = "-";
   color color_776 = g_color_1240;
   text_708 = "-";
   color color_780 = g_color_1240;
   if (irsi_516 > 50.0 && istochastic_572 > 40.0 && icci_628 > 0.0) {
      text_732 = "-";
      color_756 = g_color_1232;
   }
   if (irsi_524 > 50.0 && istochastic_580 > 40.0 && icci_636 > 0.0) {
      text_716 = "-";
      color_760 = g_color_1232;
   }
   if (irsi_532 > 50.0 && istochastic_588 > 40.0 && icci_644 > 0.0) {
      text_684 = "-";
      color_764 = g_color_1232;
   }
   if (irsi_540 > 50.0 && istochastic_596 > 40.0 && icci_652 > 0.0) {
      text_724 = "-";
      color_768 = g_color_1232;
   }
   if (irsi_548 > 50.0 && istochastic_604 > 40.0 && icci_660 > 0.0) {
      text_692 = "-";
      color_772 = g_color_1232;
   }
   if (irsi_556 > 50.0 && istochastic_612 > 40.0 && icci_668 > 0.0) {
      text_700 = "-";
      color_776 = g_color_1232;
   }
   if (irsi_564 > 50.0 && istochastic_620 > 40.0 && icci_676 > 0.0) {
      text_708 = "-";
      color_780 = g_color_1232;
   }
   if (irsi_516 < 50.0 && istochastic_572 < 60.0 && icci_628 < 0.0) {
      text_732 = "-";
      color_756 = g_color_1236;
   }
   if (irsi_524 < 50.0 && istochastic_580 < 60.0 && icci_636 < 0.0) {
      text_716 = "-";
      color_760 = g_color_1236;
   }
   if (irsi_532 < 50.0 && istochastic_588 < 60.0 && icci_644 < 0.0) {
      text_684 = "-";
      color_764 = g_color_1236;
   }
   if (irsi_540 < 50.0 && istochastic_596 < 60.0 && icci_652 < 0.0) {
      text_724 = "-";
      color_768 = g_color_1236;
   }
   if (irsi_548 < 50.0 && istochastic_604 < 60.0 && icci_660 < 0.0) {
      text_692 = "-";
      color_772 = g_color_1236;
   }
   if (irsi_556 < 50.0 && istochastic_612 < 60.0 && icci_668 < 0.0) {
      text_700 = "-";
      color_776 = g_color_1236;
   }
   if (irsi_564 < 50.0 && istochastic_620 < 60.0 && icci_676 < 0.0) {
      text_708 = "-";
      color_780 = g_color_1236;
   }
   ObjectDelete("SSignalSTR_TEXT");
   ObjectCreate("SSignalSTR_TEXT", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SSignalSTR_TEXT", "STR", 6, "Tahoma Narrow", g_color_1084);
   ObjectSet("SSignalSTR_TEXT", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SSignalSTR_TEXT", OBJPROP_XDISTANCE, gi_1060 + 153);
   ObjectSet("SSignalSTR_TEXT", OBJPROP_YDISTANCE, gi_1056 + 43);
   ObjectDelete("SignalSTRM1");
   ObjectCreate("SignalSTRM1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalSTRM1", text_708, 45, "Tahoma Narrow", color_780);
   ObjectSet("SignalSTRM1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalSTRM1", OBJPROP_XDISTANCE, gi_1060 + 130);
   ObjectSet("SignalSTRM1", OBJPROP_YDISTANCE, gi_1056 + 10);
   ObjectDelete("SignalSTRM5");
   ObjectCreate("SignalSTRM5", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalSTRM5", text_700, 45, "Tahoma Narrow", color_776);
   ObjectSet("SignalSTRM5", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalSTRM5", OBJPROP_XDISTANCE, gi_1060 + 110);
   ObjectSet("SignalSTRM5", OBJPROP_YDISTANCE, gi_1056 + 10);
   ObjectDelete("SignalSTRM15");
   ObjectCreate("SignalSTRM15", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalSTRM15", text_692, 45, "Tahoma Narrow", color_772);
   ObjectSet("SignalSTRM15", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalSTRM15", OBJPROP_XDISTANCE, gi_1060 + 90);
   ObjectSet("SignalSTRM15", OBJPROP_YDISTANCE, gi_1056 + 10);
   ObjectDelete("SignalSTRM30");
   ObjectCreate("SignalSTRM30", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalSTRM30", text_724, 45, "Tahoma Narrow", color_768);
   ObjectSet("SignalSTRM30", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalSTRM30", OBJPROP_XDISTANCE, gi_1060 + 70);
   ObjectSet("SignalSTRM30", OBJPROP_YDISTANCE, gi_1056 + 10);
   ObjectDelete("SignalSTRH1");
   ObjectCreate("SignalSTRH1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalSTRH1", text_684, 45, "Tahoma Narrow", color_764);
   ObjectSet("SignalSTRH1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalSTRH1", OBJPROP_XDISTANCE, gi_1060 + 50);
   ObjectSet("SignalSTRH1", OBJPROP_YDISTANCE, gi_1056 + 10);
   ObjectDelete("SignalSTRH4");
   ObjectCreate("SignalSTRH4", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalSTRH4", text_716, 45, "Tahoma Narrow", color_760);
   ObjectSet("SignalSTRH4", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalSTRH4", OBJPROP_XDISTANCE, gi_1060 + 30);
   ObjectSet("SignalSTRH4", OBJPROP_YDISTANCE, gi_1056 + 10);
   ObjectDelete("SignalSTRD1");
   ObjectCreate("SignalSTRD1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalSTRD1", text_732, 45, "Tahoma Narrow", color_756);
   ObjectSet("SignalSTRD1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalSTRD1", OBJPROP_XDISTANCE, gi_1060 + 10);
   ObjectSet("SignalSTRD1", OBJPROP_YDISTANCE, gi_1056 + 10);
   double ima_784 = iMA(Symbol(), g_timeframe_1024, g_period_1252, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_792 = iMA(Symbol(), g_timeframe_1024, g_period_1256, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_800 = iMA(Symbol(), g_timeframe_1028, g_period_1252, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_808 = iMA(Symbol(), g_timeframe_1028, g_period_1256, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_816 = iMA(Symbol(), g_timeframe_1032, g_period_1252, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_824 = iMA(Symbol(), g_timeframe_1032, g_period_1256, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_832 = iMA(Symbol(), g_timeframe_1036, g_period_1252, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_840 = iMA(Symbol(), g_timeframe_1036, g_period_1256, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_848 = iMA(Symbol(), g_timeframe_1040, g_period_1252, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_856 = iMA(Symbol(), g_timeframe_1040, g_period_1256, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_864 = iMA(Symbol(), g_timeframe_1044, g_period_1252, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_872 = iMA(Symbol(), g_timeframe_1044, g_period_1256, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_880 = iMA(Symbol(), g_timeframe_1048, g_period_1252, 0, g_ma_method_1260, g_applied_price_1264, 0);
   double ima_888 = iMA(Symbol(), g_timeframe_1048, g_period_1256, 0, g_ma_method_1260, g_applied_price_1264, 0);
   string text_896 = "";
   string text_904 = "";
   string text_912 = "";
   string text_920 = "";
   string text_928 = "";
   string text_936 = "";
   string text_944 = "";
   string ls_unused_952 = "";
   string ls_unused_960 = "";
   if (ima_784 > ima_792) {
      text_896 = "-";
      color_68 = g_color_1276;
   }
   if (ima_784 <= ima_792) {
      text_896 = "-";
      color_68 = g_color_1280;
   }
   if (ima_800 > ima_808) {
      text_904 = "-";
      color_72 = g_color_1276;
   }
   if (ima_800 <= ima_808) {
      text_904 = "-";
      color_72 = g_color_1280;
   }
   if (ima_816 > ima_824) {
      text_912 = "-";
      color_76 = g_color_1276;
   }
   if (ima_816 <= ima_824) {
      text_912 = "-";
      color_76 = g_color_1280;
   }
   if (ima_832 > ima_840) {
      text_920 = "-";
      color_80 = g_color_1276;
   }
   if (ima_832 <= ima_840) {
      text_920 = "-";
      color_80 = g_color_1280;
   }
   if (ima_848 > ima_856) {
      text_928 = "-";
      color_84 = g_color_1276;
   }
   if (ima_848 <= ima_856) {
      text_928 = "-";
      color_84 = g_color_1280;
   }
   if (ima_864 > ima_872) {
      text_936 = "-";
      color_88 = g_color_1276;
   }
   if (ima_864 <= ima_872) {
      text_936 = "-";
      color_88 = g_color_1280;
   }
   if (ima_880 > ima_888) {
      text_944 = "-";
      color_92 = g_color_1276;
   }
   if (ima_880 <= ima_888) {
      text_944 = "-";
      color_92 = g_color_1280;
   }
   ObjectDelete("SignalEMA_TEXT");
   ObjectCreate("SignalEMA_TEXT", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalEMA_TEXT", "EMA", 6, "Tahoma Narrow", g_color_1084);
   ObjectSet("SignalEMA_TEXT", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalEMA_TEXT", OBJPROP_XDISTANCE, gi_1060 + 153);
   ObjectSet("SignalEMA_TEXT", OBJPROP_YDISTANCE, gi_1056 + 51);
   ObjectDelete("SignalEMAM1");
   ObjectCreate("SignalEMAM1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalEMAM1", text_896, 45, "Tahoma Narrow", color_68);
   ObjectSet("SignalEMAM1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalEMAM1", OBJPROP_XDISTANCE, gi_1060 + 130);
   ObjectSet("SignalEMAM1", OBJPROP_YDISTANCE, gi_1056 + 18);
   ObjectDelete("SignalEMAM5");
   ObjectCreate("SignalEMAM5", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalEMAM5", text_904, 45, "Tahoma Narrow", color_72);
   ObjectSet("SignalEMAM5", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalEMAM5", OBJPROP_XDISTANCE, gi_1060 + 110);
   ObjectSet("SignalEMAM5", OBJPROP_YDISTANCE, gi_1056 + 18);
   ObjectDelete("SignalEMAM15");
   ObjectCreate("SignalEMAM15", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalEMAM15", text_912, 45, "Tahoma Narrow", color_76);
   ObjectSet("SignalEMAM15", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalEMAM15", OBJPROP_XDISTANCE, gi_1060 + 90);
   ObjectSet("SignalEMAM15", OBJPROP_YDISTANCE, gi_1056 + 18);
   ObjectDelete("SignalEMAM30");
   ObjectCreate("SignalEMAM30", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalEMAM30", text_920, 45, "Tahoma Narrow", color_80);
   ObjectSet("SignalEMAM30", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalEMAM30", OBJPROP_XDISTANCE, gi_1060 + 70);
   ObjectSet("SignalEMAM30", OBJPROP_YDISTANCE, gi_1056 + 18);
   ObjectDelete("SignalEMAH1");
   ObjectCreate("SignalEMAH1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalEMAH1", text_928, 45, "Tahoma Narrow", color_84);
   ObjectSet("SignalEMAH1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalEMAH1", OBJPROP_XDISTANCE, gi_1060 + 50);
   ObjectSet("SignalEMAH1", OBJPROP_YDISTANCE, gi_1056 + 18);
   ObjectDelete("SignalEMAH4");
   ObjectCreate("SignalEMAH4", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalEMAH4", text_936, 45, "Tahoma Narrow", color_88);
   ObjectSet("SignalEMAH4", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalEMAH4", OBJPROP_XDISTANCE, gi_1060 + 30);
   ObjectSet("SignalEMAH4", OBJPROP_YDISTANCE, gi_1056 + 18);
   ObjectDelete("SignalEMAD1");
   ObjectCreate("SignalEMAD1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SignalEMAD1", text_944, 45, "Tahoma Narrow", color_92);
   ObjectSet("SignalEMAD1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SignalEMAD1", OBJPROP_XDISTANCE, gi_1060 + 10);
   ObjectSet("SignalEMAD1", OBJPROP_YDISTANCE, gi_1056 + 18);
   double ld_968 = NormalizeDouble(MarketInfo(Symbol(), MODE_BID), Digits);
   double ima_976 = iMA(Symbol(), PERIOD_M1, 1, 0, MODE_EMA, PRICE_CLOSE, 1);
   string ls_unused_984 = "";
   if (ima_976 > ld_968) {
      ls_unused_984 = "";
      color_96 = g_color_1120;
   }
   if (ima_976 < ld_968) {
      ls_unused_984 = "";
      color_96 = g_color_1116;
   }
   if (ima_976 == ld_968) {
      ls_unused_984 = "";
      color_96 = g_color_1124;
   }
   ObjectDelete("cja");
   ObjectCreate("cja", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("cja", "cja", 8, "Tahoma Narrow", DimGray);
   ObjectSet("cja", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("cja", OBJPROP_XDISTANCE, gi_1060 + 153);
   ObjectSet("cja", OBJPROP_YDISTANCE, gi_1056 + 23);
   if (gi_1076 == FALSE) {
      if (gi_1068 == TRUE) {
         ObjectDelete("Signalprice");
         ObjectCreate("Signalprice", OBJ_LABEL, g_window_1064, 0, 0);
         ObjectSetText("Signalprice", DoubleToStr(ld_968, Digits), 35, "Arial", color_96);
         ObjectSet("Signalprice", OBJPROP_CORNER, g_corner_1052);
         ObjectSet("Signalprice", OBJPROP_XDISTANCE, gi_1060 + 10);
         ObjectSet("Signalprice", OBJPROP_YDISTANCE, gi_1056 + 56);
      }
   }
   if (gi_1076 == TRUE) {
      if (gi_1068 == TRUE) {
         ObjectDelete("Signalprice");
         ObjectCreate("Signalprice", OBJ_LABEL, g_window_1064, 0, 0);
         ObjectSetText("Signalprice", DoubleToStr(ld_968, Digits), 15, "Arial", color_96);
         ObjectSet("Signalprice", OBJPROP_CORNER, g_corner_1052);
         ObjectSet("Signalprice", OBJPROP_XDISTANCE, gi_1060 + 10);
         ObjectSet("Signalprice", OBJPROP_YDISTANCE, gi_1056 + 60);
      }
   }
   int li_992 = 0;
   int li_996 = 0;
   int li_1000 = 0;
   int li_1004 = 0;
   int li_1008 = 0;
   int li_1012 = 0;
   li_992 = (iHigh(NULL, PERIOD_D1, 1) - iLow(NULL, PERIOD_D1, 1)) / Point;
   for (li_1012 = 1; li_1012 <= 5; li_1012++) li_996 = li_996 + (iHigh(NULL, PERIOD_D1, li_1012) - iLow(NULL, PERIOD_D1, li_1012)) / Point;
   for (li_1012 = 1; li_1012 <= 10; li_1012++) li_1000 = li_1000 + (iHigh(NULL, PERIOD_D1, li_1012) - iLow(NULL, PERIOD_D1, li_1012)) / Point;
   for (li_1012 = 1; li_1012 <= 20; li_1012++) li_1004 = li_1004 + (iHigh(NULL, PERIOD_D1, li_1012) - iLow(NULL, PERIOD_D1, li_1012)) / Point;
   li_996 /= 5;
   li_1000 /= 10;
   li_1004 /= 20;
   li_1008 = (li_992 + li_996 + li_1000 + li_1004) / 4;
   string ls_unused_1016 = "";
   string ls_unused_1024 = "";
   string dbl2str_1032 = "";
   string dbl2str_1040 = "";
   string dbl2str_1048 = "";
   string dbl2str_1056 = "";
   string ls_unused_1064 = "";
   string ls_unused_1072 = "";
   string ls_1080 = "";
   double iopen_1088 = iOpen(NULL, PERIOD_D1, 0);
   double iclose_1096 = iClose(NULL, PERIOD_D1, 0);
   double ld_1104 = (Ask - Bid) / Point;
   double ihigh_1112 = iHigh(NULL, PERIOD_D1, 0);
   double ilow_1120 = iLow(NULL, PERIOD_D1, 0);
   dbl2str_1040 = DoubleToStr((iclose_1096 - iopen_1088) / Point, 0);
   dbl2str_1032 = DoubleToStr(ld_1104, Digits - 4);
   dbl2str_1048 = DoubleToStr(li_1008, Digits - 4);
   ls_1080 = (iHigh(NULL, PERIOD_D1, 1) - iLow(NULL, PERIOD_D1, 1)) / Point;
   dbl2str_1056 = DoubleToStr((ihigh_1112 - ilow_1120) / Point, 0);
   if (iclose_1096 >= iopen_1088) {
      ls_unused_1064 = "-";
      color_108 = g_color_1100;
   }
   if (iclose_1096 < iopen_1088) {
      ls_unused_1064 = "-";
      color_108 = g_color_1104;
   }
   if (dbl2str_1048 >= ls_1080) {
      ls_unused_1072 = "-";
      li_unused_112 = gi_1108;
   }
   if (dbl2str_1048 < ls_1080) {
      ls_unused_1072 = "-";
      li_unused_112 = gi_1112;
   }
   ObjectDelete("SIG_DETAIL_1");
   ObjectCreate("SIG_DETAIL_1", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_DETAIL_1", "Spread", 14, "Times New Roman", g_color_1088);
   ObjectSet("SIG_DETAIL_1", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_DETAIL_1", OBJPROP_XDISTANCE, gi_1060 + 65);
   ObjectSet("SIG_DETAIL_1", OBJPROP_YDISTANCE, gi_1056 + 100);
   ObjectDelete("SIG_DETAIL_2");
   ObjectCreate("SIG_DETAIL_2", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_DETAIL_2", "" + dbl2str_1032 + "", 14, "Times New Roman", g_color_1092);
   ObjectSet("SIG_DETAIL_2", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_DETAIL_2", OBJPROP_XDISTANCE, gi_1060 + 10);
   ObjectSet("SIG_DETAIL_2", OBJPROP_YDISTANCE, gi_1056 + 100);
   ObjectDelete("SIG_DETAIL_3");
   ObjectCreate("SIG_DETAIL_3", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_DETAIL_3", "Volatility Ratio", 14, "Times New Roman", g_color_1088);
   ObjectSet("SIG_DETAIL_3", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_DETAIL_3", OBJPROP_XDISTANCE, gi_1060 + 65);
   ObjectSet("SIG_DETAIL_3", OBJPROP_YDISTANCE, gi_1056 + 115);
   ObjectDelete("SIG_DETAIL_4");
   ObjectCreate("SIG_DETAIL_4", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_DETAIL_4", "" + dbl2str_1040 + "", 14, "Times New Roman", color_108);
   ObjectSet("SIG_DETAIL_4", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_DETAIL_4", OBJPROP_XDISTANCE, gi_1060 + 10);
   ObjectSet("SIG_DETAIL_4", OBJPROP_YDISTANCE, gi_1056 + 115);
   ObjectDelete("SIG_DETAIL_5");
   ObjectCreate("SIG_DETAIL_5", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_DETAIL_5", "     ", 14, "Times New Roman", g_color_1088);
   ObjectSet("SIG_DETAIL_5", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_DETAIL_5", OBJPROP_XDISTANCE, gi_1060 + 45);
   ObjectSet("SIG_DETAIL_5", OBJPROP_YDISTANCE, gi_1056 + 130);
   ObjectDelete("SIG_DETAIL_6");
   ObjectCreate("SIG_DETAIL_6", OBJ_LABEL, g_window_1064, 0, 0);
   ObjectSetText("SIG_DETAIL_6", "Lets Dance on Market", 14, "Aial Narrow", DeepSkyBlue);
   ObjectSet("SIG_DETAIL_6", OBJPROP_CORNER, g_corner_1052);
   ObjectSet("SIG_DETAIL_6", OBJPROP_XDISTANCE, gi_1060 + 10);
   ObjectSet("SIG_DETAIL_6", OBJPROP_YDISTANCE, gi_1056 + 130);
   double ld_1160 = LotExponent;
   int li_1168 = gi_108;
   double ld_1172 = TakeProfit;
   bool bool_1180 = UseEquityStop;
   double ld_1184 = TotalEquityRisk;
   if (MM == TRUE) {
      if (MathCeil(AccountBalance()) < 2000.0) ld_1192 = Lots;
      else ld_1192 = 0.00001 * MathCeil(AccountBalance());
   } else ld_1192 = Lots;
   if ((CloseFriday == TRUE && DayOfWeek() == 5 && TimeCurrent() >= StrToTime(CloseFridayHour + ":00")) || (OpenMondey == TRUE && DayOfWeek() == 1 && TimeCurrent() <= StrToTime(OpenMondeyHour +
      ":00"))) return (0);
   if (UseTrailingStop_Hilo) f0_35(TrailStart_Hilo, TrailStop_Hilo, g_price_312);
   if (gi_220) {
      if (TimeCurrent() >= gi_376) {
         f0_24();
         Print("Closed All due_Hilo to TimeOut");
      }
   }
   if (gi_372 == Time[0]) return (0);
   gi_372 = Time[0];
   double ld_1200 = f0_31();
   if (bool_1180) {
      if (ld_1200 < 0.0 && MathAbs(ld_1200) > ld_1184 / 100.0 * f0_7()) {
         f0_24();
         Print("Closed All due_Hilo to Stop Out");
         gi_424 = FALSE;
      }
   }
   gi_396 = f0_4();
   if (gi_396 == 0) gi_360 = FALSE;
   for (g_pos_392 = OrdersTotal() - 1; g_pos_392 >= 0; g_pos_392--) {
      OrderSelect(g_pos_392, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber_Hilo) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo) {
         if (OrderType() == OP_BUY) {
            gi_412 = TRUE;
            gi_416 = FALSE;
            break;
         }
      }
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo) {
         if (OrderType() == OP_SELL) {
            gi_412 = FALSE;
            gi_416 = TRUE;
            break;
         }
      }
   }
   if (gi_396 > 0 && gi_396 <= MaxTrades_Hilo) {
      RefreshRates();
      gd_336 = f0_32();
      gd_344 = f0_20();
      if (gi_412 && gd_336 - Ask >= PipStep_Hilo * Point) gi_408 = TRUE;
      if (gi_416 && Bid - gd_344 >= PipStep_Hilo * Point) gi_408 = TRUE;
   }
   if (gi_396 < 1) {
      gi_416 = FALSE;
      gi_412 = FALSE;
      gi_408 = TRUE;
      gd_288 = AccountEquity();
   }
   if (gi_408) {
      gd_336 = f0_32();
      gd_344 = f0_20();
      if (gi_416) {
         gi_380 = gi_396;
         gd_384 = NormalizeDouble(ld_1192 * MathPow(ld_1160, gi_380), li_1168);
         RefreshRates();
         gi_420 = f0_3(1, gd_384, Bid, slip_Hilo, Ask, 0, 0, gs_364 + "-" + gi_380, MagicNumber_Hilo, 0, HotPink);
         if (gi_420 < 0) {
            Print("Error: ", GetLastError());
            return (0);
         }
         gd_344 = f0_20();
         gi_408 = FALSE;
         gi_424 = TRUE;
      } else {
         if (gi_412) {
            gi_380 = gi_396;
            gd_384 = NormalizeDouble(ld_1192 * MathPow(ld_1160, gi_380), li_1168);
            gi_420 = f0_3(0, gd_384, Ask, slip_Hilo, Bid, 0, 0, gs_364 + "-" + gi_380, MagicNumber_Hilo, 0, Lime);
            if (gi_420 < 0) {
               Print("Error: ", GetLastError());
               return (0);
            }
            gd_336 = f0_32();
            gi_408 = FALSE;
            gi_424 = TRUE;
         }
      }
   }
   if (gi_408 && gi_396 < 1) {
      ihigh_1128 = iHigh(Symbol(), 0, 1);
      ilow_1136 = iLow(Symbol(), 0, 2);
      g_bid_320 = Bid;
      g_ask_328 = Ask;
      if ((!gi_416) && !gi_412) {
         gi_380 = gi_396;
         gd_384 = NormalizeDouble(ld_1192 * MathPow(ld_1160, gi_380), li_1168);
         if (ihigh_1128 > ilow_1136) {
            if (iRSI(NULL, PERIOD_H1, 14, PRICE_CLOSE, 1) > 30.0) {
               gi_420 = f0_3(1, gd_384, g_bid_320, slip_Hilo, g_bid_320, 0, 0, gs_364 + "-" + gi_380, MagicNumber_Hilo, 0, HotPink);
               if (gi_420 < 0) {
                  Print("Error: ", GetLastError());
                  return (0);
               }
               gd_336 = f0_32();
               gi_424 = TRUE;
            }
         } else {
            if (iRSI(NULL, PERIOD_H1, 14, PRICE_CLOSE, 1) < 70.0) {
               gi_420 = f0_3(0, gd_384, g_ask_328, slip_Hilo, g_ask_328, 0, 0, gs_364 + "-" + gi_380, MagicNumber_Hilo, 0, Lime);
               if (gi_420 < 0) {
                  Print("Error: ", GetLastError());
                  return (0);
               }
               gd_344 = f0_20();
               gi_424 = TRUE;
            }
         }
         if (gi_420 > 0) gi_376 = TimeCurrent() + 60.0 * (60.0 * gd_224);
         gi_408 = FALSE;
      }
   }
   gi_396 = f0_4();
   g_price_312 = 0;
   double ld_1208 = 0;
   for (g_pos_392 = OrdersTotal() - 1; g_pos_392 >= 0; g_pos_392--) {
      OrderSelect(g_pos_392, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber_Hilo) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo) {
         if (OrderType() == OP_BUY || OrderType() == OP_SELL) {
            g_price_312 += OrderOpenPrice() * OrderLots();
            ld_1208 += OrderLots();
         }
      }
   }
   if (gi_396 > 0) g_price_312 = NormalizeDouble(g_price_312 / ld_1208, Digits);
   if (gi_424) {
      for (g_pos_392 = OrdersTotal() - 1; g_pos_392 >= 0; g_pos_392--) {
         OrderSelect(g_pos_392, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber_Hilo) continue;
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo) {
            if (OrderType() == OP_BUY) {
               g_price_280 = g_price_312 + ld_1172 * Point;
               gd_unused_296 = g_price_280;
               gd_400 = g_price_312 - g_pips_236 * Point;
               gi_360 = TRUE;
            }
         }
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo) {
            if (OrderType() == OP_SELL) {
               g_price_280 = g_price_312 - ld_1172 * Point;
               gd_unused_304 = g_price_280;
               gd_400 = g_price_312 + g_pips_236 * Point;
               gi_360 = TRUE;
            }
         }
      }
   }
   if (gi_424) {
      if (gi_360 == TRUE) {
         for (g_pos_392 = OrdersTotal() - 1; g_pos_392 >= 0; g_pos_392--) {
            OrderSelect(g_pos_392, SELECT_BY_POS, MODE_TRADES);
            if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber_Hilo) continue;
            if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo) OrderModify(OrderTicket(), g_price_312, OrderStopLoss(), g_price_280, 0, Yellow);
            gi_424 = FALSE;
         }
      }
   }
   double ld_1216 = LotExponent;
   int li_1224 = gi_108;
   double ld_1228 = TakeProfit;
   bool bool_1236 = UseEquityStop;
   double ld_1240 = TotalEquityRisk;
   if (MM == TRUE) {
      if (MathCeil(AccountBalance()) < 2000.0) ld_1248 = Lots;
      else ld_1248 = 0.00001 * MathCeil(AccountBalance());
   } else ld_1248 = Lots;
   if ((CloseFriday == TRUE && DayOfWeek() == 5 && TimeCurrent() >= StrToTime(CloseFridayHour + ":00")) || (OpenMondey == TRUE && DayOfWeek() == 1 && TimeCurrent() <= StrToTime(OpenMondeyHour +
      ":00"))) return (0);
   if (UseTrailingStop_15) f0_21(TrailStart_15, TrailStop_15, g_price_596);
   if (gi_532) {
      if (TimeCurrent() >= gi_660) {
         f0_18();
         Print("Closed All due to TimeOut");
      }
   }
   if (gi_656 != Time[0]) {
      gi_656 = Time[0];
      ld_1256 = f0_29();
      if (bool_1236) {
         if (ld_1256 < 0.0 && MathAbs(ld_1256) > ld_1240 / 100.0 * f0_16()) {
            f0_18();
            Print("Closed All due to Stop Out");
            gi_708 = FALSE;
         }
      }
      gi_680 = f0_5();
      if (gi_680 == 0) gi_644 = FALSE;
      for (g_pos_676 = OrdersTotal() - 1; g_pos_676 >= 0; g_pos_676--) {
         OrderSelect(g_pos_676, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15) {
            if (OrderType() == OP_BUY) {
               gi_696 = TRUE;
               gi_700 = FALSE;
               break;
            }
         }
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15) {
            if (OrderType() == OP_SELL) {
               gi_696 = FALSE;
               gi_700 = TRUE;
               break;
            }
         }
      }
      if (gi_680 > 0 && gi_680 <= MaxTrades_15) {
         RefreshRates();
         gd_620 = f0_36();
         gd_628 = f0_28();
         if (gi_696 && gd_620 - Ask >= PipStep_15 * Point) gi_692 = TRUE;
         if (gi_700 && Bid - gd_628 >= PipStep_15 * Point) gi_692 = TRUE;
      }
      if (gi_680 < 1) {
         gi_700 = FALSE;
         gi_696 = FALSE;
         gi_692 = TRUE;
         gd_572 = AccountEquity();
      }
      if (gi_692) {
         gd_620 = f0_36();
         gd_628 = f0_28();
         if (gi_700) {
            gi_664 = gi_680;
            gd_668 = NormalizeDouble(ld_1248 * MathPow(ld_1216, gi_664), li_1224);
            RefreshRates();
            gi_704 = f0_2(1, gd_668, Bid, slip_15, Ask, 0, 0, gs_648 + "-" + gi_664, g_magic_176_15, 0, HotPink);
            if (gi_704 < 0) {
               Print("Error: ", GetLastError());
               return (0);
            }
            gd_628 = f0_28();
            gi_692 = FALSE;
            gi_708 = TRUE;
         } else {
            if (gi_696) {
               gi_664 = gi_680;
               gd_668 = NormalizeDouble(ld_1248 * MathPow(ld_1216, gi_664), li_1224);
               gi_704 = f0_2(0, gd_668, Ask, slip_15, Bid, 0, 0, gs_648 + "-" + gi_664, g_magic_176_15, 0, Lime);
               if (gi_704 < 0) {
                  Print("Error: ", GetLastError());
                  return (0);
               }
               gd_620 = f0_36();
               gi_692 = FALSE;
               gi_708 = TRUE;
            }
         }
      }
   }
   if (g_datetime_728 != iTime(NULL, g_timeframe_496, 0)) {
      li_1264 = OrdersTotal();
      count_1268 = 0;
      for (int li_1272 = li_1264; li_1272 >= 1; li_1272--) {
         OrderSelect(li_1272 - 1, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15) count_1268++;
      }
      if (li_1264 == 0 || count_1268 < 1) {
         iclose_1144 = iClose(Symbol(), 0, 2);
         iclose_1152 = iClose(Symbol(), 0, 1);
         g_bid_604 = Bid;
         g_ask_612 = Ask;
         gi_664 = gi_680;
         gd_668 = ld_1248;
         if (iclose_1144 > iclose_1152) {
            gi_704 = f0_2(1, gd_668, g_bid_604, slip_15, g_bid_604, 0, 0, gs_648 + "-" + gi_664, g_magic_176_15, 0, HotPink);
            if (gi_704 < 0) {
               Print("Error: ", GetLastError());
               return (0);
            }
            gd_620 = f0_36();
            gi_708 = TRUE;
         } else {
            gi_704 = f0_2(0, gd_668, g_ask_612, slip_15, g_ask_612, 0, 0, gs_648 + "-" + gi_664, g_magic_176_15, 0, Lime);
            if (gi_704 < 0) {
               Print("Error: ", GetLastError());
               return (0);
            }
            gd_628 = f0_28();
            gi_708 = TRUE;
         }
         if (gi_704 > 0) gi_660 = TimeCurrent() + 60.0 * (60.0 * gd_536);
         gi_692 = FALSE;
      }
      g_datetime_728 = iTime(NULL, g_timeframe_496, 0);
   }
   gi_680 = f0_5();
   g_price_596 = 0;
   double ld_1276 = 0;
   for (g_pos_676 = OrdersTotal() - 1; g_pos_676 >= 0; g_pos_676--) {
      OrderSelect(g_pos_676, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15) {
         if (OrderType() == OP_BUY || OrderType() == OP_SELL) {
            g_price_596 += OrderOpenPrice() * OrderLots();
            ld_1276 += OrderLots();
         }
      }
   }
   if (gi_680 > 0) g_price_596 = NormalizeDouble(g_price_596 / ld_1276, Digits);
   if (gi_708) {
      for (g_pos_676 = OrdersTotal() - 1; g_pos_676 >= 0; g_pos_676--) {
         OrderSelect(g_pos_676, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15) {
            if (OrderType() == OP_BUY) {
               g_price_564 = g_price_596 + ld_1228 * Point;
               gd_unused_580 = g_price_564;
               gd_684 = g_price_596 - g_pips_508 * Point;
               gi_644 = TRUE;
            }
         }
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15) {
            if (OrderType() == OP_SELL) {
               g_price_564 = g_price_596 - ld_1228 * Point;
               gd_unused_588 = g_price_564;
               gd_684 = g_price_596 + g_pips_508 * Point;
               gi_644 = TRUE;
            }
         }
      }
   }
   if (gi_708) {
      if (gi_644 == TRUE) {
         for (g_pos_676 = OrdersTotal() - 1; g_pos_676 >= 0; g_pos_676--) {
            OrderSelect(g_pos_676, SELECT_BY_POS, MODE_TRADES);
            if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
            if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15) OrderModify(OrderTicket(), g_price_596, OrderStopLoss(), g_price_564, 0, Yellow);
            gi_708 = FALSE;
         }
      }
   }
   double ld_1284 = LotExponent;
   int li_1292 = gi_108;
   double ld_1296 = TakeProfit;
   bool bool_1304 = UseEquityStop;
   double ld_1308 = TotalEquityRisk;
   if (MM == TRUE) {
      if (MathCeil(AccountBalance()) < 2000.0) ld_1316 = Lots;
      else ld_1316 = 0.00001 * MathCeil(AccountBalance());
   } else ld_1316 = Lots;
   if ((CloseFriday == TRUE && DayOfWeek() == 5 && TimeCurrent() >= StrToTime(CloseFridayHour + ":00")) || (OpenMondey == TRUE && DayOfWeek() == 1 && TimeCurrent() <= StrToTime(OpenMondeyHour +
      ":00"))) return (0);
   if (UseTrailingStop_16) f0_34(TrailStart_16, TrailStop_16, g_price_880);
   if (gi_816) {
      if (TimeCurrent() >= gi_944) {
         f0_0();
         Print("Closed All due to TimeOut");
      }
   }
   if (gi_940 != Time[0]) {
      gi_940 = Time[0];
      ld_1324 = f0_8();
      if (bool_1304) {
         if (ld_1324 < 0.0 && MathAbs(ld_1324) > ld_1308 / 100.0 * f0_30()) {
            f0_0();
            Print("Closed All due to Stop Out");
            gi_992 = FALSE;
         }
      }
      gi_964 = f0_12();
      if (gi_964 == 0) gi_928 = FALSE;
      for (g_pos_960 = OrdersTotal() - 1; g_pos_960 >= 0; g_pos_960--) {
         OrderSelect(g_pos_960, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16) {
            if (OrderType() == OP_BUY) {
               gi_980 = TRUE;
               gi_984 = FALSE;
               break;
            }
         }
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16) {
            if (OrderType() == OP_SELL) {
               gi_980 = FALSE;
               gi_984 = TRUE;
               break;
            }
         }
      }
      if (gi_964 > 0 && gi_964 <= MaxTrades_16) {
         RefreshRates();
         gd_904 = f0_17();
         gd_912 = f0_27();
         if (gi_980 && gd_904 - Ask >= PipStep_16 * Point) gi_976 = TRUE;
         if (gi_984 && Bid - gd_912 >= PipStep_16 * Point) gi_976 = TRUE;
      }
      if (gi_964 < 1) {
         gi_984 = FALSE;
         gi_980 = FALSE;
         gd_856 = AccountEquity();
      }
      if (gi_976) {
         gd_904 = f0_17();
         gd_912 = f0_27();
         if (gi_984) {
            gi_948 = gi_964;
            gd_952 = NormalizeDouble(ld_1316 * MathPow(ld_1284, gi_948), li_1292);
            RefreshRates();
            gi_988 = f0_6(1, gd_952, Bid, slip_16, Ask, 0, 0, gs_932 + "-" + gi_948, g_magic_176_16, 0, HotPink);
            if (gi_988 < 0) {
               Print("Error: ", GetLastError());
               return (0);
            }
            gd_912 = f0_27();
            gi_976 = FALSE;
            gi_992 = TRUE;
         } else {
            if (gi_980) {
               gi_948 = gi_964;
               gd_952 = NormalizeDouble(ld_1316 * MathPow(ld_1284, gi_948), li_1292);
               gi_988 = f0_6(0, gd_952, Ask, slip_16, Bid, 0, 0, gs_932 + "-" + gi_948, g_magic_176_16, 0, Lime);
               if (gi_988 < 0) {
                  Print("Error: ", GetLastError());
                  return (0);
               }
               gd_904 = f0_17();
               gi_976 = FALSE;
               gi_992 = TRUE;
            }
         }
      }
   }
   if (g_datetime_1012 != iTime(NULL, g_timeframe_784, 0)) {
      li_1332 = OrdersTotal();
      count_1336 = 0;
      for (int li_1340 = li_1332; li_1340 >= 1; li_1340--) {
         OrderSelect(li_1340 - 1, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16) count_1336++;
      }
      if (li_1332 == 0 || count_1336 < 1) {
         iclose_1144 = iClose(Symbol(), 0, 2);
         iclose_1152 = iClose(Symbol(), 0, 1);
         g_bid_888 = Bid;
         g_ask_896 = Ask;
         gi_948 = gi_964;
         gd_952 = ld_1316;
         if (iclose_1144 > iclose_1152) {
            if (iRSI(NULL, PERIOD_H1, 14, PRICE_CLOSE, 1) > 30.0) {
               gi_988 = f0_6(1, gd_952, g_bid_888, slip_16, g_bid_888, 0, 0, gs_932 + "-" + gi_948, g_magic_176_16, 0, HotPink);
               if (gi_988 < 0) {
                  Print("Error: ", GetLastError());
                  return (0);
               }
               gd_904 = f0_17();
               gi_992 = TRUE;
            }
         } else {
            if (iRSI(NULL, PERIOD_H1, 14, PRICE_CLOSE, 1) < 70.0) {
               gi_988 = f0_6(0, gd_952, g_ask_896, slip_16, g_ask_896, 0, 0, gs_932 + "-" + gi_948, g_magic_176_16, 0, Lime);
               if (gi_988 < 0) {
                  Print("Error: ", GetLastError());
                  return (0);
               }
               gd_912 = f0_27();
               gi_992 = TRUE;
            }
         }
         if (gi_988 > 0) gi_944 = TimeCurrent() + 60.0 * (60.0 * gd_820);
         gi_976 = FALSE;
      }
      g_datetime_1012 = iTime(NULL, g_timeframe_784, 0);
   }
   gi_964 = f0_12();
   g_price_880 = 0;
   double ld_1344 = 0;
   for (g_pos_960 = OrdersTotal() - 1; g_pos_960 >= 0; g_pos_960--) {
      OrderSelect(g_pos_960, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16) {
         if (OrderType() == OP_BUY || OrderType() == OP_SELL) {
            g_price_880 += OrderOpenPrice() * OrderLots();
            ld_1344 += OrderLots();
         }
      }
   }
   if (gi_964 > 0) g_price_880 = NormalizeDouble(g_price_880 / ld_1344, Digits);
   if (gi_992) {
      for (g_pos_960 = OrdersTotal() - 1; g_pos_960 >= 0; g_pos_960--) {
         OrderSelect(g_pos_960, SELECT_BY_POS, MODE_TRADES);
         if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16) {
            if (OrderType() == OP_BUY) {
               g_price_848 = g_price_880 + ld_1296 * Point;
               gd_unused_864 = g_price_848;
               gd_968 = g_price_880 - g_pips_792 * Point;
               gi_928 = TRUE;
            }
         }
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16) {
            if (OrderType() == OP_SELL) {
               g_price_848 = g_price_880 - ld_1296 * Point;
               gd_unused_872 = g_price_848;
               gd_968 = g_price_880 + g_pips_792 * Point;
               gi_928 = TRUE;
            }
         }
      }
   }
   if (gi_992) {
      if (gi_928 == TRUE) {
         for (g_pos_960 = OrdersTotal() - 1; g_pos_960 >= 0; g_pos_960--) {
            OrderSelect(g_pos_960, SELECT_BY_POS, MODE_TRADES);
            if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
            if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16) OrderModify(OrderTicket(), g_price_880, OrderStopLoss(), g_price_848, 0, Yellow);
            gi_992 = FALSE;
         }
      }
   }
   return (0);
}

int f0_4() {
   int count_0 = 0;
   for (int pos_4 = OrdersTotal() - 1; pos_4 >= 0; pos_4--) {
      OrderSelect(pos_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber_Hilo) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo)
         if (OrderType() == OP_SELL || OrderType() == OP_BUY) count_0++;
   }
   return (count_0);
}

void f0_24() {
   for (int pos_0 = OrdersTotal() - 1; pos_0 >= 0; pos_0--) {
      OrderSelect(pos_0, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol()) {
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo) {
            if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, slip_Hilo, Blue);
            if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, slip_Hilo, Red);
         }
         Sleep(1000);
      }
   }
}

int f0_3(int ai_0, double a_lots_4, double a_price_12, int a_slippage_20, double ad_24, int ai_32, int ai_36, string a_comment_40, int a_magic_48, int a_datetime_52, color a_color_56) {
   int ticket_60 = 0;
   int error_64 = 0;
   int count_68 = 0;
   int li_72 = 100;
   switch (ai_0) {
   case 2:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_BUYLIMIT, a_lots_4, a_price_12, a_slippage_20, f0_22(ad_24, ai_32), f0_19(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(1000);
      }
      break;
   case 4:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_BUYSTOP, a_lots_4, a_price_12, a_slippage_20, f0_22(ad_24, ai_32), f0_19(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 0:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         RefreshRates();
         ticket_60 = OrderSend(Symbol(), OP_BUY, a_lots_4, Ask, a_slippage_20, f0_22(Bid, ai_32), f0_19(Ask, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         PlaySound("jaipong.wav");
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 3:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_SELLLIMIT, a_lots_4, a_price_12, a_slippage_20, f0_11(ad_24, ai_32), f0_1(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 5:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_SELLSTOP, a_lots_4, a_price_12, a_slippage_20, f0_11(ad_24, ai_32), f0_1(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 1:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_SELL, a_lots_4, Bid, a_slippage_20, f0_11(Ask, ai_32), f0_1(Bid, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         PlaySound("jaipong.wav");
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
   }
   return (ticket_60);
}

double f0_22(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 - ai_8 * Point);
}

double f0_11(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 + ai_8 * Point);
}

double f0_19(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 + ai_8 * Point);
}

double f0_1(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 - ai_8 * Point);
}

double f0_31() {
   double ld_ret_0 = 0;
   for (g_pos_392 = OrdersTotal() - 1; g_pos_392 >= 0; g_pos_392--) {
      OrderSelect(g_pos_392, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber_Hilo) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo)
         if (OrderType() == OP_BUY || OrderType() == OP_SELL) ld_ret_0 += OrderProfit();
   }
   return (ld_ret_0);
}

void f0_35(int ai_0, int ai_4, double a_price_8) {
   int li_16;
   double order_stoploss_20;
   double price_28;
   if (ai_4 != 0) {
      for (int pos_36 = OrdersTotal() - 1; pos_36 >= 0; pos_36--) {
         if (OrderSelect(pos_36, SELECT_BY_POS, MODE_TRADES)) {
            if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber_Hilo) continue;
            if (OrderSymbol() == Symbol() || OrderMagicNumber() == MagicNumber_Hilo) {
               if (OrderType() == OP_BUY) {
                  li_16 = NormalizeDouble((Bid - a_price_8) / Point, 0);
                  if (li_16 < ai_0) continue;
                  order_stoploss_20 = OrderStopLoss();
                  price_28 = Bid - ai_4 * Point;
                  if (order_stoploss_20 == 0.0 || (order_stoploss_20 != 0.0 && price_28 > order_stoploss_20)) OrderModify(OrderTicket(), a_price_8, price_28, OrderTakeProfit(), 0, Aqua);
               }
               if (OrderType() == OP_SELL) {
                  li_16 = NormalizeDouble((a_price_8 - Ask) / Point, 0);
                  if (li_16 < ai_0) continue;
                  order_stoploss_20 = OrderStopLoss();
                  price_28 = Ask + ai_4 * Point;
                  if (order_stoploss_20 == 0.0 || (order_stoploss_20 != 0.0 && price_28 < order_stoploss_20)) OrderModify(OrderTicket(), a_price_8, price_28, OrderTakeProfit(), 0, Red);
               }
            }
            Sleep(1000);
         }
      }
   }
}

double f0_7() {
   if (f0_4() == 0) gd_428 = AccountEquity();
   if (gd_428 < gd_436) gd_428 = gd_436;
   else gd_428 = AccountEquity();
   gd_436 = AccountEquity();
   return (gd_428);
}

double f0_32() {
   double order_open_price_0;
   int ticket_8;
   double ld_unused_12 = 0;
   int ticket_20 = 0;
   for (int pos_24 = OrdersTotal() - 1; pos_24 >= 0; pos_24--) {
      OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber_Hilo) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo && OrderType() == OP_BUY) {
         ticket_8 = OrderTicket();
         if (ticket_8 > ticket_20) {
            order_open_price_0 = OrderOpenPrice();
            ld_unused_12 = order_open_price_0;
            ticket_20 = ticket_8;
         }
      }
   }
   return (order_open_price_0);
}

double f0_20() {
   double order_open_price_0;
   int ticket_8;
   double ld_unused_12 = 0;
   int ticket_20 = 0;
   for (int pos_24 = OrdersTotal() - 1; pos_24 >= 0; pos_24--) {
      OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber_Hilo) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber_Hilo && OrderType() == OP_SELL) {
         ticket_8 = OrderTicket();
         if (ticket_8 > ticket_20) {
            order_open_price_0 = OrderOpenPrice();
            ld_unused_12 = order_open_price_0;
            ticket_20 = ticket_8;
         }
      }
   }
   return (order_open_price_0);
}

int f0_5() {
   int count_0 = 0;
   for (int pos_4 = OrdersTotal() - 1; pos_4 >= 0; pos_4--) {
      OrderSelect(pos_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15)
         if (OrderType() == OP_SELL || OrderType() == OP_BUY) count_0++;
   }
   return (count_0);
}

void f0_18() {
   for (int pos_0 = OrdersTotal() - 1; pos_0 >= 0; pos_0--) {
      OrderSelect(pos_0, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol()) {
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15) {
            if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, slip_15, Blue);
            if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, slip_15, Red);
         }
         Sleep(1000);
      }
   }
}

int f0_2(int ai_0, double a_lots_4, double a_price_12, int a_slippage_20, double ad_24, int ai_32, int ai_36, string a_comment_40, int a_magic_48, int a_datetime_52, color a_color_56) {
   int ticket_60 = 0;
   int error_64 = 0;
   int count_68 = 0;
   int li_72 = 100;
   switch (ai_0) {
   case 2:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_BUYLIMIT, a_lots_4, a_price_12, a_slippage_20, f0_13(ad_24, ai_32), f0_25(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(1000);
      }
      break;
   case 4:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_BUYSTOP, a_lots_4, a_price_12, a_slippage_20, f0_13(ad_24, ai_32), f0_25(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 0:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         RefreshRates();
         ticket_60 = OrderSend(Symbol(), OP_BUY, a_lots_4, Ask, a_slippage_20, f0_13(Bid, ai_32), f0_25(Ask, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         PlaySound("keroncong.wav");
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 3:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_SELLLIMIT, a_lots_4, a_price_12, a_slippage_20, f0_33(ad_24, ai_32), f0_26(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 5:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_SELLSTOP, a_lots_4, a_price_12, a_slippage_20, f0_33(ad_24, ai_32), f0_26(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 1:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_SELL, a_lots_4, Bid, a_slippage_20, f0_33(Ask, ai_32), f0_26(Bid, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         PlaySound("keroncong.wav");
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
   }
   return (ticket_60);
}

double f0_13(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 - ai_8 * Point);
}

double f0_33(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 + ai_8 * Point);
}

double f0_25(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 + ai_8 * Point);
}

double f0_26(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 - ai_8 * Point);
}

double f0_29() {
   double ld_ret_0 = 0;
   for (g_pos_676 = OrdersTotal() - 1; g_pos_676 >= 0; g_pos_676--) {
      OrderSelect(g_pos_676, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15)
         if (OrderType() == OP_BUY || OrderType() == OP_SELL) ld_ret_0 += OrderProfit();
   }
   return (ld_ret_0);
}

void f0_21(int ai_0, int ai_4, double a_price_8) {
   int li_16;
   double order_stoploss_20;
   double price_28;
   if (ai_4 != 0) {
      for (int pos_36 = OrdersTotal() - 1; pos_36 >= 0; pos_36--) {
         if (OrderSelect(pos_36, SELECT_BY_POS, MODE_TRADES)) {
            if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
            if (OrderSymbol() == Symbol() || OrderMagicNumber() == g_magic_176_15) {
               if (OrderType() == OP_BUY) {
                  li_16 = NormalizeDouble((Bid - a_price_8) / Point, 0);
                  if (li_16 < ai_0) continue;
                  order_stoploss_20 = OrderStopLoss();
                  price_28 = Bid - ai_4 * Point;
                  if (order_stoploss_20 == 0.0 || (order_stoploss_20 != 0.0 && price_28 > order_stoploss_20)) OrderModify(OrderTicket(), a_price_8, price_28, OrderTakeProfit(), 0, Aqua);
               }
               if (OrderType() == OP_SELL) {
                  li_16 = NormalizeDouble((a_price_8 - Ask) / Point, 0);
                  if (li_16 < ai_0) continue;
                  order_stoploss_20 = OrderStopLoss();
                  price_28 = Ask + ai_4 * Point;
                  if (order_stoploss_20 == 0.0 || (order_stoploss_20 != 0.0 && price_28 < order_stoploss_20)) OrderModify(OrderTicket(), a_price_8, price_28, OrderTakeProfit(), 0, Red);
               }
            }
            Sleep(1000);
         }
      }
   }
}

double f0_16() {
   if (f0_5() == 0) gd_712 = AccountEquity();
   if (gd_712 < gd_720) gd_712 = gd_720;
   else gd_712 = AccountEquity();
   gd_720 = AccountEquity();
   return (gd_712);
}

double f0_36() {
   double order_open_price_0;
   int ticket_8;
   double ld_unused_12 = 0;
   int ticket_20 = 0;
   for (int pos_24 = OrdersTotal() - 1; pos_24 >= 0; pos_24--) {
      OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15 && OrderType() == OP_BUY) {
         ticket_8 = OrderTicket();
         if (ticket_8 > ticket_20) {
            order_open_price_0 = OrderOpenPrice();
            ld_unused_12 = order_open_price_0;
            ticket_20 = ticket_8;
         }
      }
   }
   return (order_open_price_0);
}

double f0_28() {
   double order_open_price_0;
   int ticket_8;
   double ld_unused_12 = 0;
   int ticket_20 = 0;
   for (int pos_24 = OrdersTotal() - 1; pos_24 >= 0; pos_24--) {
      OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_15) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_15 && OrderType() == OP_SELL) {
         ticket_8 = OrderTicket();
         if (ticket_8 > ticket_20) {
            order_open_price_0 = OrderOpenPrice();
            ld_unused_12 = order_open_price_0;
            ticket_20 = ticket_8;
         }
      }
   }
   return (order_open_price_0);
}

int f0_12() {
   int count_0 = 0;
   for (int pos_4 = OrdersTotal() - 1; pos_4 >= 0; pos_4--) {
      OrderSelect(pos_4, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16)
         if (OrderType() == OP_SELL || OrderType() == OP_BUY) count_0++;
   }
   return (count_0);
}

void f0_0() {
   for (int pos_0 = OrdersTotal() - 1; pos_0 >= 0; pos_0--) {
      OrderSelect(pos_0, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol()) {
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16) {
            if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, slip_16, Blue);
            if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, slip_16, Red);
         }
         Sleep(1000);
      }
   }
}

int f0_6(int ai_0, double a_lots_4, double a_price_12, int a_slippage_20, double ad_24, int ai_32, int ai_36, string a_comment_40, int a_magic_48, int a_datetime_52, color a_color_56) {
   int ticket_60 = 0;
   int error_64 = 0;
   int count_68 = 0;
   int li_72 = 100;
   switch (ai_0) {
   case 2:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_BUYLIMIT, a_lots_4, a_price_12, a_slippage_20, f0_14(ad_24, ai_32), f0_9(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(1000);
      }
      break;
   case 4:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_BUYSTOP, a_lots_4, a_price_12, a_slippage_20, f0_14(ad_24, ai_32), f0_9(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 0:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         RefreshRates();
         ticket_60 = OrderSend(Symbol(), OP_BUY, a_lots_4, Ask, a_slippage_20, f0_14(Bid, ai_32), f0_9(Ask, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         PlaySound("tortor.wav");
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 3:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_SELLLIMIT, a_lots_4, a_price_12, a_slippage_20, f0_23(ad_24, ai_32), f0_10(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 5:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_SELLSTOP, a_lots_4, a_price_12, a_slippage_20, f0_23(ad_24, ai_32), f0_10(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52,
            a_color_56);
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
      break;
   case 1:
      for (count_68 = 0; count_68 < li_72; count_68++) {
         ticket_60 = OrderSend(Symbol(), OP_SELL, a_lots_4, Bid, a_slippage_20, f0_23(Ask, ai_32), f0_10(Bid, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
         PlaySound("tortor.wav");
         error_64 = GetLastError();
         if (error_64 == 0/* NO_ERROR */) break;
         if (!((error_64 == 4/* SERVER_BUSY */ || error_64 == 137/* BROKER_BUSY */ || error_64 == 146/* TRADE_CONTEXT_BUSY */ || error_64 == 136/* OFF_QUOTES */))) break;
         Sleep(5000);
      }
   }
   return (ticket_60);
}

double f0_14(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 - ai_8 * Point);
}

double f0_23(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 + ai_8 * Point);
}

double f0_9(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 + ai_8 * Point);
}

double f0_10(double ad_0, int ai_8) {
   if (ai_8 == 0) return (0);
   return (ad_0 - ai_8 * Point);
}

double f0_8() {
   double ld_ret_0 = 0;
   for (g_pos_960 = OrdersTotal() - 1; g_pos_960 >= 0; g_pos_960--) {
      OrderSelect(g_pos_960, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16)
         if (OrderType() == OP_BUY || OrderType() == OP_SELL) ld_ret_0 += OrderProfit();
   }
   return (ld_ret_0);
}

void f0_34(int ai_0, int ai_4, double a_price_8) {
   int li_16;
   double order_stoploss_20;
   double price_28;
   if (ai_4 != 0) {
      for (int pos_36 = OrdersTotal() - 1; pos_36 >= 0; pos_36--) {
         if (OrderSelect(pos_36, SELECT_BY_POS, MODE_TRADES)) {
            if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
            if (OrderSymbol() == Symbol() || OrderMagicNumber() == g_magic_176_16) {
               if (OrderType() == OP_BUY) {
                  li_16 = NormalizeDouble((Bid - a_price_8) / Point, 0);
                  if (li_16 < ai_0) continue;
                  order_stoploss_20 = OrderStopLoss();
                  price_28 = Bid - ai_4 * Point;
                  if (order_stoploss_20 == 0.0 || (order_stoploss_20 != 0.0 && price_28 > order_stoploss_20)) OrderModify(OrderTicket(), a_price_8, price_28, OrderTakeProfit(), 0, Aqua);
               }
               if (OrderType() == OP_SELL) {
                  li_16 = NormalizeDouble((a_price_8 - Ask) / Point, 0);
                  if (li_16 < ai_0) continue;
                  order_stoploss_20 = OrderStopLoss();
                  price_28 = Ask + ai_4 * Point;
                  if (order_stoploss_20 == 0.0 || (order_stoploss_20 != 0.0 && price_28 < order_stoploss_20)) OrderModify(OrderTicket(), a_price_8, price_28, OrderTakeProfit(), 0, Red);
               }
            }
            Sleep(1000);
         }
      }
   }
}

double f0_30() {
   if (f0_12() == 0) gd_996 = AccountEquity();
   if (gd_996 < gd_1004) gd_996 = gd_1004;
   else gd_996 = AccountEquity();
   gd_1004 = AccountEquity();
   return (gd_996);
}

double f0_17() {
   double order_open_price_0;
   int ticket_8;
   double ld_unused_12 = 0;
   int ticket_20 = 0;
   for (int pos_24 = OrdersTotal() - 1; pos_24 >= 0; pos_24--) {
      OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16 && OrderType() == OP_BUY) {
         ticket_8 = OrderTicket();
         if (ticket_8 > ticket_20) {
            order_open_price_0 = OrderOpenPrice();
            ld_unused_12 = order_open_price_0;
            ticket_20 = ticket_8;
         }
      }
   }
   return (order_open_price_0);
}

double f0_27() {
   double order_open_price_0;
   int ticket_8;
   double ld_unused_12 = 0;
   int ticket_20 = 0;
   for (int pos_24 = OrdersTotal() - 1; pos_24 >= 0; pos_24--) {
      OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_176_16) continue;
      if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_176_16 && OrderType() == OP_SELL) {
         ticket_8 = OrderTicket();
         if (ticket_8 > ticket_20) {
            order_open_price_0 = OrderOpenPrice();
            ld_unused_12 = order_open_price_0;
            ticket_20 = ticket_8;
         }
      }
   }
   return (order_open_price_0);
}

string f0_15(string as_0) {
   int str_len_8 = StringLen(as_0);
   bool li_ret_12 = FALSE;
   for (int li_16 = 0; li_16 < str_len_8; li_16++) {
      if (StringSubstr(as_0, li_16, 1) == "1") li_ret_12 = li_ret_12 + MathPow(16, str_len_8 - li_16 - 1);
      else {
         if (StringSubstr(as_0, li_16, 1) == "2") li_ret_12 = li_ret_12 + 2.0 * MathPow(16, str_len_8 - li_16 - 1);
         else {
            if (StringSubstr(as_0, li_16, 1) == "3") li_ret_12 = li_ret_12 + 3.0 * MathPow(16, str_len_8 - li_16 - 1);
            else {
               if (StringSubstr(as_0, li_16, 1) == "4") li_ret_12 = li_ret_12 + 4.0 * MathPow(16, str_len_8 - li_16 - 1);
               else {
                  if (StringSubstr(as_0, li_16, 1) == "5") li_ret_12 = li_ret_12 + 5.0 * MathPow(16, str_len_8 - li_16 - 1);
                  else {
                     if (StringSubstr(as_0, li_16, 1) == "6") li_ret_12 = li_ret_12 + 6.0 * MathPow(16, str_len_8 - li_16 - 1);
                     else {
                        if (StringSubstr(as_0, li_16, 1) == "7") li_ret_12 = li_ret_12 + 7.0 * MathPow(16, str_len_8 - li_16 - 1);
                        else {
                           if (StringSubstr(as_0, li_16, 1) == "8") li_ret_12 = li_ret_12 + 8.0 * MathPow(16, str_len_8 - li_16 - 1);
                           else {
                              if (StringSubstr(as_0, li_16, 1) == "9") li_ret_12 = li_ret_12 + 9.0 * MathPow(16, str_len_8 - li_16 - 1);
                              else {
                                 if (StringSubstr(as_0, li_16, 1) == "A") li_ret_12 = li_ret_12 + 10.0 * MathPow(16, str_len_8 - li_16 - 1);
                                 else {
                                    if (StringSubstr(as_0, li_16, 1) == "B") li_ret_12 = li_ret_12 + 11.0 * MathPow(16, str_len_8 - li_16 - 1);
                                    else {
                                       if (StringSubstr(as_0, li_16, 1) == "C") li_ret_12 = li_ret_12 + 12.0 * MathPow(16, str_len_8 - li_16 - 1);
                                       else {
                                          if (StringSubstr(as_0, li_16, 1) == "D") li_ret_12 = li_ret_12 + 13.0 * MathPow(16, str_len_8 - li_16 - 1);
                                          else {
                                             if (StringSubstr(as_0, li_16, 1) == "E") li_ret_12 = li_ret_12 + 14.0 * MathPow(16, str_len_8 - li_16 - 1);
                                             else
                                                if (StringSubstr(as_0, li_16, 1) == "F") li_ret_12 = li_ret_12 + 15.0 * MathPow(16, str_len_8 - li_16 - 1);
                                          }
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
   return (li_ret_12);
}