#property copyright "tomhliles@yahoo.com" #property link "tomhliles@yahoo.com" bool gi_76 = FALSE; string gs_80 = "2008.07.01"; bool gi_88 = FALSE; bool gi_92 = FALSE; int gi_96 = 12345; extern bool shut_down_ea_after_target = FALSE; extern string aut_bal = "auto balance will increase safety, lower returns"; extern bool auto_balance = FALSE; extern int divided = 2; extern bool custom_balance = FALSE; extern double balance = 10000.0; extern double Maximum_Risk = 0.1; extern double profit_target_percent = 0.1; int gi_148 = 1000; extern string acc_type = "1=nano 2=mini 3=standard"; extern int type = 1; extern string acc_type2 = "heres some known settings"; extern string ibfx_mini = "1"; extern string ibfx_norm = "2"; extern string fxdd = "2"; extern string most_all_others = "2"; int gi_204 = 10000; double gd_208 = 0.01; double g_maxlot_216 = 50.0; bool gi_224 = FALSE; double gd_228 = 20.0; int gi_236 = 0; bool gi_240 = TRUE; bool gi_244 = FALSE; double gd_248 = 0.3; double gd_256 = 0.3; int g_period_264 = 100; double g_deviation_268 = 0.4; int g_timeframe_276 = PERIOD_M5; bool gi_280 = TRUE; bool gi_284 = TRUE; bool gi_288 = FALSE; int g_period_292 = 60; int g_timeframe_296 = PERIOD_M5; bool gi_300 = FALSE; bool gi_304 = FALSE; bool gi_308 = TRUE; bool gi_312 = TRUE; bool gi_316 = FALSE; string gs_unused_320 = "//////parabolic stop and reverse////////////////"; bool gi_328 = TRUE; bool gi_332 = FALSE; bool gi_336 = TRUE; extern double psar = 0.003; double gd_348 = 0.2; extern int time_frame_for_signal = 30; string gs_unused_360 = "second parabolic stop and reverse//////////////"; bool gi_368 = TRUE; bool gi_372 = FALSE; bool gi_376 = FALSE; extern double psar2 = 0.06; double gd_388 = 0.2; extern int time_frame_for_signal2 = 0; bool gi_400 = FALSE; bool gi_404 = FALSE; bool gi_unused_408 = FALSE; string gs_unused_412 = "settings//////////////////////////////////// "; bool gi_420 = TRUE; int gi_424 = 1000; int gi_428 = 1000; bool gi_432 = TRUE; int gi_unused_436 = 1000; bool gi_440 = TRUE; double gd_444 = 1.0; bool gi_452 = FALSE; double gd_456 = -6.0; string gs_unused_464 = "settings /////////////////////////////////"; double gd_472 = 1000.0; double gd_480 = -100000000.0; bool gi_488 = FALSE; int gi_492 = 5000; bool gi_496 = FALSE; int gi_500 = 10; bool gi_504 = FALSE; int gi_508 = 10; bool gi_512 = FALSE; extern int TrailingStop = 15; string gs_unused_520 = "h/l filter//////////////////////////////"; bool gi_528 = FALSE; double g_timeframe_532 = 240.0; string gs_unused_540 = "one pivot/////////////////////////////// "; bool gi_548 = FALSE; int g_timeframe_552 = PERIOD_H1; double gd_unused_556 = 50.0; string gs_unused_564 = "all pivots//////////////////////////////"; bool gi_572 = FALSE; double gd_576 = 20.0; bool gi_584 = FALSE; int gi_588 = 1; bool gi_592 = TRUE; string gs_unused_596 = "longs//////////// "; double g_timeframe_604 = 60.0; double gd_612 = 50.0; double g_timeframe_620 = 240.0; int gi_628 = 50; double g_timeframe_632 = 1440.0; int gi_640 = 50; double g_timeframe_644 = 10080.0; int gi_652 = 50; double g_timeframe_656 = 43200.0; int gi_664 = 50; string gs_unused_668 = "shorts/////////// "; double g_timeframe_676 = 60.0; double gd_684 = 50.0; double g_timeframe_692 = 240.0; int gi_700 = 50; double g_timeframe_704 = 1440.0; int gi_712 = 50; double g_timeframe_716 = 10080.0; int gi_724 = 50; double g_timeframe_728 = 43200.0; int gi_736 = 50; bool gi_740 = TRUE; bool gi_744 = TRUE; bool gi_748 = FALSE; int gi_unused_752 = -15; bool gi_756 = FALSE; string gs_unused_760 = "only effects current chart"; bool gi_768 = FALSE; bool gi_772 = TRUE; bool gi_776 = TRUE; int gi_780 = 2; double gd_784 = 0.0; double gd_792 = 0.0; double gd_800 = 0.0; extern bool hedge_lots = FALSE; extern double lots_plus = 2.0; double gd_unused_820 = 0.0; double gd_unused_828 = 0.0; bool gi_836 = FALSE; string gs_unused_840 = "equity closses trades globally"; bool gi_848 = FALSE; bool gi_852 = FALSE; double gd_856 = -5.0; double gd_864 = 0.0; string gs_unused_872 = "only effects current chart"; bool gi_880 = FALSE; double gd_884 = 1.99; bool gi_892 = FALSE; double gd_896 = 75.0; string gs_unused_904 = "//////envelopes hedge"; bool gi_912 = FALSE; string gs_unused_916 = "//////envelopes"; bool gi_924 = FALSE; bool gi_928 = FALSE; string gs_unused_932 = "buy options"; int g_period_940 = 2; int g_applied_price_944 = PRICE_LOW; int g_applied_price_948 = PRICE_HIGH; double g_deviation_952 = 0.01; double g_deviation_960 = 0.01; bool gi_968 = FALSE; bool gi_972 = TRUE; bool gi_976 = TRUE; bool gi_980 = FALSE; string gs_unused_984 = "sell options"; bool gi_unused_992 = FALSE; bool gi_unused_996 = FALSE; bool gi_unused_1000 = FALSE; bool gi_unused_1004 = FALSE; bool gi_unused_1008 = FALSE; bool gi_unused_1012 = FALSE; bool gi_unused_1016 = FALSE; bool gi_unused_1020 = FALSE; bool gi_unused_1024 = FALSE; bool gi_unused_1028 = FALSE; bool gi_1032 = FALSE; bool gi_1036 = FALSE; bool gi_1040 = FALSE; bool gi_1044 = FALSE; bool gi_1048 = FALSE; bool gi_1052 = FALSE; bool gi_1056 = FALSE; bool gi_1060 = FALSE; int gi_unused_1064 = 2; int g_applied_price_1068 = PRICE_HIGH; int g_applied_price_1072 = PRICE_LOW; double gd_unused_1076 = 0.01; double g_deviation_1084 = 0.01; int g_timeframe_1092 = 0; bool gi_1096 = TRUE; bool gi_1100 = FALSE; bool gi_1104 = FALSE; bool gi_1108 = TRUE; string gs_unused_1112 = "average_true_range"; bool gi_1120 = FALSE; bool gi_1124 = FALSE; int g_period_1128 = 5; double gd_1132 = 0.0009; int g_timeframe_1140 = PERIOD_M15; string gs_unused_1144 = "activate ma hedge"; bool gi_1152 = FALSE; double gd_1156 = 75.0; string gs_unused_1164 = "stop trading excluding hedges"; bool gi_1172 = FALSE; double gd_1176 = 75.0; string gs_unused_1184 = "close profit trades"; bool gi_1192 = FALSE; double gd_1196 = 5.0; int gi_unused_1204 = 40; int gi_1208 = 20; string gs_unused_1212 = "trail profit trades"; bool gi_1220 = FALSE; double gd_1224 = 40.0; bool gi_1232 = FALSE; double gd_1236 = -50.0; bool gi_1244 = FALSE; double gd_1248 = -50.0; string gs_unused_1256 = "close all trades"; bool gi_1264 = FALSE; double gd_1268 = -80.0; string gs_unused_1276 = "activate breakeven"; bool gi_1284 = FALSE; int gi_1288 = 100; string gs_unused_1292 = "moving averages"; bool gi_1300 = FALSE; bool gi_1304 = FALSE; string gs_unused_1308 = "moving average one"; int g_period_1316 = 200; int gi_1320 = 0; int g_ma_method_1324 = MODE_SMA; int g_applied_price_1328 = PRICE_CLOSE; string gs_unused_1332 = "moving average two"; int g_period_1340 = 50; int gi_1344 = 0; int g_ma_method_1348 = MODE_SMA; int g_applied_price_1352 = PRICE_CLOSE; bool gi_unused_1356 = FALSE; bool gi_unused_1360 = TRUE; int gi_unused_1364 = 99; string gs_unused_1368 = "///////////////////////////////////////////"; bool gi_1376 = TRUE; bool gi_1380 = FALSE; int gi_1384 = 5; int gi_1388 = 9; bool gi_1392 = FALSE; int gi_1396 = 5; int gi_1400 = 9; bool gi_1404 = FALSE; int gi_1408 = 5; int gi_1412 = 9; bool gi_1416 = FALSE; int gi_1420 = 21; int gi_1424 = 0; bool gi_1428 = TRUE; bool gi_1432 = TRUE; int gi_1436 = 5000; int gi_1440 = 1; int gi_1444 = 1; bool gi_1448 = FALSE; int gi_1452 = 10; int gi_1456 = 20; int gi_1460 = 30; int gi_1464 = 5000; bool gi_1468 = FALSE; int gi_1472 = 10; int gi_1476 = 20; int gi_1480 = 30; string gs_unused_1484 = "notification options//////////////////////////////////"; bool gi_1492 = FALSE; bool gi_1496 = FALSE; bool gi_1500 = FALSE; bool gi_1504 = TRUE; bool gi_1508 = FALSE; string gs_unused_1512 = "none"; string gs_unused_1520 = "none"; string gs_unused_1528 = "none"; string gs_unused_1536 = "none"; string gs_unused_1544 = "none"; string gs_unused_1552 = "none"; string gs_unused_1560 = "none"; string gs_unused_1568 = "none"; string gs_unused_1576 = "none"; string gs_unused_1584 = "none"; string gs_unused_1592 = "none"; string gs_unused_1600 = "none"; string gs_unused_1608 = "do not trade this pair"; string gs_unused_1616 = "2=buy 0=sell 1=no trade"; double gd_unused_1624 = 1.0; bool gi_unused_1632 = FALSE; double gd_1636 = 1.0; double gd_unused_1644 = 0.0; double gd_unused_1652 = 0.0; double gd_unused_1660 = 0.0; double gd_1668 = 0.0; bool gi_1676 = FALSE; bool gi_1680 = FALSE; bool gi_1684 = FALSE; bool gi_1688 = TRUE; int g_count_1692 = 0; int g_count_1696 = 0; int gi_unused_1700 = 0; int g_count_1704 = 0; int g_count_1708 = 0; int gi_unused_1712 = 0; string gs_unused_1716 = "//////filter"; bool gi_unused_1724 = FALSE; int g_period_1728 = 1; double gd_1732 = 0.0; int g_timeframe_1740 = 0; string gs_1744 = "new alert from trendchaser"; string gs_1752 = "alert.wav"; bool gi_1760 = TRUE; bool gi_unused_1764 = TRUE; int gi_1768 = 1; int gi_1772 = 0; bool gi_1776 = FALSE; bool gi_1780 = FALSE; int gi_unused_1784 = 2; bool gi_1788 = TRUE; bool gi_1792 = TRUE; bool gi_1796 = TRUE; bool gi_1800 = TRUE; int gi_1804 = 0; bool gi_1808 = TRUE; bool gi_1812 = TRUE; bool gi_1816 = FALSE; bool gi_1820 = FALSE; string gs_1824 = "trendchaser"; string gs_1832 = "trendchaser"; string gs_unused_1840 = "0-Sunday,1,2,3,4,5,6"; string gs_gbpjpym_1848 = "GBPJPYm"; double g_lots_1856 = 0.01; bool gi_1864 = FALSE; bool gi_1868 = FALSE; int gi_1872 = 0; int gi_1876 = 0; int gi_1880 = 0; int gi_unused_1884 = 5000; int gi_unused_1888 = 5000; int g_magic_1892 = 95; bool gi_unused_1896 = FALSE; string gs_none_1900 = "none"; int gi_1908 = 0; bool gi_1912 = FALSE; int gi_1916 = 0; int gi_1920 = 0; int gi_unused_1924 = 0; int gi_unused_1928 = 0; int gi_1932 = 0; int gi_unused_1936 = 0; int gi_1940 = 0; int gi_1944 = 0; double gd_1948 = 0.0; double gd_1956 = 0.0; bool gi_1964 = TRUE; bool gi_1968 = TRUE; bool gi_1972 = TRUE; string gs_unused_1976 = "standard fibs "; bool gi_1984 = FALSE; bool gi_1988 = FALSE; bool gi_1992 = FALSE; bool gi_1996 = FALSE; bool gi_2000 = FALSE; bool gi_2004 = FALSE; double gd_unused_2008 = 0.01; double gd_2016 = 0.01; double gd_2024 = 0.0; int gi_2032 = 0; bool gi_2036 = FALSE; bool gi_unused_2040 = FALSE; bool gi_unused_2044 = FALSE; bool gi_2048 = FALSE; int g_bars_2052; int gi_2056; bool gi_2060 = FALSE; int g_bars_2064; double LotsOptimized() { string ls_0 = Symbol(); double l_lotstep_8 = MarketInfo(Symbol(), MODE_LOTSTEP); double l_minlot_16 = MarketInfo(Symbol(), MODE_MINLOT); double l_maxlot_24 = MarketInfo(Symbol(), MODE_MAXLOT); double ld_ret_32 = l_minlot_16; g_maxlot_216 = l_maxlot_24; int l_hist_total_40 = OrdersHistoryTotal(); int li_44 = gi_2032; if (gi_224 == FALSE && l_lotstep_8 == 0.001) ld_ret_32 = NormalizeDouble(balance * Maximum_Risk / gi_204, 3); if (gi_224 && l_lotstep_8 == 0.001) ld_ret_32 = NormalizeDouble(balance * Maximum_Risk / gi_204 * OrdersTotal() / gd_228, 3); if (gi_224 == FALSE && l_lotstep_8 == 0.01) ld_ret_32 = NormalizeDouble(balance * Maximum_Risk / gi_204, 2); if (gi_224 && l_lotstep_8 == 0.01) ld_ret_32 = NormalizeDouble(balance * Maximum_Risk / gi_204 * OrdersTotal() / gd_228, 2); if (gi_224 == FALSE && l_lotstep_8 == 0.1) ld_ret_32 = NormalizeDouble(balance * Maximum_Risk / gi_204, 1); if (gi_224 && l_lotstep_8 == 0.1) ld_ret_32 = NormalizeDouble(balance * Maximum_Risk / gi_204 * OrdersTotal() / gd_228, 1); if (gd_2024 > 0.0) { for (int l_pos_48 = l_hist_total_40 - 1; l_pos_48 >= 0; l_pos_48--) { if (OrderSelect(l_pos_48, SELECT_BY_POS, MODE_HISTORY) == FALSE) { Print("Error in history!"); break; } if (OrderSymbol() != Symbol() || OrderType() > OP_SELL) continue; if (OrderProfit() > 0.0) break; if (OrderProfit() < 0.0) li_44++; } if (li_44 > 0) ld_ret_32 = NormalizeDouble(2.0 * ld_ret_32 + li_44 / gd_2024, 2); } if (ld_ret_32 < gd_2016) ld_ret_32 = gd_208; if (ld_ret_32 > g_maxlot_216) ld_ret_32 = g_maxlot_216; return (ld_ret_32); } void hidden_take_profit() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY && OrderOpenPrice() + gi_508 * Point <= Bid) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL && OrderOpenPrice() - gi_508 * Point >= Ask) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void hidden_stop_loss() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY && OrderOpenPrice() - gi_500 * Point >= Bid) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL && OrderOpenPrice() + gi_500 * Point <= Ask) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void scale_take_profit() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY && OrderOpenPrice() + gi_1472 * Point <= Bid) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots() / 3.0, MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL && OrderOpenPrice() - gi_1472 * Point >= Ask) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots() / 3.0, MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void scale_take_profit2() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY && OrderOpenPrice() + gi_1476 * Point <= Bid) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots() / 2.0, MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL && OrderOpenPrice() - gi_1476 * Point >= Ask) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots() / 2.0, MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void scale_take_profit3() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY && OrderOpenPrice() + gi_1480 * Point <= Bid) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL && OrderOpenPrice() - gi_1480 * Point >= Ask) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void scale_stop_loss() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY && OrderOpenPrice() - gi_1452 * Point >= Bid) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots() / 3.0, MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL && OrderOpenPrice() + gi_1452 * Point <= Ask) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots() / 3.0, MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void scale_stop_loss2() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY && OrderOpenPrice() - gi_1456 * Point >= Bid) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots() / 2.0, MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL && OrderOpenPrice() + gi_1456 * Point <= Ask) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots() / 2.0, MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void scale_stop_loss3() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY && OrderOpenPrice() - gi_1460 * Point >= Bid) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL && OrderOpenPrice() + gi_1460 * Point <= Ask) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void Closelongs() { bool li_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); li_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY) li_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() > OP_SELL) li_8 = OrderDelete(OrderTicket()); RefreshRates(); if (OrdersTotal() > 0) Closelongs(); } } } void Closepending() { bool l_ord_delete_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_delete_8 = FALSE; if (OrderSymbol() == Symbol()) if (OrderType() > OP_SELL) l_ord_delete_8 = OrderDelete(OrderTicket()); } } void Closelongsinprofit() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderProfit() == (-gi_1208) * LotsOptimized()) if (OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); } } } void Closelosers() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (gi_236 == 2 && OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (gi_236 == 1 && OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); trail(); } } } void mCloselosers() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol() && OrderProfit() < 0.0 && OrderMagicNumber() == 99) { if (OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void Closeshortsinprofit() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderProfit() == (-gi_1208) * LotsOptimized()) if (OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void Closeshorts() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) if (OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } void mClose_target() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol() && OrderMagicNumber() == 99) { if (OrderProfit() < 0.0 && OrderSymbol() == Symbol() && OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderProfit() < 0.0 && OrderSymbol() == Symbol() && OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); if (OrderSymbol() == Symbol() && OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderSymbol() == Symbol() && OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); RefreshRates(); if (gi_1908 > 0) mClose_target(); } } } void Close_target() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderProfit() < 0.0 && OrderSymbol() == Symbol() && OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderProfit() < 0.0 && OrderSymbol() == Symbol() && OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); if (OrderSymbol() == Symbol() && OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderSymbol() == Symbol() && OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); RefreshRates(); if (gi_1908 > 0) Close_target(); } } } void Closeprofit() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderProfit() > 0.0 && OrderSymbol() == Symbol() && OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderProfit() > 0.0 && OrderSymbol() == Symbol() && OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void Closeppall() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (gi_1760) { if (OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); RefreshRates(); if (OrdersTotal() > 0) Closeppall(); } } } void breakeven() { bool l_bool_8; int l_error_12; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_bool_8 = FALSE; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY && High[0] - OrderOpenPrice() >= gi_492 * Point && OrderStopLoss() != OrderOpenPrice()) l_bool_8 = OrderModify(OrderTicket(), OrderOpenPrice(), OrderOpenPrice(), OrderTakeProfit(), 0, Green); if (OrderType() == OP_SELL && OrderOpenPrice() - Low[0] >= gi_492 * Point && OrderStopLoss() != OrderOpenPrice()) l_bool_8 = OrderModify(OrderTicket(), OrderOpenPrice(), OrderOpenPrice(), OrderTakeProfit(), 0, Green); l_error_12 = GetLastError(); } } } void profittarget() { bool l_ord_close_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_ord_close_8 = FALSE; if (OrderSymbol() == Symbol() && gd_1636 >= gd_884) { if (OrderType() == OP_BUY) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); if (OrderType() == OP_SELL) l_ord_close_8 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); } } } void close_all_orders() { int l_cmd_8; bool li_12; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); l_cmd_8 = OrderType(); li_12 = FALSE; switch (l_cmd_8) { case OP_BUY: li_12 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red); break; case OP_SELL: li_12 = OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 5, Red); break; case OP_BUYLIMIT: case OP_BUYSTOP: case OP_SELLLIMIT: case OP_SELLSTOP: li_12 = OrderDelete(OrderTicket()); } if (li_12 == FALSE) close_all_orders(); } } void morders() { int li_unused_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); li_unused_8 = 0; if (OrderMagicNumber() == 99 && OrderSymbol() == Symbol()) { if (OrderType() == OP_SELL) g_count_1696++; if (OrderType() == OP_BUY) g_count_1692++; if (OrderType() == OP_SELL) gd_1636 += OrderProfit(); if (OrderType() == OP_BUY) gd_1636 += OrderProfit(); if (OrderType() == OP_SELL) gd_1948 += OrderProfit(); if (OrderType() == OP_BUY) gd_1956 += OrderProfit(); if (OrderType() == OP_SELL) gd_784 += OrderLots(); if (OrderType() == OP_BUY) gd_792 += OrderLots(); } } } void orders() { int li_unused_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); li_unused_8 = 0; if (OrderSymbol() == Symbol()) { if (OrderType() == OP_SELL) g_count_1696++; if (OrderType() == OP_BUY) g_count_1692++; if (OrderType() == OP_SELL) gd_1636 += OrderProfit(); if (OrderType() == OP_BUY) gd_1636 += OrderProfit(); if (OrderType() == OP_SELL) gd_1948 += OrderProfit(); if (OrderType() == OP_BUY) gd_1956 += OrderProfit(); if (OrderType() == OP_SELL) gd_784 += OrderLots(); if (OrderType() == OP_BUY) gd_792 += OrderLots(); } } } void accorders() { int li_unused_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); li_unused_8 = 0; if (OrderType() == OP_SELL || OrderType() == OP_BUY) { if (OrderType() == OP_SELL) g_count_1708++; if (OrderType() == OP_BUY) g_count_1704++; } } } void maccorders() { int li_unused_8; int l_ord_total_0 = OrdersTotal(); for (int l_pos_4 = l_ord_total_0 - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_POS); li_unused_8 = 0; if (OrderMagicNumber() == 99 && OrderType() == OP_SELL || OrderType() == OP_BUY) { if (OrderType() == OP_SELL) g_count_1708++; if (OrderType() == OP_BUY) g_count_1704++; } } } void trail() { for (int l_pos_0 = 0; l_pos_0 < OrdersTotal(); l_pos_0++) { OrderSelect(l_pos_0, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() == Symbol()) { if (OrderType() == OP_BUY) { if (Bid - OrderOpenPrice() > TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT)) if (OrderStopLoss() < Bid - TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT)) OrderModify(OrderTicket(), OrderOpenPrice(), Bid - TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT), OrderTakeProfit(), 255); } else { if (OrderType() == OP_SELL) { if (OrderOpenPrice() - Ask > TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT)) if (OrderStopLoss() > Ask + TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT) || OrderStopLoss() == 0.0) OrderModify(OrderTicket(), OrderOpenPrice(), Ask + TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT), OrderTakeProfit(), 255); } } } } } int init() { if (type == 1) gi_204 = 10000; if (type == 2) gi_204 = 100000; if (type == 3) gi_204 = 1000000; g_bars_2052 = Bars; if (gi_308) gi_2056 = 0; else gi_2056 = 1; return (0); } int deinit() { ObjectsDeleteAll(0, OBJ_HLINE); return (0); } int start() { double ld_3104; double ld_3112; double ld_3120; int l_ticket_3136; int li_3140; double ld_3144; double ld_3152; int li_unused_3832; if (gi_1380) if (Hour() < gi_1384 || Hour() > gi_1388) gi_1428 = FALSE; if (gi_1380) if (Hour() >= gi_1384 && Hour() <= gi_1388) gi_1428 = TRUE; if (gi_1392) if (Hour() < gi_1396 || Hour() > gi_1400) gi_1432 = FALSE; if (gi_1392) if (Hour() >= gi_1396 && Hour() <= gi_1400) gi_1432 = TRUE; if (custom_balance == FALSE) balance = AccountBalance(); if (auto_balance) balance = AccountBalance() / divided; if (gi_300 && Period() == PERIOD_M1) { psar = 0.003; time_frame_for_signal = 30; psar2 = 0.06; time_frame_for_signal2 = 5; } if (gi_300 && Period() == PERIOD_M5) { psar = 0.003; time_frame_for_signal = 30; psar2 = 0.06; time_frame_for_signal2 = 5; } if (gi_300 && Period() == PERIOD_M15) { psar = 0.003; time_frame_for_signal = 30; psar2 = 0.06; time_frame_for_signal2 = 5; } if (gi_300 && Period() == PERIOD_M30) { psar = 0.003; time_frame_for_signal = 30; psar2 = 0.06; time_frame_for_signal2 = 5; } if (gi_300 && Period() == PERIOD_H1) { psar = 0.001; time_frame_for_signal = 240; psar2 = 0.002; time_frame_for_signal2 = 60; } if (gi_300 && Period() == PERIOD_H4) { psar = 0.001; time_frame_for_signal = 240; psar2 = 0.002; time_frame_for_signal2 = 60; } if (gi_300 && Period() == PERIOD_D1) { psar = 0.001; time_frame_for_signal = 240; psar2 = 0.002; time_frame_for_signal2 = 60; } if (gi_300 && Period() == PERIOD_W1) { psar = 0.001; time_frame_for_signal = 240; psar2 = 0.002; time_frame_for_signal2 = 60; } if (gi_300 && Period() == PERIOD_MN1) { psar = 0.001; time_frame_for_signal = 240; psar2 = 0.002; time_frame_for_signal2 = 60; } double ld_0 = 100.0 * ((AccountEquity() - AccountBalance()) / AccountBalance()); int li_8 = g_count_1696 + g_count_1692; int li_12 = g_count_1696 - g_count_1692; int li_unused_16 = 5000.0 * (gd_1636 / LotsOptimized()); int li_20 = 1; if (gi_312 && li_8 == 0) gi_316 = FALSE; if (gi_312 && li_8 > 0) gi_316 = TRUE; if (gi_312 && gi_780 == 2) gi_316 = TRUE; if (DayOfWeek() == 0 || DayOfWeek() == 1) li_20 = 2; if (DayOfWeek() > 1) li_20 = 1; double ld_24 = gd_784 + gd_792; double l_lots_32 = 2.0 * gd_784 - gd_792; double l_lots_40 = 2.0 * gd_792 - gd_784; double l_iclose_48 = iClose(NULL, 0, gi_2056 + 0); double l_ienvelopes_56 = iEnvelopes(NULL, g_timeframe_276, g_period_264, MODE_SMMA, 0, PRICE_CLOSE, g_deviation_268, MODE_UPPER, gi_2056 + 0); double l_ienvelopes_64 = iEnvelopes(NULL, g_timeframe_276, g_period_264, MODE_SMMA, 0, PRICE_CLOSE, g_deviation_268, MODE_LOWER, gi_2056 + 0); double l_ima_72 = iMA(NULL, 0, g_period_1316, gi_1320, g_ma_method_1324, g_applied_price_1328, gi_2056 + 1); double l_ima_80 = iMA(NULL, 0, g_period_1340, gi_1344, g_ma_method_1348, g_applied_price_1352, gi_2056 + 1); double l_iclose_88 = iClose(NULL, 0, gi_2056 + 0); double l_isar_96 = iSAR(NULL, time_frame_for_signal, psar, gd_348, gi_2056 + 0); double l_iclose_104 = iClose(NULL, 0, gi_2056 + 0); double l_isar_112 = iSAR(NULL, time_frame_for_signal2, psar2, gd_388, gi_2056 + 0); double l_iatr_120 = iATR(NULL, g_timeframe_1140, g_period_1128, 0); double ld_128 = gd_1132; double l_ima_136 = iMA(NULL, g_timeframe_296, g_period_292, gi_1320, MODE_EMA, g_applied_price_1328, gi_2056 + 0); if (gi_244 && l_iclose_48 > l_ienvelopes_56 || l_iclose_48 < l_ienvelopes_64) { Maximum_Risk = gd_248; profit_target_percent = gd_256; } if (gi_244 && l_iclose_48 < l_ienvelopes_56 && l_iclose_48 > l_ienvelopes_64) { Maximum_Risk = 0.1; profit_target_percent = 0.1; } if (gi_288 && l_iclose_48 > l_ima_136) { gi_280 = TRUE; gi_284 = FALSE; } if (gi_288 && l_iclose_48 < l_ima_136) { gi_280 = FALSE; gi_284 = TRUE; } if (gi_288 == FALSE) { gi_280 = TRUE; gi_284 = TRUE; } double l_ihigh_144 = iHigh(NULL, PERIOD_MN1, 1); double l_ilow_152 = iLow(NULL, PERIOD_MN1, 1); double l_iopen_160 = iOpen(NULL, PERIOD_MN1, 1); double l_iclose_168 = iClose(NULL, PERIOD_MN1, 1); double l_ihigh_176 = iHigh(NULL, PERIOD_MN1, 2); double l_ilow_184 = iLow(NULL, PERIOD_MN1, 2); double l_iopen_192 = iOpen(NULL, PERIOD_MN1, 2); double l_iclose_200 = iClose(NULL, PERIOD_MN1, 2); double l_ihigh_208 = iHigh(NULL, PERIOD_W1, 1); double l_ilow_216 = iLow(NULL, PERIOD_W1, 1); double l_iopen_224 = iOpen(NULL, PERIOD_W1, 1); double l_iclose_232 = iClose(NULL, PERIOD_W1, 1); double l_ihigh_240 = iHigh(NULL, PERIOD_W1, 2); double l_ilow_248 = iLow(NULL, PERIOD_W1, 2); double l_iopen_256 = iOpen(NULL, PERIOD_W1, 2); double l_iclose_264 = iClose(NULL, PERIOD_W1, 2); double l_ihigh_272 = iHigh(NULL, PERIOD_H1, 1); double l_ilow_280 = iLow(NULL, PERIOD_H1, 1); double l_iopen_288 = iOpen(NULL, PERIOD_H1, 1); double l_iclose_296 = iClose(NULL, PERIOD_H1, 1); double l_ihigh_304 = iHigh(NULL, PERIOD_H1, 2); double l_ilow_312 = iLow(NULL, PERIOD_H1, 2); double l_iopen_320 = iOpen(NULL, PERIOD_H1, 2); double l_iclose_328 = iClose(NULL, PERIOD_H1, 2); double l_ihigh_336 = iHigh(NULL, PERIOD_H4, 1); double l_ilow_344 = iLow(NULL, PERIOD_H4, 1); double l_iopen_352 = iOpen(NULL, PERIOD_H4, 1); double l_iclose_360 = iClose(NULL, PERIOD_H4, 1); double l_ihigh_368 = iHigh(NULL, PERIOD_H4, 2); double l_ilow_376 = iLow(NULL, PERIOD_H4, 2); double l_iopen_384 = iOpen(NULL, PERIOD_H4, 2); double l_iclose_392 = iClose(NULL, PERIOD_H4, 2); double l_ihigh_400 = iHigh(NULL, PERIOD_D1, 1); double l_ilow_408 = iLow(NULL, PERIOD_D1, 1); double l_iopen_416 = iOpen(NULL, PERIOD_D1, 1); double l_iclose_424 = iClose(NULL, PERIOD_D1, 1); double l_ihigh_432 = iHigh(NULL, PERIOD_D1, 2); double l_ilow_440 = iLow(NULL, PERIOD_D1, 2); double l_iopen_448 = iOpen(NULL, PERIOD_D1, 2); double l_iclose_456 = iClose(NULL, PERIOD_D1, 2); double l_ihigh_464 = iHigh(NULL, PERIOD_H1, gi_588); double l_ilow_472 = iLow(NULL, PERIOD_H1, gi_588); double l_iopen_480 = iOpen(NULL, PERIOD_H1, gi_588); double l_iclose_488 = iClose(NULL, PERIOD_H1, gi_588); double ld_496 = l_ihigh_464 - l_ilow_472; double l_price_504 = 100.0 * (ld_496 / 100.0) + l_ilow_472; double l_price_512 = 76.4 * (ld_496 / 100.0) + l_ilow_472; double l_price_520 = 61.8 * (ld_496 / 100.0) + l_ilow_472; double l_price_528 = 50.0 * (ld_496 / 100.0) + l_ilow_472; double l_price_536 = 38.2 * (ld_496 / 100.0) + l_ilow_472; double l_price_544 = 23.6 * (ld_496 / 100.0) + l_ilow_472; double l_price_552 = 0.0 * (ld_496 / 100.0) + l_ilow_472; if (gi_1984 && ObjectFind("h11_100") != 0) { ObjectCreate("h11_100", OBJ_HLINE, 0, Time[0], l_price_504); ObjectSet("h11_100", OBJPROP_COLOR, White); ObjectSet("h11_100", OBJPROP_WIDTH, 0); } else ObjectMove("h11_100", 0, Time[0], l_price_504); if (gi_1984 && ObjectFind("h11_73") != 0) { ObjectCreate("h11_73", OBJ_HLINE, 0, Time[0], l_price_512); ObjectSet("h11_73", OBJPROP_COLOR, White); ObjectSet("h11_73", OBJPROP_WIDTH, 0); } else ObjectMove("h11_73", 0, Time[0], l_price_512); if (gi_1984 && ObjectFind("h11_61") != 0) { ObjectCreate("h11_61", OBJ_HLINE, 0, Time[0], l_price_520); ObjectSet("h11_61", OBJPROP_COLOR, White); ObjectSet("h11_61", OBJPROP_WIDTH, 0); } else ObjectMove("h11_61", 0, Time[0], l_price_520); if (gi_1984 && ObjectFind("h11_50") != 0) { ObjectCreate("h11_50", OBJ_HLINE, 0, Time[0], l_price_528); ObjectSet("h11_50", OBJPROP_COLOR, White); ObjectSet("h11_50", OBJPROP_WIDTH, 0); } else ObjectMove("h11_50", 0, Time[0], l_price_528); if (gi_1984 && ObjectFind("h11_38") != 0) { ObjectCreate("h11_38", OBJ_HLINE, 0, Time[0], l_price_536); ObjectSet("h11_38", OBJPROP_COLOR, White); ObjectSet("h11_38", OBJPROP_WIDTH, 0); } else ObjectMove("h11_38", 0, Time[0], l_price_536); if (gi_1984 && ObjectFind("h11_23") != 0) { ObjectCreate("h11_23", OBJ_HLINE, 0, Time[0], l_price_544); ObjectSet("h11_23", OBJPROP_COLOR, White); ObjectSet("h11_23", OBJPROP_WIDTH, 0); } else ObjectMove("h11_23", 0, Time[0], l_price_544); if (gi_1984 && ObjectFind("h11_0") != 0) { ObjectCreate("h11_0", OBJ_HLINE, 0, Time[0], l_price_552); ObjectSet("h11_0", OBJPROP_COLOR, White); ObjectSet("h11_0", OBJPROP_WIDTH, 0); } else ObjectMove("h11_0", 0, Time[0], l_price_552); double l_ihigh_560 = iHigh(NULL, PERIOD_H4, gi_588); double l_ilow_568 = iLow(NULL, PERIOD_H4, gi_588); double l_iopen_576 = iOpen(NULL, PERIOD_H4, gi_588); double l_iclose_584 = iClose(NULL, PERIOD_H4, gi_588); double ld_592 = l_ihigh_560 - l_ilow_568; double l_price_600 = 100.0 * (ld_592 / 100.0) + l_ilow_568; double l_price_608 = 76.4 * (ld_592 / 100.0) + l_ilow_568; double l_price_616 = 61.8 * (ld_592 / 100.0) + l_ilow_568; double l_price_624 = 50.0 * (ld_592 / 100.0) + l_ilow_568; double l_price_632 = 38.2 * (ld_592 / 100.0) + l_ilow_568; double l_price_640 = 23.6 * (ld_592 / 100.0) + l_ilow_568; double l_price_648 = 0.0 * (ld_592 / 100.0) + l_ilow_568; if (gi_1988 && ObjectFind("h41_100") != 0) { ObjectCreate("h41_100", OBJ_HLINE, 0, Time[0], l_price_600); ObjectSet("h41_100", OBJPROP_COLOR, Yellow); ObjectSet("h41_100", OBJPROP_WIDTH, 0); } else ObjectMove("h41_100", 0, Time[0], l_price_600); if (gi_1988 && ObjectFind("h41_73") != 0) { ObjectCreate("h41_73", OBJ_HLINE, 0, Time[0], l_price_608); ObjectSet("h41_73", OBJPROP_COLOR, Yellow); ObjectSet("h41_73", OBJPROP_WIDTH, 0); } else ObjectMove("h41_73", 0, Time[0], l_price_608); if (gi_1988 && ObjectFind("h41_61") != 0) { ObjectCreate("h41_61", OBJ_HLINE, 0, Time[0], l_price_616); ObjectSet("h41_61", OBJPROP_COLOR, Yellow); ObjectSet("h41_61", OBJPROP_WIDTH, 0); } else ObjectMove("h41_61", 0, Time[0], l_price_616); if (gi_1988 && ObjectFind("h41_50") != 0) { ObjectCreate("h41_50", OBJ_HLINE, 0, Time[0], l_price_624); ObjectSet("h41_50", OBJPROP_COLOR, Yellow); ObjectSet("h41_50", OBJPROP_WIDTH, 0); } else ObjectMove("h41_50", 0, Time[0], l_price_624); if (gi_1988 && ObjectFind("h41_38") != 0) { ObjectCreate("h41_38", OBJ_HLINE, 0, Time[0], l_price_632); ObjectSet("h41_38", OBJPROP_COLOR, Yellow); ObjectSet("h41_38", OBJPROP_WIDTH, 0); } else ObjectMove("h41_38", 0, Time[0], l_price_632); if (gi_1988 && ObjectFind("h41_23") != 0) { ObjectCreate("h41_23", OBJ_HLINE, 0, Time[0], l_price_640); ObjectSet("h41_23", OBJPROP_COLOR, Yellow); ObjectSet("h41_23", OBJPROP_WIDTH, 0); } else ObjectMove("h41_23", 0, Time[0], l_price_640); if (gi_1988 && ObjectFind("h41_0") != 0) { ObjectCreate("h41_0", OBJ_HLINE, 0, Time[0], l_price_648); ObjectSet("h41_0", OBJPROP_COLOR, Yellow); ObjectSet("h41_0", OBJPROP_WIDTH, 0); } else ObjectMove("h41_0", 0, Time[0], l_price_648); double l_ihigh_656 = iHigh(NULL, PERIOD_D1, gi_588); double l_ilow_664 = iLow(NULL, PERIOD_D1, gi_588); double l_iopen_672 = iOpen(NULL, PERIOD_D1, gi_588); double l_iclose_680 = iClose(NULL, PERIOD_D1, gi_588); double ld_688 = l_ihigh_656 - l_ilow_664; double l_price_696 = 100.0 * (ld_688 / 100.0) + l_ilow_664; double l_price_704 = 76.4 * (ld_688 / 100.0) + l_ilow_664; double l_price_712 = 61.8 * (ld_688 / 100.0) + l_ilow_664; double l_price_720 = 50.0 * (ld_688 / 100.0) + l_ilow_664; double l_price_728 = 38.2 * (ld_688 / 100.0) + l_ilow_664; double l_price_736 = 23.6 * (ld_688 / 100.0) + l_ilow_664; double l_price_744 = 0.0 * (ld_688 / 100.0) + l_ilow_664; if (gi_1992 && ObjectFind("day1_100") != 0) { ObjectCreate("day1_100", OBJ_HLINE, 0, Time[0], l_price_696); ObjectSet("day1_100", OBJPROP_COLOR, Orange); ObjectSet("day1_100", OBJPROP_WIDTH, 0); } else ObjectMove("day1_100", 0, Time[0], l_price_696); if (gi_1992 && ObjectFind("day1_73") != 0) { ObjectCreate("day1_73", OBJ_HLINE, 0, Time[0], l_price_704); ObjectSet("day1_73", OBJPROP_COLOR, Orange); ObjectSet("day1_73", OBJPROP_WIDTH, 0); } else ObjectMove("day1_73", 0, Time[0], l_price_704); if (gi_1992 && ObjectFind("day1_61") != 0) { ObjectCreate("day1_61", OBJ_HLINE, 0, Time[0], l_price_712); ObjectSet("day1_61", OBJPROP_COLOR, Orange); ObjectSet("day1_61", OBJPROP_WIDTH, 0); } else ObjectMove("day1_61", 0, Time[0], l_price_712); if (gi_1992 && ObjectFind("day1_50") != 0) { ObjectCreate("day1_50", OBJ_HLINE, 0, Time[0], l_price_720); ObjectSet("day1_50", OBJPROP_COLOR, Orange); ObjectSet("day1_50", OBJPROP_WIDTH, 0); } else ObjectMove("day1_50", 0, Time[0], l_price_720); if (gi_1992 && ObjectFind("day1_38") != 0) { ObjectCreate("day1_38", OBJ_HLINE, 0, Time[0], l_price_728); ObjectSet("day1_38", OBJPROP_COLOR, Orange); ObjectSet("day1_38", OBJPROP_WIDTH, 0); } else ObjectMove("day1_38", 0, Time[0], l_price_728); if (gi_1992 && ObjectFind("day1_23") != 0) { ObjectCreate("day1_23", OBJ_HLINE, 0, Time[0], l_price_736); ObjectSet("day1_23", OBJPROP_COLOR, Orange); ObjectSet("day1_23", OBJPROP_WIDTH, 0); } else ObjectMove("day1_23", 0, Time[0], l_price_736); if (gi_1992 && ObjectFind("day1_0") != 0) { ObjectCreate("day1_0", OBJ_HLINE, 0, Time[0], l_price_744); ObjectSet("day1_0", OBJPROP_COLOR, Orange); ObjectSet("day1_0", OBJPROP_WIDTH, 0); } else ObjectMove("day1_0", 0, Time[0], l_price_744); double l_ihigh_752 = iHigh(NULL, PERIOD_W1, gi_588); double l_ilow_760 = iLow(NULL, PERIOD_W1, gi_588); double l_iopen_768 = iOpen(NULL, PERIOD_W1, gi_588); double l_iclose_776 = iClose(NULL, PERIOD_W1, gi_588); double ld_784 = -0.618; double ld_792 = -1.618; double ld_800 = l_ihigh_752 - l_ilow_760; double ld_808 = 261.8 * (ld_800 / 100.0) + l_ilow_760; double ld_816 = 161.8 * (ld_800 / 100.0) + l_ilow_760; double l_price_824 = 100.0 * (ld_800 / 100.0) + l_ilow_760; double l_price_832 = 76.4 * (ld_800 / 100.0) + l_ilow_760; double l_price_840 = 61.8 * (ld_800 / 100.0) + l_ilow_760; double l_price_848 = 50.0 * (ld_800 / 100.0) + l_ilow_760; double l_price_856 = 38.2 * (ld_800 / 100.0) + l_ilow_760; double l_price_864 = 23.6 * (ld_800 / 100.0) + l_ilow_760; double l_price_872 = 0.0 * (ld_800 / 100.0) + l_ilow_760; double ld_880 = ld_800 / 100.0 * ld_784 + l_ilow_760; double ld_888 = ld_800 / 100.0 * ld_792 + l_ilow_760; if (gi_1996 && ObjectFind("week1_100") != 0) { ObjectCreate("week1_100", OBJ_HLINE, 0, Time[0], l_price_824); ObjectSet("week1_100", OBJPROP_COLOR, Red); ObjectSet("week1_100", OBJPROP_WIDTH, 0); } else ObjectMove("week1_100", 0, Time[0], l_price_824); if (gi_1996 && ObjectFind("week1_73") != 0) { ObjectCreate("week1_73", OBJ_HLINE, 0, Time[0], l_price_832); ObjectSet("week1_73", OBJPROP_COLOR, Red); ObjectSet("week1_73", OBJPROP_WIDTH, 0); } else ObjectMove("week1_73", 0, Time[0], l_price_832); if (gi_1996 && ObjectFind("week1_61") != 0) { ObjectCreate("week1_61", OBJ_HLINE, 0, Time[0], l_price_840); ObjectSet("week1_61", OBJPROP_COLOR, Red); ObjectSet("week1_61", OBJPROP_WIDTH, 0); } else ObjectMove("week1_61", 0, Time[0], l_price_840); if (gi_1996 && ObjectFind("week1_50") != 0) { ObjectCreate("week1_50", OBJ_HLINE, 0, Time[0], l_price_848); ObjectSet("week1_50", OBJPROP_COLOR, Red); ObjectSet("week1_50", OBJPROP_WIDTH, 0); } else ObjectMove("week1_50", 0, Time[0], l_price_848); if (gi_1996 && ObjectFind("week1_38") != 0) { ObjectCreate("week1_38", OBJ_HLINE, 0, Time[0], l_price_856); ObjectSet("week1_38", OBJPROP_COLOR, Red); ObjectSet("week1_38", OBJPROP_WIDTH, 0); } else ObjectMove("week1_38", 0, Time[0], l_price_856); if (gi_1996 && ObjectFind("week1_23") != 0) { ObjectCreate("week1_23", OBJ_HLINE, 0, Time[0], l_price_864); ObjectSet("week1_23", OBJPROP_COLOR, Red); ObjectSet("week1_23", OBJPROP_WIDTH, 0); } else ObjectMove("week1_23", 0, Time[0], l_price_864); if (gi_1996 && ObjectFind("week1_0") != 0) { ObjectCreate("week1_0", OBJ_HLINE, 0, Time[0], l_price_872); ObjectSet("week1_0", OBJPROP_COLOR, Red); ObjectSet("week1_0", OBJPROP_WIDTH, 0); } else ObjectMove("week1_0", 0, Time[0], l_price_872); double l_ihigh_896 = iHigh(NULL, PERIOD_MN1, gi_588); double l_ilow_904 = iLow(NULL, PERIOD_MN1, gi_588); double l_iopen_912 = iOpen(NULL, PERIOD_MN1, gi_588); double l_iclose_920 = iClose(NULL, PERIOD_MN1, gi_588); double ld_928 = l_ihigh_896 - l_ilow_904; double l_price_936 = 100.0 * (ld_928 / 100.0) + l_ilow_904; double l_price_944 = 76.4 * (ld_928 / 100.0) + l_ilow_904; double l_price_952 = 61.8 * (ld_928 / 100.0) + l_ilow_904; double l_price_960 = 50.0 * (ld_928 / 100.0) + l_ilow_904; double l_price_968 = 38.2 * (ld_928 / 100.0) + l_ilow_904; double l_price_976 = 23.6 * (ld_928 / 100.0) + l_ilow_904; double l_price_984 = 0.0 * (ld_928 / 100.0) + l_ilow_904; if (gi_2000 && ObjectFind("month1_100") != 0) { ObjectCreate("month1_100", OBJ_HLINE, 0, Time[0], l_price_936); ObjectSet("month1_100", OBJPROP_COLOR, Blue); ObjectSet("month1_100", OBJPROP_WIDTH, 0); } else ObjectMove("month1_100", 0, Time[0], l_price_936); if (gi_2000 && ObjectFind("month1_73") != 0) { ObjectCreate("month1_73", OBJ_HLINE, 0, Time[0], l_price_944); ObjectSet("month1_73", OBJPROP_COLOR, Blue); ObjectSet("month1_73", OBJPROP_WIDTH, 0); } else ObjectMove("month1_73", 0, Time[0], l_price_944); if (gi_2000 && ObjectFind("month1_61") != 0) { ObjectCreate("month1_61", OBJ_HLINE, 0, Time[0], l_price_952); ObjectSet("month1_61", OBJPROP_COLOR, Blue); ObjectSet("month1_61", OBJPROP_WIDTH, 0); } else ObjectMove("month1_61", 0, Time[0], l_price_952); if (gi_2000 && ObjectFind("month1_50") != 0) { ObjectCreate("month1_50", OBJ_HLINE, 0, Time[0], l_price_960); ObjectSet("month1_50", OBJPROP_COLOR, Blue); ObjectSet("month1_50", OBJPROP_WIDTH, 0); } else ObjectMove("month1_50", 0, Time[0], l_price_960); if (gi_2000 && ObjectFind("month1_38") != 0) { ObjectCreate("month1_38", OBJ_HLINE, 0, Time[0], l_price_968); ObjectSet("month1_38", OBJPROP_COLOR, Blue); ObjectSet("month1_38", OBJPROP_WIDTH, 0); } else ObjectMove("month1_38", 0, Time[0], l_price_968); if (gi_2000 && ObjectFind("month1_23") != 0) { ObjectCreate("month1_23", OBJ_HLINE, 0, Time[0], l_price_976); ObjectSet("month1_23", OBJPROP_COLOR, Blue); ObjectSet("month1_23", OBJPROP_WIDTH, 0); } else ObjectMove("month1_23", 0, Time[0], l_price_976); if (gi_2000 && ObjectFind("month1_0") != 0) { ObjectCreate("month1_0", OBJ_HLINE, 0, Time[0], l_price_984); ObjectSet("month1_0", OBJPROP_COLOR, Blue); ObjectSet("month1_0", OBJPROP_WIDTH, 0); } else ObjectMove("month1_0", 0, Time[0], l_price_984); double l_ihigh_992 = iHigh(NULL, g_timeframe_552, li_20); double l_ilow_1000 = iLow(NULL, g_timeframe_552, li_20); double ld_1008 = l_ihigh_992 / 2.0; double ld_1016 = l_ilow_1000 / 2.0; double ld_1024 = ld_1008 + ld_1016; double ld_1032 = ld_1024 / 2.0; double ld_1040 = ld_1032 + ld_1008; double ld_1048 = ld_1032 + ld_1016; double l_ihigh_1056 = iHigh(NULL, g_timeframe_620, gi_588); double l_ilow_1064 = iLow(NULL, g_timeframe_620, gi_588); double l_ihigh_1072 = iHigh(NULL, g_timeframe_532, 1); double l_ilow_1080 = iLow(NULL, g_timeframe_532, 1); double ld_1088 = l_ihigh_1056 / 2.0; double ld_1096 = l_ilow_1064 / 2.0; double ld_1104 = l_ihigh_1056 - l_ilow_1064; double l_price_1112 = ld_1104 / 100.0 * gi_628 + l_ilow_1064; double ld_1120 = l_price_1112 / 2.0; double ld_1128 = ld_1120 + ld_1088; double ld_1136 = ld_1120 + ld_1096; double l_ihigh_1144 = iHigh(NULL, g_timeframe_656, gi_588); double l_ilow_1152 = iLow(NULL, g_timeframe_656, gi_588); double ld_1160 = l_ihigh_1144 / 2.0; double ld_1168 = l_ilow_1152 / 2.0; double ld_1176 = l_ihigh_1144 - l_ilow_1152; double l_price_1184 = ld_1176 / 100.0 * gi_664 + l_ilow_1152; double ld_1192 = l_price_1184 / 2.0; double ld_1200 = ld_1192 + ld_1160; double ld_1208 = ld_1192 + ld_1168; double l_ihigh_1216 = iHigh(NULL, g_timeframe_644, gi_588); double l_ilow_1224 = iLow(NULL, g_timeframe_644, gi_588); double ld_1232 = l_ihigh_1216 / 2.0; double ld_1240 = l_ilow_1224 / 2.0; double ld_1248 = l_ihigh_1216 - l_ilow_1224; double l_price_1256 = ld_1248 / 100.0 * gi_652 + l_ilow_1224; double ld_1264 = l_price_1256 / 2.0; double ld_1272 = ld_1264 + ld_1232; double ld_1280 = ld_1264 + ld_1240; double l_ihigh_1288 = iHigh(NULL, g_timeframe_632, li_20); double l_ilow_1296 = iLow(NULL, g_timeframe_632, li_20); double ld_1304 = l_ihigh_1288 / 2.0; double ld_1312 = l_ilow_1296 / 2.0; double ld_1320 = l_ihigh_1288 - l_ilow_1296; double l_price_1328 = ld_1320 / 100.0 * gi_640 + l_ilow_1296; double ld_1336 = l_price_1328 / 2.0; double ld_1344 = ld_1336 + ld_1304; double ld_1352 = ld_1336 + ld_1312; double l_ihigh_1360 = iHigh(NULL, g_timeframe_604, gi_588); double l_ilow_1368 = iLow(NULL, g_timeframe_604, gi_588); double ld_1376 = l_ihigh_1360 / 2.0; double ld_1384 = l_ilow_1368 / 2.0; double ld_1392 = l_ihigh_1360 - l_ilow_1368; double l_price_1400 = ld_1392 / 100.0 * gd_612 + l_ilow_1368; double ld_1408 = l_price_1400 / 2.0; double ld_1416 = ld_1408 + ld_1376; double ld_1424 = ld_1408 + ld_1384; double l_ihigh_1432 = iHigh(NULL, g_timeframe_692, gi_588); double l_ilow_1440 = iLow(NULL, g_timeframe_692, gi_588); double ld_1448 = l_ihigh_1432 / 2.0; double ld_1456 = l_ilow_1440 / 2.0; double ld_1464 = l_ihigh_1432 - l_ilow_1440; double l_price_1472 = ld_1464 / 100.0 * gi_700 + l_ilow_1440; double ld_1480 = l_price_1472 / 2.0; double ld_1488 = ld_1480 + ld_1448; double ld_1496 = ld_1480 + ld_1456; double l_ihigh_1504 = iHigh(NULL, g_timeframe_728, gi_588); double l_ilow_1512 = iLow(NULL, g_timeframe_728, gi_588); double ld_1520 = l_ihigh_1504 / 2.0; double ld_1528 = l_ilow_1512 / 2.0; double ld_1536 = l_ihigh_1144 - l_ilow_1512; double l_price_1544 = ld_1536 / 100.0 * gi_736 + l_ilow_1512; double ld_1552 = l_price_1544 / 2.0; double ld_1560 = ld_1552 + ld_1520; double ld_1568 = ld_1552 + ld_1528; double l_ihigh_1576 = iHigh(NULL, g_timeframe_716, gi_588); double l_ilow_1584 = iLow(NULL, g_timeframe_716, gi_588); double ld_1592 = l_ihigh_1576 / 2.0; double ld_1600 = l_ilow_1584 / 2.0; double ld_1608 = l_ihigh_1576 - l_ilow_1584; double l_price_1616 = ld_1608 / 100.0 * gi_724 + l_ilow_1584; double ld_1624 = l_price_1616 / 2.0; double ld_1632 = ld_1624 + ld_1592; double ld_1640 = ld_1624 + ld_1600; double l_ihigh_1648 = iHigh(NULL, g_timeframe_704, li_20); double l_ilow_1656 = iLow(NULL, g_timeframe_704, li_20); double ld_1664 = l_ihigh_1648 / 2.0; double ld_1672 = l_ilow_1656 / 2.0; double ld_1680 = l_ihigh_1648 - l_ilow_1656; double l_price_1688 = ld_1680 / 100.0 * gi_712 + l_ilow_1656; double ld_1696 = l_price_1688 / 2.0; double ld_1704 = ld_1696 + ld_1664; double ld_1712 = ld_1696 + ld_1672; double l_ihigh_1720 = iHigh(NULL, g_timeframe_676, gi_588); double l_ilow_1728 = iLow(NULL, g_timeframe_676, gi_588); double ld_1736 = l_ihigh_1720 / 2.0; double ld_1744 = l_ilow_1728 / 2.0; double ld_1752 = l_ihigh_1720 - l_ilow_1728; double l_price_1760 = ld_1752 / 100.0 * gd_684 + l_ilow_1728; double ld_1768 = l_price_1760 / 2.0; double ld_1776 = ld_1768 + ld_1736; double ld_1784 = ld_1768 + ld_1744; if (gi_592 && ObjectFind("hpivots") != 0) { ObjectCreate("hpivots", OBJ_HLINE, 0, Time[0], l_price_1760); ObjectSet("hpivots", OBJPROP_COLOR, White); ObjectSet("hpivots", OBJPROP_WIDTH, 0); } else ObjectMove("hpivots", 0, Time[0], l_price_1760); if (gi_592 && ObjectFind("hpivot") != 0) { ObjectCreate("hpivot", OBJ_HLINE, 0, Time[0], l_price_1400); ObjectSet("hpivot", OBJPROP_COLOR, White); ObjectSet("hpivot", OBJPROP_WIDTH, 0); } else ObjectMove("hpivot", 0, Time[0], l_price_1400); if (gi_592 && ObjectFind("pivots") != 0) { ObjectCreate("pivots", OBJ_HLINE, 0, Time[0], l_price_1472); ObjectSet("pivots", OBJPROP_COLOR, Orange); ObjectSet("pivots", OBJPROP_WIDTH, 0); } else ObjectMove("pivots", 0, Time[0], l_price_1472); if (gi_592 && ObjectFind("pivot") != 0) { ObjectCreate("pivot", OBJ_HLINE, 0, Time[0], l_price_1112); ObjectSet("pivot", OBJPROP_COLOR, Orange); ObjectSet("pivot", OBJPROP_WIDTH, 0); } else ObjectMove("pivot", 0, Time[0], l_price_1112); if (gi_592 && ObjectFind("dpivots") != 0) { ObjectCreate("dpivots", OBJ_HLINE, 0, Time[0], l_price_1688); ObjectSet("dpivots", OBJPROP_COLOR, OrangeRed); ObjectSet("dpivots", OBJPROP_WIDTH, 0); } else ObjectMove("dpivots", 0, Time[0], l_price_1688); if (gi_592 && ObjectFind("dpivot") != 0) { ObjectCreate("dpivot", OBJ_HLINE, 0, Time[0], l_price_1328); ObjectSet("dpivot", OBJPROP_COLOR, OrangeRed); ObjectSet("dpivot", OBJPROP_WIDTH, 0); } else ObjectMove("dpivot", 0, Time[0], l_price_1328); if (gi_592 && ObjectFind("wpivots") != 0) { ObjectCreate("wpivots", OBJ_HLINE, 0, Time[0], l_price_1616); ObjectSet("wpivots", OBJPROP_COLOR, Red); ObjectSet("wpivots", OBJPROP_WIDTH, 0); } else ObjectMove("wpivots", 0, Time[0], l_price_1616); if (gi_592 && ObjectFind("wpivot") != 0) { ObjectCreate("wpivot", OBJ_HLINE, 0, Time[0], l_price_1256); ObjectSet("wpivot", OBJPROP_COLOR, Red); ObjectSet("wpivot", OBJPROP_WIDTH, 0); } else ObjectMove("wpivot", 0, Time[0], l_price_1256); if (gi_592 && ObjectFind("mpivots") != 0) { ObjectCreate("mpivots", OBJ_HLINE, 0, Time[0], l_price_1544); ObjectSet("mpivots", OBJPROP_COLOR, Blue); ObjectSet("mpivots", OBJPROP_WIDTH, 0); } else ObjectMove("mpivots", 0, Time[0], l_price_1544); if (gi_592 && ObjectFind("mpivot") != 0) { ObjectCreate("mpivot", OBJ_HLINE, 0, Time[0], l_price_1184); ObjectSet("mpivot", OBJPROP_COLOR, Blue); ObjectSet("mpivot", OBJPROP_WIDTH, 0); } else ObjectMove("mpivot", 0, Time[0], l_price_1184); if (l_iclose_48 == l_price_1400) gi_unused_992 = TRUE; if (l_iclose_48 == l_price_1760) gi_unused_996 = TRUE; if (l_iclose_48 == l_price_1112) gi_unused_1000 = TRUE; if (l_iclose_48 == l_price_1472) gi_unused_1004 = TRUE; if (l_iclose_48 == l_price_1328) gi_unused_1008 = TRUE; if (l_iclose_48 == l_price_1688) gi_unused_1012 = TRUE; if (l_iclose_48 == l_price_1256) gi_unused_1016 = TRUE; if (l_iclose_48 == l_price_1616) gi_unused_1020 = TRUE; if (l_iclose_48 == l_price_1184) gi_unused_1024 = TRUE; if (l_iclose_48 == l_price_1544) gi_unused_1028 = TRUE; if (gi_528 && l_iclose_48 > l_ihigh_1072) { gi_740 = TRUE; gi_744 = FALSE; } if (gi_528 && l_iclose_48 < l_ihigh_1072) gi_740 = FALSE; if (gi_528 && l_iclose_48 > l_ilow_1080) gi_744 = FALSE; if (gi_528 && l_iclose_48 < l_ilow_1080) { gi_740 = FALSE; gi_744 = TRUE; } if (gi_584 && l_iclose_48 > l_price_1112 && l_iclose_48 > l_price_1400 && l_iclose_48 > l_price_1328 && l_iclose_48 > l_price_1256 && l_iclose_48 > l_price_1184) gi_740 = TRUE; if (gi_584 && l_iclose_48 < l_price_1112 || l_iclose_48 < l_price_1400 || l_iclose_48 < l_price_1328 || l_iclose_48 < l_price_1256 || l_iclose_48 < l_price_1184) gi_740 = FALSE; if (gi_584 && l_iclose_48 > l_price_1472 || l_iclose_48 > l_price_1760 || l_iclose_48 > l_price_1688 || l_iclose_48 > l_price_1616 || l_iclose_48 > l_price_1544) gi_744 = FALSE; if (gi_584 && l_iclose_48 < l_price_1472 && l_iclose_48 < l_price_1760 && l_iclose_48 < l_price_1688 && l_iclose_48 < l_price_1616 && l_iclose_48 < l_price_1544) gi_744 = TRUE; if (gi_548 && l_iclose_48 > ld_1040) gi_740 = TRUE; if (gi_548 && l_iclose_48 < ld_1040) gi_740 = FALSE; if (gi_548 && l_iclose_48 > ld_1048) gi_744 = FALSE; if (gi_548 && l_iclose_48 < ld_1048) gi_744 = TRUE; if (gd_1668 > 0.0 && gi_756 && Minute() == 1) Closeprofit(); if (gi_1232 && ld_0 < gd_1236) gi_1448 = TRUE; if (gi_1232 && ld_0 > gd_1236) gi_1448 = FALSE; if (gi_1244 && ld_0 < gd_1248) gi_1468 = TRUE; if (gi_1244 && ld_0 > gd_1248) gi_1468 = FALSE; if (gi_1440 == 4) gi_1440 = 1; if (gi_1444 == 4) gi_1444 = 1; if (gi_1444 == 1 && gi_1468) scale_take_profit(); if (gi_1444 == 2 && gi_1468) scale_take_profit2(); if (gi_1444 == 3 && gi_1468) { scale_take_profit3(); gi_1444++; } if (gi_1440 == 1 && gi_1448) { scale_stop_loss(); gi_1440++; } if (gi_1440 == 2 && gi_1448) { scale_stop_loss2(); gi_1440++; } if (gi_1440 == 3 && gi_1448) { scale_stop_loss3(); gi_1440++; } if (gi_496) hidden_stop_loss(); if (gi_504) hidden_take_profit(); if (gs_1824 == gs_1832) gi_1820 = TRUE; if (gi_1820) gi_1816 = TRUE; if (gi_1820 == FALSE) { gi_1816 = FALSE; Alert("Wrong password!"); } if (gi_420 && gi_880 && gd_1636 >= gd_884) Close_target(); if (gi_420 == FALSE && gi_880 && gd_1636 >= gd_884) mClose_target(); if (g_count_1692 >= gi_424) { gi_1808 = FALSE; gi_1812 = FALSE; } if (g_count_1696 >= gi_428) { gi_1808 = FALSE; gi_1812 = FALSE; } if (gi_1284 && li_8 < gi_1288) gi_488 = FALSE; if (gi_1284 && li_8 > gi_1288) gi_488 = TRUE; if (gi_1508) Closepending(); if (gi_488) breakeven(); if (gi_512) trail(); if (gi_1804 == 2) gi_1804 = 0; if (gi_1804 == 1) gi_1804 = 0; if (l_ima_72 > l_ima_80) gi_1804 = 1; if (l_ima_72 < l_ima_80) gi_1804 = 2; if (gi_1300 == FALSE && gi_1304 == FALSE) gi_1804 = 3; if (gi_1300 && gi_1804 == 1) { gi_772 = TRUE; gi_776 = FALSE; } if (gi_1300 && gi_1804 == 2) { gi_772 = FALSE; gi_776 = TRUE; } if (gi_376 && g_count_1696 > g_count_1692 && l_isar_112 > l_iclose_104) gi_1680 = TRUE; if (gi_376 && g_count_1696 < g_count_1692 && l_isar_112 < l_iclose_104) gi_1684 = TRUE; if (gi_836) { gi_336 = FALSE; gi_1684 = TRUE; gi_1680 = TRUE; gi_376 = FALSE; gi_912 = FALSE; } if (gi_852 && ld_0 < gd_856) { gi_1684 = TRUE; gi_1680 = TRUE; gi_1812 = FALSE; } if (gi_852 && ld_0 >= gd_864) gi_1812 = TRUE; if (shut_down_ea_after_target == FALSE && gi_848 && ld_0 > gd_472) { gi_1684 = TRUE; gi_1680 = TRUE; } if (shut_down_ea_after_target && gi_848 && ld_0 > gd_472) { gi_1684 = TRUE; gi_1680 = TRUE; gi_1812 = FALSE; } if (gi_1688) { g_count_1692 = 0; g_count_1696 = 0; } if (gi_420 && gi_1688) { accorders(); orders(); } if (gi_420 == FALSE && gi_1688) { maccorders(); morders(); } if (gi_1120 && l_iatr_120 < ld_128) { gi_1788 = FALSE; gi_1792 = FALSE; } if (gi_880) profittarget(); if (gi_1124 && l_iatr_120 < ld_128) Close_target(); int l_count_1792 = 0; int l_ord_total_1796 = 0; if (gi_1768 != Time[0]) { gi_1768 = Time[0]; gi_1772++; l_count_1792 = 0; for (l_ord_total_1796 = OrdersTotal(); l_ord_total_1796 >= 0; l_ord_total_1796--) { OrderSelect(l_ord_total_1796, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() == Symbol()) l_count_1792++; } if (l_count_1792 == 0) gi_unused_1764 = TRUE; } if (Hour() == gi_1420 && Minute() >= gi_1424 && gi_1416) Closeppall(); if (gi_1404) { if (Hour() < gi_1408 || Hour() > gi_1412) gi_1808 = FALSE; gi_1812 = FALSE; } if (gi_1404) { if (Hour() >= gi_1408 && Hour() <= gi_1412) gi_1808 = TRUE; gi_1812 = TRUE; } int l_bool_1808 = IsDemo(); if (gi_88) { Alert("You can not use the program with a real account!"); return (0); } int li_1812 = gi_96; int l_acc_number_1816 = AccountNumber(); if (gi_92 && l_acc_number_1816 != li_1812) { Alert("You can not use this account (" + DoubleToStr(l_acc_number_1816, 0) + ") with this program!"); return (0); } string ls_1820 = gs_80; int l_str2time_1828 = StrToTime(ls_1820); if (gi_76 && TimeCurrent() >= l_str2time_1828) { Alert("The trial version has expired!"); return (0); } int l_leverage_1832 = AccountLeverage(); double ld_unused_1836 = balance; double l_free_magrin_1844 = AccountFreeMargin(); double ld_1852 = AccountProfit(); double ld_1860 = AccountEquity(); int li_unused_1868 = MarketInfo("GBPJPYm", MODE_MARGININIT); double l_swaplong_1872 = MarketInfo("GBPJPYm", MODE_SWAPLONG); double l_swapshort_1880 = MarketInfo("GBPJPYm", MODE_SWAPSHORT); int li_unused_1888 = MarketInfo("GBPJPYm", MODE_MAXLOT); double l_minlot_1892 = MarketInfo("GBPJPYm", MODE_MINLOT); int li_unused_1900 = MarketInfo("GBPJPYm", MODE_SPREAD); double l_swaplong_1904 = MarketInfo("GBPUSDm", MODE_SWAPLONG); double l_swapshort_1912 = MarketInfo("GBPUSDm", MODE_SWAPSHORT); int li_unused_1920 = MarketInfo("GBPUSDm", MODE_MAXLOT); double l_minlot_1924 = MarketInfo("GBPUSDm", MODE_MINLOT); int li_unused_1932 = MarketInfo("GBPUSDm", MODE_SPREAD); double l_swaplong_1936 = MarketInfo("EURUSDm", MODE_SWAPLONG); double l_swapshort_1944 = MarketInfo("EURUSDm", MODE_SWAPSHORT); int li_unused_1952 = MarketInfo("EURUSDm", MODE_MAXLOT); double l_minlot_1956 = MarketInfo("EURUSDm", MODE_MINLOT); int li_unused_1964 = MarketInfo("EURUSDm", MODE_SPREAD); double l_swaplong_1968 = MarketInfo("USDJPYm", MODE_SWAPLONG); double l_swapshort_1976 = MarketInfo("USDJPYm", MODE_SWAPSHORT); int li_unused_1984 = MarketInfo("USDJPYm", MODE_MAXLOT); double l_minlot_1988 = MarketInfo("USDJPYm", MODE_MINLOT); int li_unused_1996 = MarketInfo("USDJPYm", MODE_SPREAD); double l_swaplong_2000 = MarketInfo("USDCHFm", MODE_SWAPLONG); double l_swapshort_2008 = MarketInfo("USDCHFm", MODE_SWAPSHORT); int li_unused_2016 = MarketInfo("USDCHFm", MODE_MAXLOT); double l_minlot_2020 = MarketInfo("USDCHFm", MODE_MINLOT); int li_unused_2028 = MarketInfo("USDCHFm", MODE_SPREAD); double l_swaplong_2032 = MarketInfo("EURCHFm", MODE_SWAPLONG); double l_swapshort_2040 = MarketInfo("EURCHFm", MODE_SWAPSHORT); int li_unused_2048 = MarketInfo("EURCHFm", MODE_MAXLOT); double l_minlot_2052 = MarketInfo("EURCHFm", MODE_MINLOT); int li_unused_2060 = MarketInfo("EURCHFm", MODE_SPREAD); double l_swaplong_2064 = MarketInfo("AUDUSDm", MODE_SWAPLONG); double l_swapshort_2072 = MarketInfo("AUDUSDm", MODE_SWAPSHORT); int li_unused_2080 = MarketInfo("AUDUSDm", MODE_MAXLOT); int li_unused_2084 = MarketInfo("AUDUSDm", MODE_MINLOT); int li_unused_2088 = MarketInfo("AUDUSDm", MODE_SPREAD); double l_swaplong_2092 = MarketInfo("USDCADm", MODE_SWAPLONG); double l_swapshort_2100 = MarketInfo("USDCADm", MODE_SWAPSHORT); int li_unused_2108 = MarketInfo("USDCADm", MODE_MAXLOT); double l_minlot_2112 = MarketInfo("USDCADm", MODE_MINLOT); int li_unused_2120 = MarketInfo("USDCADm", MODE_SPREAD); double l_swaplong_2124 = MarketInfo("NZDUSDm", MODE_SWAPLONG); double l_swapshort_2132 = MarketInfo("NZDUSDm", MODE_SWAPSHORT); int li_unused_2140 = MarketInfo("NZDUSDm", MODE_MAXLOT); double l_minlot_2144 = MarketInfo("NZDUSDm", MODE_MINLOT); int li_unused_2152 = MarketInfo("NZDUSDm", MODE_SPREAD); double l_swaplong_2156 = MarketInfo("EURGBPm", MODE_SWAPLONG); double l_swapshort_2164 = MarketInfo("EURGBPm", MODE_SWAPSHORT); int li_unused_2172 = MarketInfo("EURGBPm", MODE_MAXLOT); double l_minlot_2176 = MarketInfo("EURGBPm", MODE_MINLOT); int li_unused_2184 = MarketInfo("EURGBPm", MODE_SPREAD); double l_swaplong_2188 = MarketInfo("EURJPYm", MODE_SWAPLONG); double l_swapshort_2196 = MarketInfo("EURJPYm", MODE_SWAPSHORT); int li_unused_2204 = MarketInfo("EURJPYm", MODE_MAXLOT); double l_minlot_2208 = MarketInfo("EURJPYm", MODE_MINLOT); int li_unused_2216 = MarketInfo("EURJPYm", MODE_SPREAD); double l_swaplong_2220 = MarketInfo("CHFJPYm", MODE_SWAPLONG); double l_swapshort_2228 = MarketInfo("CHFJPYm", MODE_SWAPSHORT); int li_unused_2236 = MarketInfo("CHFJPYm", MODE_MAXLOT); double l_minlot_2240 = MarketInfo("CHFJPYm", MODE_MINLOT); int li_unused_2248 = MarketInfo("CHFJPYm", MODE_SPREAD); double l_swaplong_2252 = MarketInfo("GBPCHFm", MODE_SWAPLONG); double l_swapshort_2260 = MarketInfo("GBPCHFm", MODE_SWAPSHORT); int li_unused_2268 = MarketInfo("GBPCHFm", MODE_MAXLOT); double l_minlot_2272 = MarketInfo("GBPCHFm", MODE_MINLOT); int li_unused_2280 = MarketInfo("GBPCHFm", MODE_SPREAD); double l_swaplong_2284 = MarketInfo("EURAUDm", MODE_SWAPLONG); double l_swapshort_2292 = MarketInfo("EURAUDm", MODE_SWAPSHORT); int li_unused_2300 = MarketInfo("EURAUDm", MODE_MAXLOT); double l_minlot_2304 = MarketInfo("EURAUDm", MODE_MINLOT); int li_unused_2312 = MarketInfo("EURAUDm", MODE_SPREAD); double l_swaplong_2316 = MarketInfo("EURCADm", MODE_SWAPLONG); double l_swapshort_2324 = MarketInfo("EURCADm", MODE_SWAPSHORT); int li_unused_2332 = MarketInfo("EURCADm", MODE_MAXLOT); double l_minlot_2336 = MarketInfo("EURCADm", MODE_MINLOT); int li_unused_2344 = MarketInfo("EURCADm", MODE_SPREAD); double l_swaplong_2348 = MarketInfo("AUDCADm", MODE_SWAPLONG); double l_swapshort_2356 = MarketInfo("AUDCADm", MODE_SWAPSHORT); int li_unused_2364 = MarketInfo("AUDCADm", MODE_MAXLOT); double l_minlot_2368 = MarketInfo("AUDCADm", MODE_MINLOT); int li_unused_2376 = MarketInfo("AUDCADm", MODE_SPREAD); double l_swaplong_2380 = MarketInfo("AUDJPYm", MODE_SWAPLONG); double l_swapshort_2388 = MarketInfo("AUDJPYm", MODE_SWAPSHORT); int li_unused_2396 = MarketInfo("AUDJPYm", MODE_MAXLOT); double l_minlot_2400 = MarketInfo("AUDJPYm", MODE_MINLOT); int li_unused_2408 = MarketInfo("AUDJPYm", MODE_SPREAD); double l_swaplong_2412 = MarketInfo("NZDJPYm", MODE_SWAPLONG); double l_swapshort_2420 = MarketInfo("NZDJPYm", MODE_SWAPSHORT); int li_unused_2428 = MarketInfo("NZDJPYm", MODE_MAXLOT); double l_minlot_2432 = MarketInfo("NZDJPYm", MODE_MINLOT); int li_unused_2440 = MarketInfo("NZDJPYm", MODE_SPREAD); double l_swaplong_2444 = MarketInfo("AUDNZDm", MODE_SWAPLONG); double l_swapshort_2452 = MarketInfo("AUDNZDm", MODE_SWAPSHORT); int li_unused_2460 = MarketInfo("AUDNZDm", MODE_MAXLOT); double l_minlot_2464 = MarketInfo("AUDNZDm", MODE_MINLOT); int li_unused_2472 = MarketInfo("AUDNZDm", MODE_SPREAD); double l_swaplong_2476 = MarketInfo("GBPJPY", MODE_SWAPLONG); double l_point_2484 = MarketInfo("GBPJPY", MODE_POINT); double l_swapshort_2492 = MarketInfo("GBPJPY", MODE_SWAPSHORT); int li_unused_2500 = MarketInfo("GBPJPY", MODE_MAXLOT); double l_minlot_2504 = MarketInfo("GBPJPY", MODE_MINLOT); int li_unused_2512 = MarketInfo("GBPJPY", MODE_SPREAD); double l_swaplong_2516 = MarketInfo("GBPUSD", MODE_SWAPLONG); double l_swapshort_2524 = MarketInfo("GBPUSD", MODE_SWAPSHORT); int li_unused_2532 = MarketInfo("GBPUSD", MODE_MAXLOT); double l_minlot_2536 = MarketInfo("GBPUSD", MODE_MINLOT); int li_unused_2544 = MarketInfo("GBPUSD", MODE_SPREAD); double l_swaplong_2548 = MarketInfo("EURUSD", MODE_SWAPLONG); double l_swapshort_2556 = MarketInfo("EURUSD", MODE_SWAPSHORT); int li_unused_2564 = MarketInfo("EURUSD", MODE_MAXLOT); double l_minlot_2568 = MarketInfo("EURUSD", MODE_MINLOT); int li_unused_2576 = MarketInfo("EURUSD", MODE_SPREAD); double l_swaplong_2580 = MarketInfo("USDJPY", MODE_SWAPLONG); double l_swapshort_2588 = MarketInfo("USDJPY", MODE_SWAPSHORT); int li_unused_2596 = MarketInfo("USDJPY", MODE_MAXLOT); double l_minlot_2600 = MarketInfo("USDJPY", MODE_MINLOT); int li_unused_2608 = MarketInfo("USDJPY", MODE_SPREAD); double l_swaplong_2612 = MarketInfo("USDCHF", MODE_SWAPLONG); double l_swapshort_2620 = MarketInfo("USDCHF", MODE_SWAPSHORT); int li_unused_2628 = MarketInfo("USDCHF", MODE_MAXLOT); double l_minlot_2632 = MarketInfo("USDCHF", MODE_MINLOT); int li_unused_2640 = MarketInfo("USDCHF", MODE_SPREAD); double l_swaplong_2644 = MarketInfo("EURCHF", MODE_SWAPLONG); double l_swapshort_2652 = MarketInfo("EURCHF", MODE_SWAPSHORT); int li_unused_2660 = MarketInfo("EURCHF", MODE_MAXLOT); double l_minlot_2664 = MarketInfo("EURCHF", MODE_MINLOT); int li_unused_2672 = MarketInfo("EURCHF", MODE_SPREAD); double l_swaplong_2676 = MarketInfo("AUDUSD", MODE_SWAPLONG); double l_swapshort_2684 = MarketInfo("AUDUSD", MODE_SWAPSHORT); int li_unused_2692 = MarketInfo("AUDUSD", MODE_MAXLOT); double l_minlot_2696 = MarketInfo("AUDUSD", MODE_MINLOT); int li_unused_2704 = MarketInfo("AUDUSD", MODE_SPREAD); double l_swaplong_2708 = MarketInfo("USDCAD", MODE_SWAPLONG); double l_swapshort_2716 = MarketInfo("USDCAD", MODE_SWAPSHORT); int li_unused_2724 = MarketInfo("USDCAD", MODE_MAXLOT); double l_minlot_2728 = MarketInfo("USDCAD", MODE_MINLOT); int li_unused_2736 = MarketInfo("USDCAD", MODE_SPREAD); double l_swaplong_2740 = MarketInfo("NZDUSD", MODE_SWAPLONG); double l_swapshort_2748 = MarketInfo("NZDUSD", MODE_SWAPSHORT); int li_unused_2756 = MarketInfo("NZDUSD", MODE_MAXLOT); double l_minlot_2760 = MarketInfo("NZDUSD", MODE_MINLOT); int li_unused_2768 = MarketInfo("NZDUSD", MODE_SPREAD); double l_swaplong_2772 = MarketInfo("EURGBP", MODE_SWAPLONG); double l_swapshort_2780 = MarketInfo("EURGBP", MODE_SWAPSHORT); int li_unused_2788 = MarketInfo("EURGBP", MODE_MAXLOT); double l_minlot_2792 = MarketInfo("EURGBP", MODE_MINLOT); int li_unused_2800 = MarketInfo("EURGBP", MODE_SPREAD); double l_swaplong_2804 = MarketInfo("EURJPY", MODE_SWAPLONG); double l_swapshort_2812 = MarketInfo("EURJPY", MODE_SWAPSHORT); int li_unused_2820 = MarketInfo("EURJPY", MODE_MAXLOT); double l_minlot_2824 = MarketInfo("EURJPY", MODE_MINLOT); int li_unused_2832 = MarketInfo("EURJPY", MODE_SPREAD); double l_swaplong_2836 = MarketInfo("CHFJPY", MODE_SWAPLONG); double l_swapshort_2844 = MarketInfo("CHFJPY", MODE_SWAPSHORT); int li_unused_2852 = MarketInfo("CHFJPY", MODE_MAXLOT); double l_minlot_2856 = MarketInfo("CHFJPY", MODE_MINLOT); int li_unused_2864 = MarketInfo("CHFJPY", MODE_SPREAD); double l_swaplong_2868 = MarketInfo("GBPCHF", MODE_SWAPLONG); double l_swapshort_2876 = MarketInfo("GBPCHF", MODE_SWAPSHORT); int li_unused_2884 = MarketInfo("GBPCHF", MODE_MAXLOT); double l_minlot_2888 = MarketInfo("GBPCHF", MODE_MINLOT); int li_unused_2896 = MarketInfo("GBPCHF", MODE_SPREAD); double l_swaplong_2900 = MarketInfo("EURAUD", MODE_SWAPLONG); double l_swapshort_2908 = MarketInfo("EURAUD", MODE_SWAPSHORT); int li_unused_2916 = MarketInfo("EURAUD", MODE_MAXLOT); double l_minlot_2920 = MarketInfo("EURAUD", MODE_MINLOT); int li_unused_2928 = MarketInfo("EURAUD", MODE_SPREAD); double l_swaplong_2932 = MarketInfo("EURCAD", MODE_SWAPLONG); double l_swapshort_2940 = MarketInfo("EURCAD", MODE_SWAPSHORT); int li_unused_2948 = MarketInfo("EURCAD", MODE_MAXLOT); double l_minlot_2952 = MarketInfo("EURCAD", MODE_MINLOT); int li_unused_2960 = MarketInfo("EURCAD", MODE_SPREAD); double l_swaplong_2964 = MarketInfo("AUDCAD", MODE_SWAPLONG); double l_swapshort_2972 = MarketInfo("AUDCAD", MODE_SWAPSHORT); int li_unused_2980 = MarketInfo("AUDCAD", MODE_MAXLOT); double l_minlot_2984 = MarketInfo("AUDCAD", MODE_MINLOT); int li_unused_2992 = MarketInfo("AUDCAD", MODE_SPREAD); double l_swaplong_2996 = MarketInfo("AUDJPY", MODE_SWAPLONG); double l_swapshort_3004 = MarketInfo("AUDJPY", MODE_SWAPSHORT); int li_unused_3012 = MarketInfo("AUDJPY", MODE_MAXLOT); double l_minlot_3016 = MarketInfo("AUDJPY", MODE_MINLOT); int li_unused_3024 = MarketInfo("AUDJPY", MODE_SPREAD); double l_swaplong_3028 = MarketInfo("NZDJPY", MODE_SWAPLONG); double l_swapshort_3036 = MarketInfo("NZDJPY", MODE_SWAPSHORT); int li_unused_3044 = MarketInfo("NZDJPY", MODE_MAXLOT); double l_minlot_3048 = MarketInfo("NZDJPY", MODE_MINLOT); int li_unused_3056 = MarketInfo("NZDJPY", MODE_SPREAD); double l_swaplong_3060 = MarketInfo("AUDNZD", MODE_SWAPLONG); double l_swapshort_3068 = MarketInfo("AUDNZD", MODE_SWAPSHORT); int li_unused_3076 = MarketInfo("AUDNZD", MODE_MAXLOT); double l_minlot_3080 = MarketInfo("AUDNZD", MODE_MINLOT); int li_unused_3088 = MarketInfo("AUDNZD", MODE_SPREAD); int li_3092 = g_count_1708 + g_count_1704; double ld_3096 = 100.0 * (gd_1636 / balance); if (gi_1504) { ld_3104 = 100.0 * (gd_1948 / balance); ld_3112 = 100.0 * (gd_1956 / balance); ld_3120 = 100.0 * ((AccountFreeMargin() - AccountMargin()) / AccountEquity()); Comment("\n", " --***--Trendchasers Super EA--***-- spread= ", Ask - Bid, "", "\n", " FreeMargin = ", DoubleToStr(ld_3120, 2), "\n", "\n", " profit = ", DoubleToStr(ld_3096, 2), " shorts = ", DoubleToStr(ld_3104, 2), " longs = ", DoubleToStr(ld_3112, 2), "\n", " Target = ", DoubleToStr(profit_target_percent, 2), "\n", "\n", "\n", " buy lots = ", DoubleToStr(gd_792, 2), "\n", " sell lots = ", DoubleToStr(gd_784, 2), "\n", "\n", "\n", " Total Orders= ", DoubleToStr(li_8, 0), " Longs = ", DoubleToStr(g_count_1692, 0), " Shorts = ", DoubleToStr(g_count_1696, 0), "\n", "\n", "\n", " trend = ", gs_none_1900); } if (gs_none_1900 == "long") gi_236 = 1; if (gs_none_1900 == "short") gi_236 = 2; if (li_8 < 10 && gi_420 && gi_240 && ld_3096 > profit_target_percent) Closelosers(); if (li_8 < 10 && gi_420 == FALSE && gi_240 && ld_3096 > profit_target_percent && OrderMagicNumber() == 99) mCloselosers(); if (li_8 > 10 && gi_420 && gi_240 && ld_3096 > profit_target_percent) Close_target(); if (li_8 > 10 && gi_420 == FALSE && gi_240 && ld_3096 > profit_target_percent && OrderMagicNumber() == 99) Close_target(); if (gi_240 == FALSE && gi_420 && gi_1968 && ld_3096 > profit_target_percent) Close_target(); if (gi_240 == FALSE && gi_420 == FALSE && gi_1968 && ld_3096 > profit_target_percent) mClose_target(); if (gi_1760) { gi_unused_992 = FALSE; gi_unused_996 = FALSE; gi_unused_1000 = FALSE; gi_unused_1004 = FALSE; gi_unused_1008 = FALSE; gi_unused_1012 = FALSE; gi_unused_1016 = FALSE; gi_unused_1020 = FALSE; gi_unused_1024 = FALSE; gi_unused_1028 = FALSE; gi_528 = FALSE; gi_740 = TRUE; gi_744 = TRUE; gd_unused_2008 = gd_208; gd_2016 = gd_208; } if (gi_572 && li_8 > gd_576) { g_timeframe_604 = 60; gd_612 = 50; g_timeframe_620 = 240; gi_628 = 50; g_timeframe_632 = 1440; gi_640 = 50; g_timeframe_644 = 10800; gi_652 = 50; g_timeframe_656 = 43200; gi_664 = 50; g_timeframe_676 = 60; gd_684 = 50; g_timeframe_692 = 240; gi_700 = 50; g_timeframe_704 = 1440; gi_712 = 50; g_timeframe_716 = 10800; gi_724 = 50; g_timeframe_728 = 43200; gi_736 = 50; } if (gi_572 && li_8 < gd_576) { g_timeframe_604 = 60; gd_612 = 50; g_timeframe_620 = 60; gi_628 = 50; g_timeframe_632 = 60; gi_640 = 50; g_timeframe_644 = 60; gi_652 = 50; g_timeframe_656 = 60; gi_664 = 50; g_timeframe_676 = 60; gd_684 = 50; g_timeframe_692 = 60; gi_700 = 50; g_timeframe_704 = 60; gi_712 = 50; g_timeframe_716 = 60; gi_724 = 50; g_timeframe_728 = 60; gi_736 = 50; } if (gi_748 && ld_3096 > -2.0) { gi_528 = FALSE; hedge_lots = FALSE; gi_224 = FALSE; gi_368 = TRUE; } if (gi_748 && ld_3096 < -2.0) { gi_528 = TRUE; hedge_lots = FALSE; gi_224 = FALSE; gi_368 = FALSE; g_timeframe_552 = 240; } if (gi_748 && ld_3096 < -3.0) { gi_528 = TRUE; hedge_lots = FALSE; gi_224 = FALSE; gi_368 = FALSE; g_timeframe_552 = 43200; } if (gi_748 && ld_3096 < -5.0) { gi_528 = TRUE; hedge_lots = FALSE; gi_224 = FALSE; g_timeframe_552 = 10080; } if (gi_748 && ld_3096 < -7.0) { gi_528 = TRUE; hedge_lots = FALSE; gi_224 = FALSE; gi_368 = FALSE; g_timeframe_552 = 1440; } if (gi_748 && ld_3096 < -10.0) { gi_528 = TRUE; hedge_lots = FALSE; gi_224 = FALSE; gi_368 = FALSE; g_timeframe_552 = 240; } if (gi_748 && ld_3096 < -20.0) { gi_528 = FALSE; hedge_lots = FALSE; gi_224 = FALSE; gi_368 = FALSE; } if (gi_2048 && ld_3096 > -1.0) time_frame_for_signal2 = 5; if (gi_2048 && ld_3096 < -1.0 && ld_3096 > -3.0) time_frame_for_signal2 = 30; if (gi_2048 && ld_3096 < -3.0) time_frame_for_signal2 = 240; if (gi_2004 && ld_3120 < gd_896) gi_224 = TRUE; if (gi_2004 && ld_3120 > gd_896) gi_224 = FALSE; if (gi_892 && ld_3120 < gd_896) gi_316 = TRUE; if (gi_892 && OrdersTotal() == 0) gi_316 = FALSE; if (gi_1152 && ld_3120 > gd_1156) gi_1304 = FALSE; if (gi_1152 && ld_3120 < gd_1156) { gi_1304 = TRUE; gi_336 = FALSE; } if (gi_1192 && ld_3120 < gd_1196) { Closelongsinprofit(); Closeshortsinprofit(); } if (gi_1676 && ld_3120 < 20.0 && ld_0 > -5.0) Closeppall(); if (gi_1264 && ld_3120 < gd_1268) Closeppall(); if (gi_1220 && ld_3120 > gd_1224) gi_512 = FALSE; if (gi_1220 && ld_3120 < gd_1224) gi_512 = TRUE; if (gi_1172 && ld_3120 < gd_1176) { gi_1808 = FALSE; gi_1812 = FALSE; } if (gi_1172 && ld_3120 > gd_1176) gi_1808 = TRUE; int li_3128 = 0; if (gi_308 && Bars != g_bars_2052) gi_2060 = FALSE; int l_ord_total_3132 = OrdersTotal(); li_3128 = 0; HideTestIndicators(TRUE); double l_iatr_3160 = iATR(NULL, g_timeframe_1740, g_period_1728, 0); double ld_3168 = gd_1732; double l_iforce_3176 = iForce(NULL, 0, 13, MODE_SMA, PRICE_CLOSE, 0); double ld_unused_3184 = 8; double ld_unused_3192 = -8; double l_iclose_3200 = iClose(NULL, 0, gi_2056 + 0); double l_ienvelopes_3208 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_944, g_deviation_952, MODE_LOWER, gi_2056 + 0); double l_iclose_3216 = iClose(NULL, 0, gi_2056 + 1); double l_ienvelopes_3224 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_944, g_deviation_952, MODE_LOWER, gi_2056 + 1); double l_iclose_3232 = iClose(NULL, 0, gi_2056 + 2); double l_ienvelopes_3240 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_944, g_deviation_952, MODE_LOWER, gi_2056 + 2); double l_iclose_3248 = iClose(NULL, 0, gi_2056 + 0); double l_ienvelopes_3256 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_944, g_deviation_952, MODE_UPPER, gi_2056 + 0); double l_iclose_3264 = iClose(NULL, 0, gi_2056 + 1); double l_ienvelopes_3272 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_944, g_deviation_952, MODE_UPPER, gi_2056 + 1); double l_iclose_3280 = iClose(NULL, 0, gi_2056 + 2); double l_ienvelopes_3288 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_944, g_deviation_952, MODE_UPPER, gi_2056 + 2); double l_isar_3296 = iSAR(NULL, time_frame_for_signal, psar, gd_348, gi_2056 + 0); double l_iclose_3304 = iClose(NULL, 0, gi_2056 + 0); double l_isar_3312 = iSAR(NULL, time_frame_for_signal, psar, gd_348, gi_2056 + 1); double l_iclose_3320 = iClose(NULL, 0, gi_2056 + 1); double l_isar_3328 = iSAR(NULL, time_frame_for_signal, psar, gd_348, gi_2056 + 2); double l_iclose_3336 = iClose(NULL, 0, gi_2056 + 2); double l_isar_3344 = iSAR(NULL, time_frame_for_signal2, psar2, gd_388, gi_2056 + 0); double l_iclose_3352 = iClose(NULL, 0, gi_2056 + 0); double l_isar_3360 = iSAR(NULL, time_frame_for_signal2, psar2, gd_388, gi_2056 + 1); double l_iclose_3368 = iClose(NULL, 0, gi_2056 + 1); double l_isar_3376 = iSAR(NULL, time_frame_for_signal2, psar2, gd_388, gi_2056 + 2); double l_iclose_3384 = iClose(NULL, 0, gi_2056 + 2); double l_iclose_3392 = iClose(NULL, 0, gi_2056 + 0); double l_ima_3400 = iMA(NULL, time_frame_for_signal, l_ima_136, 0, MODE_SMMA, PRICE_OPEN, gi_2056 + 0); double l_iclose_3408 = iClose(NULL, 0, gi_2056 + 1); double l_ima_3416 = iMA(NULL, time_frame_for_signal, l_ima_136, 0, MODE_SMMA, PRICE_OPEN, gi_2056 + 1); double l_iclose_3424 = iClose(NULL, 0, gi_2056 + 2); double l_ima_3432 = iMA(NULL, time_frame_for_signal, l_ima_136, 0, MODE_SMMA, PRICE_OPEN, gi_2056 + 2); double l_isar_3440 = iSAR(NULL, time_frame_for_signal, psar, gd_348, gi_2056 + 0); double l_iclose_3448 = iClose(NULL, 0, gi_2056 + 0); double l_isar_3456 = iSAR(NULL, time_frame_for_signal, psar, gd_348, gi_2056 + 1); double l_iclose_3464 = iClose(NULL, 0, gi_2056 + 1); double l_isar_3472 = iSAR(NULL, time_frame_for_signal, psar, gd_348, gi_2056 + 2); double l_iclose_3480 = iClose(NULL, 0, gi_2056 + 2); double l_isar_3488 = iSAR(NULL, time_frame_for_signal2, psar2, gd_388, gi_2056 + 0); double l_iclose_3496 = iClose(NULL, 0, gi_2056 + 0); double l_isar_3504 = iSAR(NULL, time_frame_for_signal2, psar2, gd_388, gi_2056 + 1); double l_iclose_3512 = iClose(NULL, 0, gi_2056 + 1); double l_isar_3520 = iSAR(NULL, time_frame_for_signal2, psar2, gd_388, gi_2056 + 2); double l_iclose_3528 = iClose(NULL, 0, gi_2056 + 2); double l_iclose_3536 = iClose(NULL, 0, gi_2056 + 0); double l_ienvelopes_3544 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_1068, g_deviation_952, MODE_UPPER, gi_2056 + 0); double l_iclose_3552 = iClose(NULL, 0, gi_2056 + 1); double l_ienvelopes_3560 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_1068, g_deviation_952, MODE_UPPER, gi_2056 + 1); double l_iclose_3568 = iClose(NULL, 0, gi_2056 + 2); double l_ienvelopes_3576 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_1068, g_deviation_952, MODE_UPPER, gi_2056 + 2); double l_iclose_3584 = iClose(NULL, 0, gi_2056 + 0); double l_ienvelopes_3592 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_1068, g_deviation_952, MODE_LOWER, gi_2056 + 0); double l_iclose_3600 = iClose(NULL, 0, gi_2056 + 1); double l_ienvelopes_3608 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_1068, g_deviation_952, MODE_LOWER, gi_2056 + 1); double l_iclose_3616 = iClose(NULL, 0, gi_2056 + 2); double l_ienvelopes_3624 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_1068, g_deviation_952, MODE_LOWER, gi_2056 + 2); double l_iclose_3632 = iClose(NULL, 0, gi_2056 + 0); double l_ima_3640 = iMA(NULL, time_frame_for_signal, l_ima_136, 0, MODE_SMMA, PRICE_OPEN, gi_2056 + 0); double l_iclose_3648 = iClose(NULL, 0, gi_2056 + 1); double l_ima_3656 = iMA(NULL, time_frame_for_signal, l_ima_136, 0, MODE_SMMA, PRICE_OPEN, gi_2056 + 1); double l_iclose_3664 = iClose(NULL, 0, gi_2056 + 2); double l_ima_3672 = iMA(NULL, time_frame_for_signal, l_ima_136, 0, MODE_SMMA, PRICE_OPEN, gi_2056 + 2); double l_iclose_3680 = iClose(NULL, 0, gi_2056 + 0); double l_ienvelopes_3688 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_948, g_deviation_960, MODE_UPPER, gi_2056 + 0); double l_iclose_3696 = iClose(NULL, 0, gi_2056 + 0); double l_ienvelopes_3704 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_948, g_deviation_960, MODE_LOWER, gi_2056 + 0); double l_isar_3712 = iSAR(NULL, time_frame_for_signal, psar, gd_348, gi_2056 + 0); double l_iclose_3720 = iClose(NULL, 0, gi_2056 + 0); double l_isar_3728 = iSAR(NULL, time_frame_for_signal2, psar2, gd_388, gi_2056 + 0); double l_iclose_3736 = iClose(NULL, 0, gi_2056 + 0); double l_iclose_3744 = iClose(NULL, 0, gi_2056 + 0); double l_ienvelopes_3752 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_1072, g_deviation_1084, MODE_LOWER, gi_2056 + 0); double l_iclose_3760 = iClose(NULL, 0, gi_2056 + 0); double l_ienvelopes_3768 = iEnvelopes(NULL, g_timeframe_1092, g_period_940, MODE_SMMA, 1, g_applied_price_1072, g_deviation_1084, MODE_UPPER, gi_2056 + 0); double l_isar_3776 = iSAR(NULL, time_frame_for_signal, psar, gd_348, gi_2056 + 0); double l_iclose_3784 = iClose(NULL, 0, gi_2056 + 0); double l_isar_3792 = iSAR(NULL, time_frame_for_signal2, psar2, gd_388, gi_2056 + 0); double l_iclose_3800 = iClose(NULL, 0, gi_2056 + 0); bool li_3808 = FALSE; for (int l_pos_3812 = gi_148; l_pos_3812 < l_ord_total_3132; l_pos_3812++) { OrderSelect(l_pos_3812, SELECT_BY_POS, MODE_TRADES); if (g_bars_2064 != Bars && OrderType() <= OP_SELL && OrderSymbol() == Symbol()) { li_3808 = TRUE; if (g_bars_2064 != Bars && OrderType() == OP_BUY) { if (gi_972 && gi_404 == FALSE && gi_372 == FALSE && gi_928 && gi_332) if (l_iclose_3680 > l_ienvelopes_3688 || l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_972 && gi_404 == FALSE && gi_372 && gi_928 && gi_332) if (l_iclose_3680 > l_ienvelopes_3688 || l_iclose_3720 < l_isar_3712 || l_iclose_3736 < l_isar_3728) li_3128 = 3; if (gi_404 == FALSE && gi_372 == FALSE && gi_928 == FALSE && gi_332) if (l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_972 && gi_404 == FALSE && gi_372 == FALSE && gi_928 && gi_332 == FALSE) if (l_iclose_3680 > l_ienvelopes_3688) li_3128 = 3; if (gi_928 == FALSE && gi_404 == FALSE && gi_372 && gi_332) if (l_iclose_3736 < l_isar_3728 || l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_332 == FALSE && gi_972 && gi_404 == FALSE && gi_372 && gi_928) if (l_iclose_3736 < l_isar_3728 || l_iclose_3680 > l_ienvelopes_3688) li_3128 = 3; if (gi_332 == FALSE && gi_928 == FALSE && gi_404 == FALSE && gi_372) if (l_iclose_3736 < l_isar_3728) li_3128 = 3; if (gi_972 && gi_404 && gi_372 == FALSE && gi_928 && gi_332) if (l_iclose_3680 > l_ienvelopes_3688 || l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_972 && gi_404 && gi_372 && gi_928 && gi_332) if (l_iclose_3680 > l_ienvelopes_3688 || l_iclose_3720 < l_isar_3712 || l_iclose_3736 > l_isar_3728) li_3128 = 3; if (gi_404 && gi_372 == FALSE && gi_928 == FALSE && gi_332) if (l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_972 && gi_404 && gi_372 == FALSE && gi_928 && gi_332 == FALSE) if (l_iclose_3680 > l_ienvelopes_3688) li_3128 = 3; if (gi_928 == FALSE && gi_404 && gi_372 && gi_332) if (l_iclose_3736 > l_isar_3728 || l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_972 && gi_332 == FALSE && gi_404 && gi_372 && gi_928) if (l_iclose_3736 > l_isar_3728 || l_iclose_3680 > l_ienvelopes_3688) li_3128 = 3; if (gi_928 == FALSE && gi_332 == FALSE && gi_404 && gi_372) if (l_iclose_3736 > l_isar_3728) li_3128 = 3; if (gi_972 && gi_404 == FALSE && gi_372 == FALSE && gi_928 && gi_332) if (l_iclose_3680 > l_ienvelopes_3688 || l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_972 && gi_404 == FALSE && gi_372 && gi_928 && gi_332) if (l_iclose_3680 > l_ienvelopes_3688 || l_iclose_3720 < l_isar_3712 || l_iclose_3736 < l_isar_3728) li_3128 = 3; if (gi_404 == FALSE && gi_372 == FALSE && gi_928 == FALSE && gi_332) if (l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_972 && gi_404 == FALSE && gi_372 == FALSE && gi_928 && gi_332 == FALSE) if (l_iclose_3680 > l_ienvelopes_3688) li_3128 = 3; if (gi_928 == FALSE && gi_404 == FALSE && gi_372 && gi_332) if (l_iclose_3736 < l_isar_3728 || l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_332 == FALSE && gi_980 && gi_404 == FALSE && gi_372 && gi_928) if (l_iclose_3736 < l_isar_3728 || l_iclose_3696 < l_ienvelopes_3704) li_3128 = 3; if (gi_332 == FALSE && gi_928 == FALSE && gi_404 == FALSE && gi_372) if (l_iclose_3736 < l_isar_3728) li_3128 = 3; if (gi_980 && gi_404 && gi_372 == FALSE && gi_928 && gi_332) if (l_iclose_3696 < l_ienvelopes_3704 || l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_980 && gi_404 && gi_372 && gi_928 && gi_332) if (l_iclose_3696 < l_ienvelopes_3704 || l_iclose_3720 < l_isar_3712 || l_iclose_3736 > l_isar_3728) li_3128 = 3; if (gi_404 && gi_372 == FALSE && gi_928 == FALSE && gi_332) if (l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_980 && gi_404 && gi_372 == FALSE && gi_928 && gi_332 == FALSE) if (l_iclose_3696 < l_ienvelopes_3704) li_3128 = 3; if (gi_928 == FALSE && gi_404 && gi_372 && gi_332) if (l_iclose_3736 > l_isar_3728 || l_iclose_3720 < l_isar_3712) li_3128 = 3; if (gi_980 && gi_332 == FALSE && gi_404 && gi_372 && gi_928) if (l_iclose_3736 > l_isar_3728 || l_iclose_3696 < l_ienvelopes_3704) li_3128 = 3; if (gi_928 == FALSE && gi_332 == FALSE && gi_404 && gi_372) if (l_iclose_3736 > l_isar_3728) li_3128 = 3; if (li_3128 == 3) Closelongs(); if (li_3128 == 3) { OrderClose(OrderTicket(), OrderLots(), Bid, 200, MediumSeaGreen); if (gi_1500) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Close Buy"); if (gi_1496) PlaySound(gs_1752); if (gi_1492) Alert(gs_1744); } else { if (gi_1108 && gi_404 == FALSE && gi_372 == FALSE && gi_928 && gi_332) if (l_iclose_3744 < l_ienvelopes_3752 || l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_1108 && gi_404 == FALSE && gi_372 && gi_928 && gi_332) if (l_iclose_3744 < l_ienvelopes_3752 || l_iclose_3784 > l_isar_3776 || l_iclose_3800 > l_isar_3792) li_3128 = 4; if (gi_404 == FALSE && gi_372 == FALSE && gi_928 == FALSE && gi_332) if (l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_404 == FALSE && gi_372 && gi_928 == FALSE && gi_332) if (l_iclose_3800 > l_isar_3792 || l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_1108 && gi_404 == FALSE && gi_372 == FALSE && gi_928 && gi_332 == FALSE) if (l_iclose_3744 < l_ienvelopes_3752) li_3128 = 4; if (gi_1108 && gi_404 == FALSE && gi_928 && gi_372 && gi_332 == FALSE) if (l_iclose_3744 < l_ienvelopes_3752 || l_iclose_3800 > l_isar_3792) li_3128 = 4; if (gi_404 == FALSE && gi_928 == FALSE && gi_372 && gi_332 == FALSE) if (l_iclose_3800 > l_isar_3792) li_3128 = 4; if (gi_1108 && gi_404 && gi_372 == FALSE && gi_928 && gi_332) if (l_iclose_3744 < l_ienvelopes_3752 || l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_1108 && gi_404 && gi_372 && gi_928 && gi_332) if (l_iclose_3744 < l_ienvelopes_3752 || l_iclose_3784 > l_isar_3776 || l_iclose_3800 < l_isar_3792) li_3128 = 4; if (gi_404 && gi_372 == FALSE && gi_928 == FALSE && gi_332) if (l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_404 && gi_372 && gi_928 == FALSE && gi_332) if (l_iclose_3800 < l_isar_3792 || l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_1108 && gi_404 && gi_372 == FALSE && gi_928 && gi_332 == FALSE) if (l_iclose_3744 < l_ienvelopes_3752) li_3128 = 4; if (gi_1108 && gi_404 && gi_928 && gi_372 && gi_332 == FALSE) if (l_iclose_3744 < l_ienvelopes_3752 || l_iclose_3800 < l_isar_3792) li_3128 = 4; if (gi_404 && gi_928 == FALSE && gi_372 && gi_332 == FALSE) if (l_iclose_3800 < l_isar_3792) li_3128 = 4; if (gi_1100 && gi_404 == FALSE && gi_372 == FALSE && gi_928 && gi_332) if (l_iclose_3760 > l_ienvelopes_3768 || l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_1100 && gi_404 == FALSE && gi_372 && gi_928 && gi_332) if (l_iclose_3760 > l_ienvelopes_3768 || l_iclose_3784 > l_isar_3776 || l_iclose_3800 > l_isar_3792) li_3128 = 4; if (gi_404 == FALSE && gi_372 == FALSE && gi_928 == FALSE && gi_332) if (l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_404 == FALSE && gi_372 && gi_928 == FALSE && gi_332) if (l_iclose_3800 > l_isar_3792 || l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_1100 && gi_404 == FALSE && gi_372 == FALSE && gi_928 && gi_332 == FALSE) if (l_iclose_3760 > l_ienvelopes_3768) li_3128 = 4; if (gi_1100 && gi_404 == FALSE && gi_928 && gi_372 && gi_332 == FALSE) if (l_iclose_3760 > l_ienvelopes_3768 || l_iclose_3800 > l_isar_3792) li_3128 = 4; if (gi_404 == FALSE && gi_928 == FALSE && gi_372 && gi_332 == FALSE) if (l_iclose_3800 > l_isar_3792) li_3128 = 4; if (gi_1100 && gi_404 && gi_372 == FALSE && gi_928 && gi_332) if (l_iclose_3760 > l_ienvelopes_3768 || l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_1100 && gi_404 && gi_372 && gi_928 && gi_332) if (l_iclose_3760 > l_ienvelopes_3768 || l_iclose_3784 > l_isar_3776 || l_iclose_3800 < l_isar_3792) li_3128 = 4; if (gi_404 && gi_372 == FALSE && gi_928 == FALSE && gi_332) if (l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_404 && gi_372 && gi_928 == FALSE && gi_332) if (l_iclose_3800 < l_isar_3792 || l_iclose_3784 > l_isar_3776) li_3128 = 4; if (gi_1100 && gi_404 && gi_372 == FALSE && gi_928 && gi_332 == FALSE) if (l_iclose_3760 > l_ienvelopes_3768) li_3128 = 4; if (gi_1100 && gi_404 && gi_928 && gi_372 && gi_332 == FALSE) if (l_iclose_3760 > l_ienvelopes_3768 || l_iclose_3800 < l_isar_3792) li_3128 = 4; if (gi_404 && gi_928 == FALSE && gi_372 && gi_332 == FALSE) if (l_iclose_3800 < l_isar_3792) li_3128 = 4; if (li_3128 == 4) Closeshorts(); if (li_3128 == 4) { OrderClose(OrderTicket(), OrderLots(), Ask, 200, DarkOrange); if (gi_1500) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Close Sell"); if (gi_1496) PlaySound(gs_1752); if (gi_1492) Alert(gs_1744); } } } } } int li_3816 = Time[1]; int li_3820 = Time[1]; if (gi_1096 && gi_976 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3216 < l_ienvelopes_3224 && l_iclose_3232 >= l_ienvelopes_3240 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3552 > l_ienvelopes_3560 && l_iclose_3568 <= l_ienvelopes_3576 && li_3820 < Time[0]) li_3128 = 2; } if (gi_1104 && gi_976 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3216 < l_ienvelopes_3224 && l_iclose_3232 >= l_ienvelopes_3240 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3600 < l_ienvelopes_3608 && l_iclose_3616 >= l_ienvelopes_3624 && li_3820 < Time[0]) li_3128 = 2; } if (gi_1096 && gi_968 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3264 > l_ienvelopes_3272 && l_iclose_3280 <= l_ienvelopes_3288 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3552 > l_ienvelopes_3560 && l_iclose_3568 <= l_ienvelopes_3576 && li_3820 < Time[0]) li_3128 = 2; } if (gi_1104 && gi_968 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3264 > l_ienvelopes_3272 && l_iclose_3280 <= l_ienvelopes_3288 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3600 < l_ienvelopes_3608 && l_iclose_3616 >= l_ienvelopes_3624 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3216 < l_ienvelopes_3224 && l_iclose_3232 >= l_ienvelopes_3240 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3552 > l_ienvelopes_3560 && l_iclose_3568 <= l_ienvelopes_3576 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3216 < l_ienvelopes_3224 && l_iclose_3232 >= l_ienvelopes_3240 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3600 < l_ienvelopes_3608 && l_iclose_3616 >= l_ienvelopes_3624 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3264 > l_ienvelopes_3272 && l_iclose_3280 <= l_ienvelopes_3288 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3552 > l_ienvelopes_3560 && l_iclose_3568 <= l_ienvelopes_3576 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3264 > l_ienvelopes_3272 && l_iclose_3280 <= l_ienvelopes_3288 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3600 < l_ienvelopes_3608 && l_iclose_3616 >= l_ienvelopes_3624 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 == FALSE && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3320 <= l_isar_3312 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3464 >= l_isar_3456 && li_3820 < Time[0]) li_3128 = 2; } if (gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 == FALSE && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 == FALSE && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 == FALSE && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3352 <= l_isar_3344 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_isar_3488 >= l_isar_3488 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3352 <= l_isar_3344 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_isar_3488 >= l_isar_3488 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3352 <= l_isar_3344 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_isar_3488 >= l_isar_3488 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3352 <= l_isar_3344 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_isar_3488 >= l_isar_3488 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_1104 && gi_968 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3304 > l_isar_3296 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3216 < l_ienvelopes_3224 && l_iclose_3232 >= l_ienvelopes_3240 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3536 > l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3600 < l_ienvelopes_3608 && l_iclose_3616 >= l_ienvelopes_3624 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3352 > l_isar_3344 && l_iclose_3368 <= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3496 < l_isar_3488 && l_iclose_3512 >= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3352 > l_isar_3344 && l_iclose_3368 <= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3496 < l_isar_3488 && l_iclose_3512 >= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3352 > l_isar_3344 && l_iclose_3368 <= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3496 < l_isar_3488 && l_iclose_3512 >= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_400 == FALSE && gi_368 && gi_328 && gi_924 == FALSE && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3304 > l_isar_3296 && l_iclose_3352 > l_isar_3344 && l_iclose_3368 <= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3496 < l_isar_3488 && l_iclose_3512 >= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_400 == FALSE && gi_368 && gi_328 && gi_924 == FALSE && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_400 == FALSE && gi_368 && gi_328 && gi_924 == FALSE && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 == FALSE && gi_368 && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 == FALSE && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488) li_3128 = 2; } if (gi_400 == FALSE && gi_368 && gi_328 == FALSE && gi_924 == FALSE && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 > l_isar_3344 && l_iclose_3368 <= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 < l_isar_3488 && l_iclose_3512 >= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3216 < l_ienvelopes_3224 && l_iclose_3232 >= l_ienvelopes_3240 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3552 > l_ienvelopes_3560 && l_iclose_3568 <= l_ienvelopes_3576 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3216 < l_ienvelopes_3224 && l_iclose_3232 >= l_ienvelopes_3240 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3600 < l_ienvelopes_3608 && l_iclose_3616 >= l_ienvelopes_3624 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3264 > l_ienvelopes_3272 && l_iclose_3280 <= l_ienvelopes_3288 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3552 > l_ienvelopes_3560 && l_iclose_3568 <= l_ienvelopes_3576 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3264 > l_ienvelopes_3272 && l_iclose_3280 <= l_ienvelopes_3288 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3600 < l_ienvelopes_3608 && l_iclose_3616 >= l_ienvelopes_3624 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3216 < l_ienvelopes_3224 && l_iclose_3232 >= l_ienvelopes_3240 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3552 > l_ienvelopes_3560 && l_iclose_3568 <= l_ienvelopes_3576 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3216 < l_ienvelopes_3224 && l_iclose_3232 >= l_ienvelopes_3240 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3536 > l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3600 < l_ienvelopes_3608 && l_iclose_3616 >= l_ienvelopes_3624 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3264 > l_ienvelopes_3272 && l_iclose_3280 <= l_ienvelopes_3288 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3552 > l_ienvelopes_3560 && l_iclose_3568 <= l_ienvelopes_3576 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3264 > l_ienvelopes_3272 && l_iclose_3280 <= l_ienvelopes_3288 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3600 < l_ienvelopes_3608 && l_iclose_3616 >= l_ienvelopes_3624 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_400 && gi_368 == FALSE && gi_328 && gi_924 == FALSE && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3320 <= l_isar_3312 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3464 >= l_isar_3456 && li_3820 < Time[0]) li_3128 = 2; } if (gi_400 && gi_368 == FALSE && gi_328 && gi_924 == FALSE && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_400 && gi_368 == FALSE && gi_328 && gi_924 == FALSE && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 == FALSE && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3352 >= l_isar_3344 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_isar_3488 <= l_isar_3488 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3352 >= l_isar_3344 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_isar_3488 <= l_isar_3488 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3352 >= l_isar_3344 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_isar_3488 <= l_isar_3488 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3352 >= l_isar_3344 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_isar_3488 <= l_isar_3488 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 && gi_328 == FALSE && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3352 < l_isar_3344 && l_iclose_3368 >= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3496 > l_isar_3488 && l_iclose_3512 <= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3352 < l_isar_3344 && l_iclose_3368 >= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3496 > l_isar_3488 && l_iclose_3512 <= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3352 < l_isar_3344 && l_iclose_3368 >= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3496 > l_isar_3488 && l_iclose_3512 <= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 && gi_328 && gi_924 && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3352 < l_isar_3344 && l_iclose_3368 >= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3496 > l_isar_3488 && l_iclose_3512 <= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 && gi_328 && gi_924 && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3248 > l_ienvelopes_3256 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3584 < l_ienvelopes_3592 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_400 && gi_368 && gi_328 && gi_924 == FALSE && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3304 > l_isar_3296 && l_iclose_3352 < l_isar_3344 && l_iclose_3368 >= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3496 > l_isar_3488 && l_iclose_3512 <= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_400 && gi_368 && gi_328 && gi_924 == FALSE && gi_1780 && gi_316 == FALSE && gi_1776 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3304 > l_isar_3296 && l_iclose_3392 < l_ima_3400) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3448 < l_isar_3440 && l_iclose_3632 > l_ima_3640) li_3128 = 2; } if (gi_400 && gi_368 && gi_328 && gi_924 == FALSE && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1096 && gi_400 && gi_368 && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_976 && gi_1104 && gi_400 && gi_368 && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_968 && gi_1096 && gi_400 && gi_368 && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_968 && gi_1104 && gi_400 && gi_368 && gi_328 && gi_924 && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3200 < l_ienvelopes_3208 && l_iclose_3304 > l_isar_3296) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3536 > l_ienvelopes_3544 && l_iclose_3448 < l_isar_3440) li_3128 = 2; } if (gi_400 && gi_368 && gi_328 == FALSE && gi_924 == FALSE && gi_316 == FALSE && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488) li_3128 = 2; } if (gi_400 && gi_368 && gi_328 == FALSE && gi_924 == FALSE && gi_316 && gi_1780 == FALSE && g_bars_2064 != Bars) { if (l_iatr_3160 > ld_3168 && l_iclose_3352 < l_isar_3344 && l_iclose_3368 >= l_isar_3360 && li_3816 < Time[0]) li_3128 = 1; if (l_iatr_3160 > ld_3168 && l_iclose_3496 > l_isar_3488 && l_iclose_3512 <= l_isar_3504 && li_3820 < Time[0]) li_3128 = 2; } if (gi_1032 && l_ilow_152 < l_ilow_184 && l_iopen_160 > l_ilow_184 && l_iclose_168 > l_ilow_184 && l_iclose_48 > l_ihigh_144 && l_iopen_160 < l_iopen_192 && l_iopen_160 < l_iclose_200) li_3128 = 1; if (gi_1036 && l_ihigh_144 > l_ihigh_176 && l_iopen_160 < l_ihigh_176 && l_iclose_168 < l_ihigh_176 && l_iclose_48 < l_ilow_152 && l_iopen_160 > l_iopen_192 && l_iopen_160 > l_iclose_200) li_3128 = 2; if (gi_1040 && l_ilow_216 < l_ilow_248 && l_iopen_224 > l_ilow_248 && l_iclose_232 > l_ilow_248 && l_iclose_48 > l_ihigh_208 && l_iopen_224 < l_iopen_256 && l_iopen_224 < l_iclose_264) li_3128 = 1; if (gi_1044 && l_ihigh_208 > l_ihigh_240 && l_iopen_224 < l_ihigh_240 && l_iclose_232 < l_ihigh_240 && l_iclose_48 < l_ilow_216 && l_iopen_224 > l_iopen_256 && l_iopen_224 > l_iclose_264) li_3128 = 2; if (gi_1048 && l_ilow_408 < l_ilow_440 && l_iopen_416 > l_ilow_440 && l_iclose_424 > l_ilow_440 && l_iclose_48 > l_ihigh_400 && l_iopen_416 < l_iopen_448 && l_iopen_416 < l_iclose_456) li_3128 = 1; if (gi_1052 && l_ihigh_400 > l_ihigh_432 && l_iopen_416 < l_ihigh_432 && l_iclose_424 < l_ihigh_432 && l_iclose_48 < l_ilow_408 && l_iopen_416 > l_iopen_448 && l_iopen_416 > l_iclose_456) li_3128 = 2; if (gi_1056 && l_ilow_344 < l_ilow_376 && l_iopen_352 > l_ilow_376 && l_iclose_360 > l_ilow_376 && l_iclose_48 > l_ihigh_336 && l_iopen_352 < l_iopen_384 && l_iopen_352 < l_iclose_392) li_3128 = 1; if (gi_1060 && l_ihigh_336 > l_ihigh_368 && l_iopen_352 < l_ihigh_368 && l_iclose_360 < l_ihigh_368 && l_iclose_48 < l_ilow_344 && l_iopen_352 > l_iopen_384 && l_iopen_352 > l_iclose_392) li_3128 = 2; if (gi_1428 && gi_280 && gi_740 && gi_772 && gi_1816 && gi_1812 && gi_1796 && gi_1808 && gi_1788 && g_bars_2064 != Bars && li_3128 == 1 && gi_1804 == 3 || gi_1804 == 1 && (gi_308 && !gi_2060) || (!gi_308 && Bars != g_bars_2052)) { if (!li_3808) { if (AccountFreeMargin() < 0.0 * gd_208) { Print("We have no money. Free Margin = ", AccountFreeMargin()); return (0); } ld_3144 = Ask - gi_1436 * Point; ld_3152 = Ask + gi_1464 * Point; l_ticket_3136 = OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (l_ticket_3136 > 0) { if (OrderSelect(l_ticket_3136, SELECT_BY_TICKET, MODE_TRADES)) { Print("BUY order opened : ", OrderOpenPrice()); g_bars_2064 = Bars; if (gi_1500) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Open Buy"); if (gi_1496) PlaySound(gs_1752); if (gi_1492) Alert(gs_1744); } else Print("Error opening BUY order : ", GetLastError()); } if (gi_308) gi_2060 = TRUE; if (!gi_308) g_bars_2052 = Bars; return (0); } } if (gi_1432 && gi_284 && gi_744 && gi_776 && gi_1816 && gi_1812 && gi_1800 && gi_1808 && gi_1792 && g_bars_2064 != Bars && li_3128 == 2 && gi_1804 == 3 || gi_1804 == 2 && (gi_308 && !gi_2060) || (!gi_308 && Bars != g_bars_2052)) { if (!li_3808) { if (AccountFreeMargin() < 0.0 * gd_208) { Print("We have no money. Free Margin = ", AccountFreeMargin()); return (0); } ld_3144 = Bid + gi_1436 * Point; ld_3152 = Bid - gi_1464 * Point; l_ticket_3136 = OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (l_ticket_3136 > 0) { if (OrderSelect(l_ticket_3136, SELECT_BY_TICKET, MODE_TRADES)) { Print("SELL order opened : ", OrderOpenPrice()); g_bars_2064 = Bars; if (gi_1500) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Open Sell"); if (gi_1496) PlaySound(gs_1752); if (gi_1492) Alert(gs_1744); } else Print("Error opening SELL order : ", GetLastError()); } if (gi_308) gi_2060 = TRUE; if (!gi_308) g_bars_2052 = Bars; return (0); } } if (gi_1376) { gi_1432 = TRUE; gi_1428 = TRUE; } if (gi_1428 && gi_772 && hedge_lots == FALSE && gi_1816 && gi_1680 && g_count_1692 < g_count_1696) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1816 && gi_1684 && g_count_1696 < g_count_1692) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_1816 && gi_336 == FALSE && gi_1300 && gi_1804 == 1 && g_count_1692 < g_count_1696 + 1) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_1816 && gi_336 == FALSE && gi_1300 && gi_1804 == 2 && g_count_1696 < g_count_1692 + 1) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 == FALSE && gi_1816 && gi_336 == FALSE && gi_1304 && gi_1804 == 1 && g_count_1692 < g_count_1696 + gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 == FALSE && gi_1816 && gi_336 == FALSE && gi_1304 && gi_1804 == 2 && g_count_1696 < g_count_1692 + gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 == FALSE && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_376 && l_isar_112 < l_iclose_104 && g_count_1692 < g_count_1696 + gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 == FALSE && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_376 && l_isar_112 > l_iclose_104 && g_count_1696 < g_count_1692 + gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 == FALSE && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 && l_isar_96 < l_iclose_88 && g_count_1692 < g_count_1696 + gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 == FALSE && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 && l_isar_96 > l_iclose_88 && g_count_1696 < g_count_1692 + gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 == FALSE && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 > l_ienvelopes_56 && g_count_1692 < g_count_1696 + gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 == FALSE && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 < l_ienvelopes_64 && g_count_1696 < g_count_1692 + gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 == FALSE && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 > l_ienvelopes_56 && g_count_1692 < g_count_1696 + gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 == FALSE && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 < l_ienvelopes_64 && g_count_1696 < g_count_1692 + gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 && gi_1816 && gi_336 == FALSE && gi_1304 && gi_1804 == 1 && g_count_1692 < g_count_1696 * 2 / gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 && gi_1816 && gi_336 == FALSE && gi_1304 && gi_1804 == 2 && g_count_1696 < g_count_1692 * 2 / gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_376 && l_isar_112 < l_iclose_104 && g_count_1692 < g_count_1696 * 2 / gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_376 && l_isar_112 > l_iclose_104 && g_count_1696 < g_count_1692 * 2 / gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 && l_isar_96 < l_iclose_88 && g_count_1692 < g_count_1696 * 2 / gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 && l_isar_96 > l_iclose_88 && g_count_1696 < g_count_1692 * 2 / gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 > l_ienvelopes_56 && g_count_1692 < g_count_1696 * 2 / gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 < l_ienvelopes_64 && g_count_1696 < g_count_1692 * 2 / gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_440 && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 > l_ienvelopes_56 && g_count_1692 < g_count_1696 * 2 / gd_444) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_440 && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 < l_ienvelopes_64 && g_count_1696 < g_count_1692 * 2 / gd_444) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_772 && hedge_lots && gi_1816 && gi_1680 && g_count_1692 < g_count_1696) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1816 && gi_1684 && g_count_1696 < g_count_1692) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots == FALSE && gi_1788 && gi_1816 && gi_336 == FALSE && gi_1300 && gi_1804 == 1 && g_count_1692 < g_count_1696 + 1) OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots == FALSE && gi_1792 && gi_1816 && gi_336 == FALSE && gi_1300 && gi_1804 == 2 && g_count_1696 < g_count_1692 + 1) OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_440 == FALSE && gi_1816 && gi_336 == FALSE && gi_1304 && gi_1804 == 1 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_440 == FALSE && gi_1816 && gi_336 == FALSE && gi_1304 && gi_1804 == 2 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_440 == FALSE && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_376 && l_isar_112 < l_iclose_104 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_440 == FALSE && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_376 && l_isar_112 > l_iclose_104 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_440 == FALSE && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 && l_isar_96 < l_iclose_88 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_440 == FALSE && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 && l_isar_96 > l_iclose_88 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_440 == FALSE && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 > l_ienvelopes_56 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_440 == FALSE && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 < l_ienvelopes_64 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_440 == FALSE && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 > l_ienvelopes_56 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_440 == FALSE && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 < l_ienvelopes_64 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_1816 && gi_336 == FALSE && gi_1304 && gi_1804 == 1 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_1816 && gi_336 == FALSE && gi_1304 && gi_1804 == 2 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_376 && l_isar_112 < l_iclose_104 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_376 && l_isar_112 > l_iclose_104 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 && l_isar_96 < l_iclose_88 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_1816 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 && l_isar_96 > l_iclose_88 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 > l_ienvelopes_56 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 < l_ienvelopes_64 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_1428 && gi_740 && gi_772 && hedge_lots && gi_1788 && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 > l_ienvelopes_56 && gd_792 < gd_784 * lots_plus) OrderSend(Symbol(), OP_BUY, l_lots_32, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1432 && gi_744 && gi_776 && hedge_lots && gi_1792 && gi_1816 && gi_912 && gi_1304 == FALSE && gi_1300 == FALSE && gi_336 == FALSE && l_iclose_48 < l_ienvelopes_64 && gd_792 > gd_784 * lots_plus) OrderSend(Symbol(), OP_SELL, l_lots_40, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); if (gi_240 == FALSE && gi_420 && gi_1968 && ld_3096 > profit_target_percent) Close_target(); if (gi_240 == FALSE && gi_420 == FALSE && gi_1968 && ld_3096 > profit_target_percent) mClose_target(); if (gi_1972 && ld_0 > gd_472 || ld_3096 < gd_480) close_all_orders(); if (gi_2036 && ld_3096 < -10.0) { gi_unused_2040 = TRUE; gi_unused_2044 = FALSE; } if (gi_2036 && ld_3096 > -2.0) { gi_unused_2040 = FALSE; gi_unused_2044 = TRUE; } int l_ord_total_3824 = OrdersTotal(); for (int l_pos_3828 = l_ord_total_3824 - 1; l_pos_3828 >= 0; l_pos_3828--) { OrderSelect(l_pos_3828, SELECT_BY_POS); li_unused_3832 = 0; if (OrderMagicNumber() == g_magic_1892 && Symbol() == gs_gbpjpym_1848) { if (OrderType() == OP_SELL) gd_800 += 1.0; if (OrderType() == OP_BUY) gd_800 += 1.0; if (gi_1868 && Hour() == gi_1872 && Minute() == gi_1876 && DayOfWeek() == gi_1880 && OrdersTotal() == 0) OrderSend(gs_gbpjpym_1848, OP_BUY, g_lots_1856, Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 99, 236, DodgerBlue); if (gi_1864 && Hour() == gi_1872 && Minute() == gi_1876 && DayOfWeek() == gi_1880 && OrdersTotal() == 0) OrderSend(gs_gbpjpym_1848, OP_SELL, g_lots_1856, Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 99, 0, DeepPink); } } if (gi_768 && li_8 > 100) profit_target_percent = 5; if (gi_768 && li_8 > 50) profit_target_percent = 2; if (gi_768 && li_8 > 20) profit_target_percent = 1; if (gi_768 && li_8 < 20) profit_target_percent = 0.1; if (gi_1940 == 0 && l_iclose_48 == l_price_872) gi_1940++; if (gi_1940 == 1 && l_iclose_48 > l_price_864) gi_1940++; if (gi_1940 == 2 && l_iclose_48 > l_price_856) gi_1940++; if (gi_1940 == 3 && l_iclose_48 > l_price_848) gi_1940++; if (gi_1940 == 4 && l_iclose_48 > l_price_840) gi_1940++; if (gi_1940 == 5 && l_iclose_48 > l_price_832) gi_1940++; if (gi_1940 == 6 && l_iclose_48 > l_price_824) gi_1940++; if (gi_1944 == 0 && l_iclose_48 == l_price_872) gi_1944++; if (gi_1944 == 1 && l_iclose_48 > l_price_864) gi_1944++; if (gi_1944 == 2 && l_iclose_48 > l_price_856) gi_1944++; if (gi_1944 == 3 && l_iclose_48 > l_price_848) gi_1944++; if (gi_1944 == 4 && l_iclose_48 > l_price_840) gi_1944++; if (gi_1944 == 5 && l_iclose_48 > l_price_832) gi_1944++; if (gi_1944 == 6 && l_iclose_48 > l_price_824) gi_1944++; if (gi_1912 && gi_1932 == FALSE && l_iclose_48 > l_price_864 && l_iclose_48 < l_price_856) { OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 3, 236, DodgerBlue); gi_1932 = TRUE; } if (gi_1912 && gi_1916 == FALSE && l_iclose_48 > l_price_848 && l_iclose_48 < l_price_840) { OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, 200, 0, 0, "Buy(trendchaser super ea " + li_3140 + ")", 1, 236, DodgerBlue); gi_1916 = TRUE; } if (gi_1912 && gi_1920 == FALSE && l_iclose_48 < l_price_848 && l_iclose_48 > l_price_856) { OrderSend(Symbol(), OP_SELL, LotsOptimized(), Bid, 200, 0, 0, "Sell(trendchaser super ea " + li_3140 + ")", 2, 0, DeepPink); gi_1920 = TRUE; } if (gi_1964 && ld_0 < gd_480) close_all_orders(); if (gi_304) { gi_440 = FALSE; gd_444 = 0; gi_328 = FALSE; gi_368 = FALSE; gi_376 = FALSE; } if (gi_304 && g_count_1692 == g_count_1696) gi_376 = FALSE; if (gi_452 && ld_0 < gd_456) gi_440 = FALSE; if (gi_452 && li_8 == 0) gi_440 = TRUE; if (gi_432 && li_8 > gi_148) close_all_orders(); if (gi_1760) { gd_1948 = 0.0; gd_1956 = 0.0; gi_780 = FALSE; gi_740 = TRUE; gi_744 = TRUE; ld_3096 = 0; gd_1636 = 0; gd_792 = 0; gd_784 = 0; li_3092 = 0; g_count_1708 = 0; g_count_1704 = 0; gd_unused_2008 = gd_208; gd_2016 = gd_208; } if (OrdersTotal() == 0) { gi_1916 = FALSE; gi_1920 = FALSE; gi_unused_1924 = 0; gi_unused_1928 = 0; gi_1932 = FALSE; gi_unused_1936 = 0; } if (l_iclose_48 < l_isar_3296) gs_none_1900 = "short"; if (l_iclose_48 > l_isar_3296) gs_none_1900 = "long"; if (!gi_308) g_bars_2052 = Bars; return (0); }