踏空无敌系类
踏空无敌系类

踏空无敌系类

更新日期:
2022-11-13
分类标签:
语言:
中文
平台:
没限制

55 人已下载 手机查看

踏空无敌系类

 

extern int MAGIC = 20090422;
extern double MinLot = 0.1;
double gd_88 = 9999.0;
extern double Lots = 1.0;
extern double LotsPercent = 0.5;
extern int MaxTradesPerSymbol = 3;
extern int slippage = 2;
int gi_120 = 10;
double g_period_124 = 14.0;
extern double MAp1 = 68.0;
extern double MAp2 = 226.0;
extern double MAp3 = 588.0;
extern double k2 = 0.57;
extern double k3 = 0.13;
extern double ccilmt = 131.0;
extern double SL = 178.0;
extern double TP = 39.0;
extern int dp = 4;
extern int dpstp = 24;
int g_time_204 = 0;

int init() {
HideTestIndicators(TRUE);
return (0);
}

int start() {
int li_0;
int l_ticket_4;
double ld_8;
double l_icci_16;
double l_icci_24;
double l_ima_32;
double l_ima_40;
double l_ima_48;
double l_ima_56;
double l_ima_64;
double l_ima_72;
int l_count_80;
double l_ord_open_price_84;
if (Time[0] == g_time_204) return (0);
g_time_204 = Time[0];
if (slippage == 2) {
if (Time[0] > D’07.08.2009 16:00′) {
Comment(“使用结束 “);
return (0);
}
}
if (AccountName() == “Ni Siwei” || AccountNumber() == 155424 || IsDemo() || AccountNumber() == 164856) {
ld_8 = Point;
if (Digits == 5 || Digits == 3) ld_8 = 10.0 * Point;
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (int l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
} else {
Comment(“非注册用户,请勿使用盗版软件”);
return (0);
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
if (gi_120 < slippage) {
l_icci_16 = iCCI(NULL, 0, g_period_124, PRICE_CLOSE, 0);
l_icci_24 = iCCI(NULL, 0, 14, PRICE_CLOSE, 1);
l_ima_32 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_40 = iMA(NULL, 0, MAp1, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_48 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_56 = iMA(NULL, 0, MAp2, 0, MODE_SMA, PRICE_MEDIAN, 1);
l_ima_64 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 0);
l_ima_72 = iMA(NULL, 0, MAp3, 0, MODE_SMA, PRICE_MEDIAN, 1);
ObjectCreate(“ICCI_1”, OBJ_HLINE, 0, 0, l_icci_16);
ObjectSet(“ICCI_1”, OBJPROP_COLOR, Blue);
ObjectMove(“ICCI_1”, 0, 1, l_icci_16);
ObjectCreate(“ICCI_2”, OBJ_HLINE, 0, 0, l_icci_24);
ObjectSet(“ICCI_2”, OBJPROP_COLOR, DarkTurquoise);
ObjectMove(“ICCI_2”, 0, 1, l_icci_24);
ObjectCreate(“iMA_10”, OBJ_HLINE, 0, 0, l_ima_32);
ObjectSet(“iMA_10”, OBJPROP_COLOR, Yellow);
ObjectMove(“iMA_10”, 0, 1, l_ima_32);
ObjectCreate(“iMA_11”, OBJ_HLINE, 0, 0, l_ima_40);
ObjectSet(“iMA_11”, OBJPROP_COLOR, Peru);
ObjectMove(“iMA_11”, 0, 1, l_ima_40);
ObjectCreate(“iMA_20”, OBJ_HLINE, 0, 0, l_ima_48);
ObjectSet(“iMA_20”, OBJPROP_COLOR, LightGray);
ObjectMove(“iMA_20”, 0, 1, l_ima_48);
ObjectCreate(“iMA_21”, OBJ_HLINE, 0, 0, l_ima_56);
ObjectSet(“iMA_21”, OBJPROP_COLOR, WhiteSmoke);
ObjectMove(“iMA_21”, 0, 1, l_ima_56);
l_count_80 = 0;
l_ord_open_price_84 = 0;
for (l_pos_92 = 0; l_pos_92 < OrdersTotal(); l_pos_92++) {
if (OrderSelect(l_pos_92, SELECT_BY_POS, MODE_TRADES)) {
if (OrderMagicNumber() == MAGIC) {
if (StringFind(OrderSymbol(), Symbol(), 0) != -1) {
l_count_80++;
l_ord_open_price_84 = OrderOpenPrice();
if (OrderType() == OP_BUY && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dpstp * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Bid, slippage, Violet);
return (0);
}
if (OrderType() == OP_SELL && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dpstp) * ld_8) {
OrderClose(OrderTicket(), OrderLots(), Ask, slippage, Violet);
return (0);
}
}
}
}
}
if (l_count_80 < MaxTradesPerSymbol) {
if (LotsPercent > 0.0) {
if (MinLot == 0.1) li_0 = 1;
if (MinLot == 0.01) li_0 = 2;
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() * LotsPercent / 100.0) / 100.0, li_0);
} else Lots = Lots;
if (Lots < MinLot) Lots = MinLot;
if (Lots > gd_88) Lots = gd_88;
l_ticket_4 = -10;
if (l_ima_48 – l_ima_56 > k2 * ld_8 && l_ima_64 – l_ima_72 > k3 * ld_8 && l_ima_32 > l_ima_48 && l_icci_24 < (-ccilmt) && l_icci_16 > l_icci_24 && Ask – l_ima_32 < (-dp) * ld_8 &&
l_ord_open_price_84 == 0.0 || Ask – l_ord_open_price_84 < (-gi_120) * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, Ask – SL * ld_8, Ask + TP * ld_8, “Master Lucky”, MAGIC, 0, Green);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Buying”);
}
if (l_ima_48 – l_ima_56 < (-k2) * ld_8 && l_ima_64 – l_ima_72 < (-k3) * ld_8 && l_ima_32 < l_ima_48 && l_icci_24 > ccilmt && l_icci_16 < l_icci_24 && Bid – l_ima_32 > dp * ld_8 &&
l_ord_open_price_84 == 0.0 || Bid – l_ord_open_price_84 > gi_120 * ld_8) {
l_ticket_4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, Bid + SL * ld_8, Bid – TP * ld_8, “Master Lucky”, MAGIC, 0, Red);
if (l_ticket_4 > 0) Alert(Symbol() + “-” + “Master Lucky ” + MAGIC + “: Selling”);
}
}
}
return (0);
}

如果你对文件有了解,请帮助投票!

If you are familiar with the file, please help vote!

平均评分 0 / 5. 投票数: 0

到目前为止还没有投票!成为第一位投票人。

相关资源

暂无评论

none
暂无评论...