ForexRising~

ForexRising~

开心版 无广告 75

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

15 人已下载 手机查看

ForexRising~

/*
Generated by EX4-TO-MQ4 decompiler FREEWARE V4.0.451.1 [-]
Website: http://www.metaquotes.net
E-mail : support@metaquotes.net
*/
#property copyright "嬴政外汇(www.winzfx.com)"
#property link "http://www.winzfx.com"

extern string Tips = "本交易系统来自嬴政外汇";
extern string Tips2 = "预知更多交易系统请搜索嬴政或嬴政外汇";
extern string Expert_Name = "ForexRisingEA";
extern double Broker_type = 1.0;
extern double Lot_type = 10.0;
extern double GMT = 2.0;
extern double MaxLots = 5.0;
extern double Risk_Percentage = 15.0;
extern double TakeProfit = 10.0;
extern double StopLoss = 40.0;
extern double TrailingTP = 3.0;
extern double AdvancedClose = 5.0;
double g_slippage_172 = 1.0;
extern double MaxSpread = 3.0;
extern double MaxOpenOrders = 3.0;
double gd_196 = 0.0;
extern double Candles = 3.0;
extern int MagicNumber = 200423;
double gd_216;

int init() {
if (Digits <= 3) gd_216 = 0.01;
else gd_216 = 0.0001;
return (0);
}

int deinit() {
return (0);
}

int start() {
double ld_0;
double ld_8;
int ticket_16;
double price_20;
double ld_unused_28;
double ld_36;
int order_total_44;
int cmd_48;
int is_closed_52;
double price_56;
double order_open_price_64;
int cmd_72;
int error_76;
Comment("Copyright Forex Rising from winzfx.com");
int li_unused_80 = 123456;
double iopen_84 = iOpen(15, 0, 2);
double iclose_92 = iClose(15, 0, 2);
double iopen_100 = iOpen(15, 0, 1);
double iclose_108 = iClose(15, 0, 1);
double ld_116 = 10.0 * Lot_type;
double ld_124 = 100 / Lot_type;
double ld_132 = MathFloor(0.007 * (AccountFreeMargin() / ld_116 * Ask) * Risk_Percentage) / ld_124;
double ld_140 = MathMax(ld_132, Lot_type / 100.0);
double lots_148 = MathMin(ld_140, MaxLots);
int li_156 = MarketInfo(Symbol(), MODE_STOPLEVEL) / Broker_type;
int li_160 = MarketInfo(Symbol(), MODE_SPREAD) / Broker_type;
double ld_164 = Low[iLowest(NULL, PERIOD_M15, MODE_LOW, Candles, 1)] + gd_196 * gd_216 * Broker_type;
if (TakeProfit <= li_156) ld_0 = li_156;
else ld_0 = TakeProfit;
if (StopLoss <= li_156) ld_8 = li_156 + li_160;
else ld_8 = StopLoss;
if (OrdersTotal() < MaxOpenOrders && AccountFreeMargin() > 20.0 * Lot_type) {
if (Ask <= ld_164) {
if (Ask - Bid <= MaxSpread * gd_216 * Broker_type) {
if (DayOfWeek() == 5 && Hour() == GMT + 20.0 || Hour() == GMT + 21.0 || Hour() == GMT + 19.0) {
ticket_16 = OrderSend(Symbol(), OP_BUY, Lot_type / 100.0, Ask, g_slippage_172, Ask - gd_216 * ld_8 * Broker_type, ld_164 + gd_216 * ld_0 * Broker_type, "ForexRising",
MagicNumber, 0, Red);
} else {
if (Hour() == GMT + 19.0 || Hour() == GMT + 20.0 || Hour() == GMT + 21.0 || Hour() == GMT + 22.0 || Hour() == GMT + 23.0 || Hour() == GMT + 0.0 || Hour() == GMT +
1.0 || Hour() == GMT + 2.0 || Hour() == GMT + 3.0 || Hour() == GMT + 4.0 || Hour() == GMT + 5.0) {
ticket_16 = OrderSend(Symbol(), OP_BUY, lots_148, Ask, g_slippage_172, Ask - gd_216 * ld_8 * Broker_type, ld_164 + gd_216 * ld_0 * Broker_type, "ForexRising", MagicNumber,
0, Red);
}
}
}
}
}
if (Broker_type == 10.0) ld_36 = 5;
else ld_36 = 4;
int order_total_172 = OrdersTotal();
if (order_total_172 > 0) {
order_total_44 = OrdersTotal();
for (int pos_176 = 0; pos_176 < order_total_44; pos_176++) {
OrderSelect(pos_176, SELECT_BY_POS);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
cmd_48 = OrderType();
if (cmd_48 == OP_BUY) {
price_20 = NormalizeDouble(Ask + li_156 * gd_216 * Broker_type, ld_36);
if (price_20 < OrderTakeProfit() && price_20 >= OrderOpenPrice() + TrailingTP * gd_216 * Broker_type && price_20 >= Ask + li_156 * gd_216 * Broker_type) ld_unused_28 = OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), price_20, 0, CLR_NONE);
}
}
}
}
if (OrderSelect(0, SELECT_BY_POS, MODE_TRADES)) order_open_price_64 = OrderOpenPrice();
double ld_180 = NormalizeDouble(order_open_price_64 + AdvancedClose * gd_216 * Broker_type, ld_36);
if (ld_180 < Bid && TakeProfit != AdvancedClose || AdvancedClose != TrailingTP && OrderMagicNumber() == MagicNumber) {
for (int li_188 = OrdersTotal() - 1; li_188 >= 0; li_188--) {
if (OrderSelect(0, SELECT_BY_POS, MODE_TRADES)) {
cmd_72 = OrderType();
if (!((cmd_72 == OP_BUY || cmd_72 == OP_SELL))) continue;
while (true) {
if (cmd_72 == OP_BUY && OrderMagicNumber() == MagicNumber) price_56 = MarketInfo(OrderSymbol(), MODE_BID);
else price_56 = MarketInfo(OrderSymbol(), MODE_ASK);
is_closed_52 = OrderClose(OrderTicket(), OrderLots(), price_56, g_slippage_172, CLR_NONE);
if (is_closed_52 != 1) {
error_76 = GetLastError();
Print("LastError = ", error_76);
} else error_76 = 0;
if (error_76 != 135/* PRICE_CHANGED */) break;
RefreshRates();
}
}
Print("Error when order select ", GetLastError());
}
}
return (0);
}

相关资源

暂无评论

暂无评论...