Euro-Blaster_7_fix

Euro-Blaster_7_fix

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

13 人已下载 手机查看

Euro-Blaster_7_fix

#property link “http://www.euro-blaster.com”

string gs_76 = “Euro-Blaster 7.0”;
extern int magic = 7777;
extern double lots = 0.1;
extern bool mm = FALSE;
extern double risk = 1.0;
extern double minlot = 0.01;
extern double maxlot = 50.0;
extern bool ecn = FALSE;
extern int maxtrades = 1;
extern int tradesperbar = 1;
extern double stoploss = 75.0;
extern double takeprofit = 10.0;
int gi_152 = 1;
double gd_156 = 5.0;
double gd_164 = 10.0;
double gd_172 = 10.0;
bool gi_180 = TRUE;
bool gi_184 = FALSE;
bool gi_188 = FALSE;
bool gi_192 = FALSE;
int gi_196 = 20;
bool gi_200 = FALSE;
bool gi_204 = FALSE;
bool gi_208 = FALSE;
int g_timeframe_212 = PERIOD_H1;
int g_period_216 = 7;
int g_ma_method_220 = MODE_SMMA;
int gi_224 = 8;
bool gi_228 = TRUE;
int g_timeframe_232 = 0;
int g_period_236 = 7;
int gi_240 = 27;
int gi_244 = 69;
bool gi_248 = TRUE;
int g_timeframe_252 = 0;
int g_period_256 = 14;
int g_period_260 = 7;
int g_slowing_264 = 9;
int gi_268 = 30;
int gi_272 = 70;
int gi_276 = 0;
int gi_280 = 2;
int gi_284 = 1;
bool gi_288 = FALSE;
int gi_292 = 12;
int gi_296 = 0;
bool gi_300 = FALSE;
int gi_304 = 0;
int gi_308 = 1;
int gi_312 = 21;
int gi_316 = 0;
bool gi_320 = TRUE;
bool gi_324 = TRUE;
int gi_328 = 0;
int gi_332 = 0;
int gi_336 = 2;
bool gi_340 = FALSE;
bool gi_344 = FALSE;
double gd_348 = 15.0;
double gd_356 = 15.0;
double gd_364 = 1.0;
double gd_372 = 0.0;
double gd_380 = 0.0;
datetime gt_unused_388;
datetime gt_unused_392;
int g_str2time_396;
int g_str2time_400;
int g_str2time_404;
int g_str2time_408;
int g_datetime_412;
int g_datetime_416;
int g_pos_424;
int g_bars_428 = -1;
int g_count_432;
int g_count_436;
int g_count_440;
int gi_444 = 100;
int gi_460;
int gi_464;
int gi_468;
int gi_472;
int gi_476;
int g_count_480;
int gi_484;
int gi_488;
string gs_496;
string gs_504;
string gs_512;
string gs_520;
string gs_528;
string gs_536;
string gs_544;
string gs_552;
double g_price_568;
double g_price_576;
double g_lots_584;
double gda_632[14];
double gda_636[14];
double g_ord_open_price_640;
double g_ord_open_price_648;
bool gi_unused_680 = FALSE;
bool gi_684 = TRUE;
bool gi_688 = TRUE;
double gd_692;
double gd_700;
int g_digits_708;
int gi_712 = 1304208000;

int init() {
gt_unused_388 = Time[0];
gt_unused_392 = Time[0];
gda_636[13] = 1332900000;
gda_632[13] = 1351652400;
gda_636[12] = 1301364000;
gda_632[12] = 1319511600;
gda_636[11] = D’30.03.2010 03:00′;
gda_632[11] = D’26.10.2010 04:00′;
gda_636[10] = D’29.03.2009 03:00′;
gda_632[10] = D’25.10.2009 04:00′;
gda_636[9] = D’30.03.2008 03:00′;
gda_632[9] = D’26.10.2008 04:00′;
gda_636[8] = D’25.03.2007 03:00′;
gda_632[8] = D’28.10.2007 04:00′;
gda_636[7] = D’26.03.2006 02:00′;
gda_632[7] = D’29.10.2006 03:00′;
gda_636[6] = D’27.03.2005 02:00′;
gda_632[6] = D’30.10.2005 03:00′;
gda_636[5] = D’28.03.2004 02:00′;
gda_632[5] = D’31.10.2004 03:00′;
gda_636[4] = D’30.03.2003 02:00′;
gda_632[4] = D’26.10.2003 03:00′;
gda_636[3] = D’31.03.2002 02:00′;
gda_632[3] = D’27.10.2002 03:00′;
gda_636[2] = D’25.03.2001 02:00′;
gda_632[2] = D’28.10.2001 03:00′;
gda_636[1] = 954036000;
gda_632[1] = 972788400;
gda_636[0] = 922586400;
gda_632[0] = 941338800;
g_digits_708 = Digits;
if (g_digits_708 == 3 || g_digits_708 == 5) {
gd_692 = 10.0 * Point;
gd_700 = 10;
} else {
gd_692 = Point;
gd_700 = 1;
}
if (minlot >= 1.0) gi_460 = 100000;
if (minlot < 1.0) gi_460 = 10000;
if (minlot < 0.1) gi_460 = 1000;
return (0);
}

int start() {
if (TimeCurrent() > gi_712) {
Alert(“This EA is expired”);
return (0);
}
if (gd_372 > 0.0) movebreakeven(gd_372, gd_380);
if (gd_356 > 0.0) movetrailingstop(gd_348, gd_356);
if (OrdersTotal() > 0) {
for (g_pos_424 = 0; g_pos_424 <= OrdersTotal(); g_pos_424++) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderCloseTime() == 0) {
if (OrderType() == OP_BUY) {
g_datetime_412 = OrderOpenTime();
g_ord_open_price_640 = OrderOpenPrice();
}
if (OrderType() == OP_SELL) {
g_datetime_416 = OrderOpenTime();
g_ord_open_price_648 = OrderOpenPrice();
}
}
}
}
if (tradesperbar == 1) {
if (g_datetime_412 < Time[0]) g_count_436 = 0;
else g_count_436 = 1;
if (g_datetime_416 < Time[0]) g_count_440 = 0;
else g_count_440 = 1;
}
if (tradesperbar != 1 && g_bars_428 != Bars) {
g_count_436 = 0;
g_count_440 = 0;
g_bars_428 = Bars;
}
double l_ima_0 = iMA(NULL, g_timeframe_212, g_period_216, 0, g_ma_method_220, PRICE_CLOSE, gi_276);
int l_count_8 = 0;
for (g_pos_424 = 1; g_pos_424 <= gi_224; g_pos_424++) {
if (l_ima_0 >= iMA(NULL, g_timeframe_212, g_period_216, 0, g_ma_method_220, PRICE_CLOSE, g_pos_424))
if (l_ima_0 > iMA(NULL, g_timeframe_212, g_period_216, 0, g_ma_method_220, PRICE_CLOSE, g_pos_424)) l_count_8++;
}
int l_count_12 = 0;
for (g_pos_424 = 1; g_pos_424 <= gi_224; g_pos_424++) {
if (l_ima_0 <= iMA(NULL, g_timeframe_212, g_period_216, 0, g_ma_method_220, PRICE_CLOSE, g_pos_424))
if (l_ima_0 < iMA(NULL, g_timeframe_212, g_period_216, 0, g_ma_method_220, PRICE_CLOSE, g_pos_424)) l_count_12++;
}
double l_irsi_16 = iRSI(NULL, g_timeframe_232, g_period_236, PRICE_CLOSE, gi_276);
double l_istochastic_24 = iStochastic(NULL, g_timeframe_252, g_period_256, g_period_260, g_slowing_264, MODE_SMA, 0, MODE_MAIN, gi_276);
bool li_32 = FALSE;
bool li_36 = FALSE;
if (l_count_8 == gi_224 && gi_228 == FALSE || (gi_228 && l_irsi_16 <= gi_240) && gi_248 == FALSE || (gi_248 && l_istochastic_24 <= gi_268) && count(OP_BUY) == 0 ||
(count(OP_BUY) > 0 && Ask < g_ord_open_price_640 – gd_172 * gd_692) && gi_208 == FALSE || (gi_208 && gi_684)) {
if (gi_344) li_36 = TRUE;
else li_32 = TRUE;
gi_684 = FALSE;
gi_688 = TRUE;
}
if (l_count_12 == gi_224 && gi_228 == FALSE || (gi_228 && l_irsi_16 >= gi_244) && gi_248 == FALSE || (gi_248 && l_istochastic_24 >= gi_272) && count(OP_SELL) == 0 ||
(count(OP_SELL) > 0 && Bid > g_ord_open_price_648 + gd_172 * gd_692) && gi_208 == FALSE || (gi_208 && gi_688)) {
if (gi_344) li_32 = TRUE;
else li_36 = TRUE;
gi_684 = TRUE;
gi_688 = FALSE;
}
if (gi_340 && li_36) closebuy();
if (gi_340 && li_32) closesell();
if (gi_204 || gi_200) {
hideclosesell();
hideclosebuy();
}
if (Ask – Bid > gd_164 * gd_700 * gd_692) return (0);
if (count(OP_BUY) + count(OP_SELL) >= maxtrades) return (0);
if (checktime()) return (0);
if (mm) lots = lotsoptimized();
int li_40 = 0;
if (gi_152 > 0) li_40 = TimeCurrent() + 60 * gi_152 – 5;
gi_484 = 0;
g_count_480 = 0;
if (li_32 && g_count_436 < tradesperbar) {
if (gi_184) {
delete(OP_SELLSTOP);
delete(OP_SELLLIMIT);
}
g_lots_584 = lots;
if (ecn == FALSE) {
if (gi_180) {
while (gi_484 <= 0 && g_count_480 < gi_444) {
while (!IsTradeAllowed()) Sleep(5000);
RefreshRates();
gi_484 = open(OP_BUY, g_lots_584, Ask, stoploss, takeprofit, li_40, Blue);
if (gi_484 < 0) g_count_480++;
}
}
if (gi_188) {
RefreshRates();
gi_484 = open(OP_BUYSTOP, g_lots_584, Ask + gi_196 * gd_692, stoploss, takeprofit, li_40, Blue);
}
if (gi_192) {
RefreshRates();
gi_484 = open(OP_BUYLIMIT, g_lots_584, Bid – gi_196 * gd_692, stoploss, takeprofit, li_40, Blue);
}
}
if (ecn) {
if (gi_180) {
while (gi_484 <= 0 && g_count_480 < gi_444) {
while (!IsTradeAllowed()) Sleep(5000);
RefreshRates();
gi_484 = open(OP_BUY, g_lots_584, Ask, 0, 0, li_40, Blue);
if (gi_484 < 0) g_count_480++;
}
}
if (gi_188) {
RefreshRates();
gi_484 = open(OP_BUYSTOP, g_lots_584, Ask + gi_196 * gd_692, 0, 0, li_40, Blue);
}
if (gi_192) {
RefreshRates();
gi_484 = open(OP_BUYLIMIT, g_lots_584, Bid – gi_196 * gd_692, 0, 0, li_40, Blue);
}
createlstoploss(stoploss);
createltakeprofit(takeprofit);
}
if (gi_484 > 0) g_count_436++;
}
gi_484 = 0;
if (li_36 && g_count_440 < tradesperbar) {
if (gi_184) {
delete(OP_BUYSTOP);
delete(OP_BUYLIMIT);
}
g_lots_584 = lots;
if (ecn == FALSE) {
if (gi_180) {
while (gi_484 <= 0 && g_count_480 < gi_444) {
while (!IsTradeAllowed()) Sleep(5000);
RefreshRates();
gi_484 = open(OP_SELL, g_lots_584, Bid, stoploss, takeprofit, li_40, Red);
if (gi_484 < 0) g_count_480++;
}
}
if (gi_188) {
RefreshRates();
gi_484 = open(OP_SELLSTOP, g_lots_584, Bid – gi_196 * gd_692, stoploss, takeprofit, li_40, Red);
}
if (gi_192) {
RefreshRates();
gi_484 = open(OP_SELLLIMIT, g_lots_584, Ask + gi_196 * gd_692, stoploss, takeprofit, li_40, Red);
}
}
if (ecn) {
if (gi_180) {
while (gi_484 <= 0 && g_count_480 < gi_444) {
while (!IsTradeAllowed()) Sleep(5000);
RefreshRates();
gi_484 = open(OP_SELL, g_lots_584, Bid, 0, 0, li_40, Red);
if (gi_484 < 0) g_count_480++;
}
}
if (gi_188) {
RefreshRates();
gi_484 = open(OP_SELLSTOP, g_lots_584, Bid – gi_196 * gd_692, 0, 0, li_40, Red);
}
if (gi_192) {
RefreshRates();
gi_484 = open(OP_SELLLIMIT, g_lots_584, Ask + gi_196 * gd_692, 0, 0, li_40, Red);
}
createsstoploss(stoploss);
createstakeprofit(takeprofit);
}
if (gi_484 > 0) g_count_440++;
}
if (ecn) {
createlstoploss(stoploss);
createltakeprofit(takeprofit);
createsstoploss(stoploss);
createstakeprofit(takeprofit);
}
return (0);
}

int open(int a_cmd_0, double ad_4, double ad_12, double ad_20, double ad_28, int a_datetime_36, color a_color_40) {
int l_ticket_44 = 0;
if (ad_4 < minlot) ad_4 = minlot;
if (ad_4 > maxlot) ad_4 = maxlot;
if (a_cmd_0 == OP_BUY || a_cmd_0 == OP_BUYSTOP || a_cmd_0 == OP_BUYLIMIT) {
if (gi_200 == FALSE && ad_20 > 0.0) g_price_568 = ad_12 – ad_20 * gd_692;
else g_price_568 = 0;
if (gi_204 == FALSE && ad_28 > 0.0) g_price_576 = ad_12 + ad_28 * gd_692;
else g_price_576 = 0;
}
if (a_cmd_0 == OP_SELL || a_cmd_0 == OP_SELLSTOP || a_cmd_0 == OP_SELLLIMIT) {
if (gi_200 == FALSE && ad_20 > 0.0) g_price_568 = ad_12 + ad_20 * gd_692;
else g_price_568 = 0;
if (gi_204 == FALSE && ad_28 > 0.0) g_price_576 = ad_12 – ad_28 * gd_692;
else g_price_576 = 0;
}
l_ticket_44 = OrderSend(Symbol(), a_cmd_0, NormalizeDouble(ad_4, gi_336), NormalizeDouble(ad_12, g_digits_708), gd_156 * gd_700, g_price_568, g_price_576, gs_76 +
” ” + DoubleToStr(magic, 0), magic, a_datetime_36, a_color_40);
return (l_ticket_44);
}

double lotsoptimized() {
double ld_ret_0;
if (stoploss > 0.0) ld_ret_0 = AccountBalance() * (risk / 100.0) / (stoploss * gd_692 / MarketInfo(Symbol(), MODE_TICKSIZE) * MarketInfo(Symbol(), MODE_TICKVALUE));
else ld_ret_0 = NormalizeDouble(AccountBalance() / gi_460 * minlot * risk, gi_336);
return (ld_ret_0);
}

bool checktime() {
if (TimeCurrent() < gda_632[TimeYear(TimeCurrent()) – 1999] && TimeCurrent() > gda_636[TimeYear(TimeCurrent()) – 1999]) gi_488 = gi_280;
else gi_488 = gi_284;
string ls_0 = Year() + “.” + Month() + “.” + Day();
if (gi_288) {
gi_476 = gi_292 + gi_488;
if (gi_476 > 23) gi_476 -= 24;
if (gi_476 < 10) gs_544 = “0” + gi_476;
if (gi_476 > 9) gs_544 = gi_476;
if (gi_296 < 10) gs_552 = “0” + gi_296;
if (gi_296 > 9) gs_552 = gi_296;
g_str2time_408 = StrToTime(ls_0 + ” ” + gs_544 + “:” + gs_552);
}
if (gi_300) {
gi_464 = gi_304 + gi_488;
if (gi_464 > 23) gi_464 -= 24;
if (gi_464 < 10) gs_496 = “0” + gi_464;
if (gi_464 > 9) gs_496 = gi_464;
if (gi_308 < 10) gs_504 = “0” + gi_308;
if (gi_308 > 9) gs_504 = gi_308;
g_str2time_396 = StrToTime(ls_0 + ” ” + gs_496 + “:” + gs_504);
gi_468 = gi_312 + gi_488;
if (gi_468 > 23) gi_468 -= 24;
if (gi_312 < 10) gs_512 = “0” + gi_468;
if (gi_312 > 9) gs_512 = gi_468;
if (gi_316 < 10) gs_520 = “0” + gi_316;
if (gi_316 > 9) gs_520 = gi_316;
g_str2time_400 = StrToTime(ls_0 + ” ” + gs_512 + “:” + gs_520);
}
if (gi_324) {
gi_472 = gi_328 + gi_488;
if (gi_472 > 23) gi_472 -= 24;
if (gi_472 < 10) gs_528 = “0” + gi_472;
if (gi_472 > 9) gs_528 = gi_472;
if (gi_332 < 10) gs_536 = “0” + gi_332;
if (gi_332 > 9) gs_536 = gi_332;
g_str2time_404 = StrToTime(ls_0 + ” ” + gs_528 + “:” + gs_536);
}
if ((gi_300 && (gi_464 <= gi_468 && TimeCurrent() < g_str2time_396 || TimeCurrent() > g_str2time_400) || (gi_464 > gi_468 && TimeCurrent() < g_str2time_396 && TimeCurrent() > g_str2time_400)) ||
(gi_320 == FALSE && DayOfWeek() == 0) || (gi_324 && DayOfWeek() == 5 && TimeCurrent() > g_str2time_404) || (gi_288 && DayOfWeek() == 1 && TimeCurrent() < g_str2time_408)) return (TRUE);
return (FALSE);
}

int count(int a_cmd_0) {
g_count_432 = 0;
if (OrdersTotal() > 0) {
for (g_pos_424 = OrdersTotal(); g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderType() == a_cmd_0 && OrderMagicNumber() == magic) g_count_432++;
}
return (g_count_432);
}
return (0);
}

void closebuy() {
RefreshRates();
if (OrdersTotal() > 0) {
for (g_pos_424 = OrdersTotal() – 1; g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, gd_156 * gd_700);
}
}
}

void closesell() {
RefreshRates();
if (OrdersTotal() > 0) {
for (g_pos_424 = OrdersTotal() – 1; g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, gd_156 * gd_700);
}
}
}

void hideclosebuy() {
RefreshRates();
if (OrdersTotal() > 0) {
for (g_pos_424 = OrdersTotal() – 1; g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_BUY && (gi_200 && stoploss > 0.0 && OrderProfit() <= 10.0 * ((-1.0 * stoploss) * OrderLots()) – 10.0 * (MarketInfo(Symbol(), MODE_SPREAD) * OrderLots()) / gd_700) ||
(gi_204 && takeprofit > 0.0 && OrderProfit() >= 10.0 * (takeprofit * OrderLots()))) OrderClose(OrderTicket(), OrderLots(), Bid, gd_156 * gd_700);
}
}
}

void hideclosesell() {
RefreshRates();
if (OrdersTotal() > 0) {
for (g_pos_424 = OrdersTotal() – 1; g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_SELL && (gi_200 && stoploss > 0.0 && OrderProfit() <= 10.0 * ((-1.0 * stoploss) * OrderLots()) – 10.0 * (MarketInfo(Symbol(), MODE_SPREAD) * OrderLots()) / gd_700) ||
(gi_204 && takeprofit > 0.0 && OrderProfit() >= 10.0 * (takeprofit * OrderLots()))) OrderClose(OrderTicket(), OrderLots(), Ask, gd_156 * gd_700);
}
}
}

void movebreakeven(double ad_0, double ad_8) {
RefreshRates();
if (OrdersTotal() > 0) {
for (g_pos_424 = OrdersTotal(); g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {
if (OrderType() == OP_BUY) {
if (NormalizeDouble(Bid – OrderOpenPrice(), g_digits_708) < NormalizeDouble(ad_0 * gd_692, g_digits_708)) continue;
if (!(NormalizeDouble(OrderStopLoss() – OrderOpenPrice(), g_digits_708) < NormalizeDouble(ad_8 * gd_692, g_digits_708) || OrderStopLoss() == 0.0)) continue;
OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(OrderOpenPrice() + ad_8 * gd_692, g_digits_708), OrderTakeProfit(), 0, Blue);
return;
}
if (NormalizeDouble(OrderOpenPrice() – Ask, g_digits_708) >= NormalizeDouble(ad_0 * gd_692, g_digits_708)) {
if (NormalizeDouble(OrderOpenPrice() – OrderStopLoss(), g_digits_708) < NormalizeDouble(ad_8 * gd_692, g_digits_708) || OrderStopLoss() == 0.0) {
OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(OrderOpenPrice() – ad_8 * gd_692, g_digits_708), OrderTakeProfit(), 0, Red);
return;
}
}
}
}
}
}

void movetrailingstop(double ad_0, double ad_8) {
RefreshRates();
if (OrdersTotal() > 0) {
for (g_pos_424 = OrdersTotal(); g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {
if (OrderType() == OP_BUY) {
if (!(NormalizeDouble(Ask, g_digits_708) > NormalizeDouble(OrderOpenPrice() + ad_0 * gd_692, g_digits_708) && NormalizeDouble(OrderStopLoss(), g_digits_708) < NormalizeDouble(Bid – (ad_8 +
gd_364) * gd_692, g_digits_708))) continue;
OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(Bid – ad_8 * gd_692, g_digits_708), OrderTakeProfit(), 0, Blue);
return;
}
if (NormalizeDouble(Bid, g_digits_708) < NormalizeDouble(OrderOpenPrice() – ad_0 * gd_692, g_digits_708) && NormalizeDouble(OrderStopLoss(), g_digits_708) > NormalizeDouble(Ask +
(ad_8 + gd_364) * gd_692, g_digits_708) || OrderStopLoss() == 0.0) {
OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(Ask + ad_8 * gd_692, g_digits_708), OrderTakeProfit(), 0, Red);
return;
}
}
}
}
}

void createlstoploss(double ad_0) {
RefreshRates();
for (g_pos_424 = OrdersTotal(); g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {
if (OrderType() == OP_BUY) {
if (OrderStopLoss() == 0.0) {
OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(Ask – ad_0 * gd_692, g_digits_708), OrderTakeProfit(), 0, Red);
return;
}
}
}
}
}

void createsstoploss(double ad_0) {
RefreshRates();
for (g_pos_424 = OrdersTotal(); g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {
if (OrderType() == OP_SELL) {
if (OrderStopLoss() == 0.0) {
OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(Bid + ad_0 * gd_692, g_digits_708), OrderTakeProfit(), 0, Red);
return;
}
}
}
}
}

void createltakeprofit(double ad_0) {
RefreshRates();
for (g_pos_424 = OrdersTotal(); g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {
if (OrderType() == OP_BUY) {
if (OrderTakeProfit() == 0.0) {
OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), NormalizeDouble(Ask + ad_0 * gd_692, g_digits_708), 0, Red);
return;
}
}
}
}
}

void createstakeprofit(double ad_0) {
RefreshRates();
int l_ord_total_8 = OrdersTotal();
for (g_pos_424 = OrdersTotal(); g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {
if (OrderType() == OP_SELL) {
if (OrderTakeProfit() == 0.0) {
OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), NormalizeDouble(Bid – ad_0 * gd_692, g_digits_708), 0, Red);
return;
}
}
}
}
}

void delete(int a_cmd_0) {
if (OrdersTotal() > 0) {
for (g_pos_424 = OrdersTotal(); g_pos_424 >= 0; g_pos_424–) {
OrderSelect(g_pos_424, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == a_cmd_0) OrderDelete(OrderTicket());
}
}
}

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

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

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

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

相关资源

暂无评论

暂无评论...