欧元高胜率EA

欧元高胜率EA

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

47 人已下载 手机查看

欧元高胜率EA 欧元高胜率EA

/*
Generated by EX4-TO-MQ4 decompiler V4.0.220.2c []
Website: http://purebeam.biz
E-mail : purebeam@gmail.com
*/
#property copyright “| Last Updated: January-26 2009 | Copyright ?2009, www.forex-expert-advisor.com”
#property link “http://www.aizidong.com”

int gi_unused_76 = 0;
extern int MAGIC = 20082812;
extern int MAGIC2 = 20082813;
extern string Parameters_Trade = “欧元高胜率EA ===”;
extern bool Account_Mini = FALSE;
extern bool Account_Micro = FALSE;
extern bool Additional_Decimals = FALSE;
extern double Lots = 1.0;
extern int StopLoss = 33;
extern int TakeProfit = 8;
string gs_unused_124 = “=== Parameters of (BUY Signals): ===”;
int gi_132 = 2;
int gi_136 = 0;
int gi_140 = 3;
int gi_144 = 5;
extern int B1_IS_1 = 1;
extern int B1_IS_2 = 3;
extern int B1_IS_3 = 3;
extern int B1_SHC = 12;
extern int B1_CCI = 6;
extern int CCI_Day = -60;
extern double B1_dig1 = 0.006;
extern double B1_dig2 = 0.0;
int g_shift_188 = 0;
int gi_192 = 3;
int gi_196 = 0;
extern string SELL_Settings = “=== Parameters of (SELL Signals): ===”;
int gi_208 = 0;
int gi_212 = 5;
int gi_216 = 0;
int gi_220 = 4;
int gi_224 = 0;
extern int S1_IS_1 = 2;
extern int S1_IS_2 = 3;
extern int S1_IS_3 = 3;
extern int S1_SHC = 90;
extern int S1_CCI = 4;
extern int S1_ADX_1 = 16;
extern double S1_dig1 = 0.006;
extern double S1_dig2 = 0.0042;
int g_shift_268 = 0;
int gi_272 = 5;
int gi_276 = 0;
int gi_280 = 4;
int g_slippage_284 = 1;
extern string Parameters_Money_Management = “=== Parameters of Money Management ===”;
extern bool Use_Money_Management = FALSE;
extern double MaximumRisk = 0.1;
extern int MaxLots = 10;
extern double DecreaseFactor = 1.0;
bool gi_unused_320 = TRUE;
bool gi_unused_324 = FALSE;
bool gi_unused_328 = FALSE;
bool gi_unused_332 = TRUE;
int gi_unused_336 = 0;
int gi_unused_340 = 1;
extern string _Parameters_EAs_Management = “==== Parameters of EAs Management ===”;
extern bool Use_EAs_Management = FALSE;
extern int Quantity_EAs = 3;

int init() {
return (0);
}

int deinit() {
return (0);
}

double BUY() {
int l_timeframe_0 = gi_132;
if (gi_132 == 0) l_timeframe_0 = 5;
if (gi_132 == 1) l_timeframe_0 = 15;
if (gi_132 == 2) l_timeframe_0 = 30;
if (gi_132 == 3) l_timeframe_0 = 60;
if (gi_132 == 4) l_timeframe_0 = 240;
if (gi_132 == 5) l_timeframe_0 = 10080;
if (gi_132 == 6) l_timeframe_0 = 43200;
int l_timeframe_4 = gi_136;
if (gi_136 == 0) l_timeframe_4 = 5;
if (gi_136 == 1) l_timeframe_4 = 15;
if (gi_136 == 2) l_timeframe_4 = 30;
if (gi_136 == 3) l_timeframe_4 = 60;
if (gi_136 == 4) l_timeframe_4 = 240;
if (gi_136 == 5) l_timeframe_4 = 10080;
if (gi_136 == 6) l_timeframe_4 = 43200;
int l_timeframe_8 = gi_140;
if (gi_140 == 0) l_timeframe_8 = 5;
if (gi_140 == 1) l_timeframe_8 = 15;
if (gi_140 == 2) l_timeframe_8 = 30;
if (gi_140 == 3) l_timeframe_8 = 60;
if (gi_140 == 4) l_timeframe_8 = 240;
if (gi_140 == 5) l_timeframe_8 = 10080;
if (gi_140 == 6) l_timeframe_8 = 43200;
int l_timeframe_12 = gi_144;
if (gi_144 == 0) l_timeframe_12 = 5;
if (gi_144 == 1) l_timeframe_12 = 15;
if (gi_144 == 2) l_timeframe_12 = 30;
if (gi_144 == 3) l_timeframe_12 = 60;
if (gi_144 == 4) l_timeframe_12 = 240;
if (gi_144 == 5) l_timeframe_12 = 10080;
if (gi_144 == 6) l_timeframe_12 = 43200;
double l_istochastic_16 = iStochastic(NULL, l_timeframe_0, B1_IS_1, B1_IS_2, B1_IS_3, MODE_SMA, 0, MODE_MAIN, g_shift_188);
double l_icci_24 = iCCI(NULL, l_timeframe_4, B1_CCI, PRICE_CLOSE, gi_196);
if (iOpen(Symbol(), l_timeframe_8, 4) – iClose(Symbol(), l_timeframe_8, 0) <= B1_dig1 && iClose(NULL, l_timeframe_12, gi_192) <= Ask – B1_dig2 && l_istochastic_16 <= B1_SHC &&
l_icci_24 <= CCI_Day) return (1);
return (0.0);
}

double SELL() {
int l_timeframe_0 = gi_208;
if (gi_208 == 0) l_timeframe_0 = 5;
if (gi_208 == 1) l_timeframe_0 = 15;
if (gi_208 == 2) l_timeframe_0 = 30;
if (gi_208 == 3) l_timeframe_0 = 60;
if (gi_208 == 4) l_timeframe_0 = 240;
if (gi_208 == 5) l_timeframe_0 = 10080;
if (gi_208 == 6) l_timeframe_0 = 43200;
int l_timeframe_4 = gi_212;
if (gi_212 == 0) l_timeframe_4 = 5;
if (gi_212 == 1) l_timeframe_4 = 15;
if (gi_212 == 2) l_timeframe_4 = 30;
if (gi_212 == 3) l_timeframe_4 = 60;
if (gi_212 == 4) l_timeframe_4 = 240;
if (gi_212 == 5) l_timeframe_4 = 10080;
if (gi_212 == 6) l_timeframe_4 = 43200;
int l_timeframe_8 = gi_216;
if (gi_216 == 0) l_timeframe_8 = 5;
if (gi_216 == 1) l_timeframe_8 = 15;
if (gi_216 == 2) l_timeframe_8 = 30;
if (gi_216 == 3) l_timeframe_8 = 60;
if (gi_216 == 4) l_timeframe_8 = 240;
if (gi_216 == 5) l_timeframe_8 = 10080;
if (gi_216 == 6) l_timeframe_8 = 43200;
int l_timeframe_12 = gi_220;
if (gi_220 == 0) l_timeframe_12 = 5;
if (gi_220 == 1) l_timeframe_12 = 15;
if (gi_220 == 2) l_timeframe_12 = 30;
if (gi_220 == 3) l_timeframe_12 = 60;
if (gi_220 == 4) l_timeframe_12 = 240;
if (gi_220 == 5) l_timeframe_12 = 10080;
if (gi_220 == 6) l_timeframe_12 = 43200;
int li_unused_16 = gi_224;
if (gi_224 == 0) li_unused_16 = 5;
if (gi_224 == 1) li_unused_16 = 15;
if (gi_224 == 2) li_unused_16 = 30;
if (gi_224 == 3) li_unused_16 = 60;
if (gi_224 == 4) li_unused_16 = 240;
if (gi_224 == 5) li_unused_16 = 10080;
if (gi_224 == 6) li_unused_16 = 43200;
double l_istochastic_20 = iStochastic(NULL, l_timeframe_0, S1_IS_1, S1_IS_2, S1_IS_3, MODE_SMA, 0, MODE_MAIN, g_shift_268);
double l_iadx_28 = iADX(NULL, l_timeframe_4, S1_ADX_1, PRICE_CLOSE, MODE_PLUSDI, gi_272);
double l_iadx_36 = iADX(NULL, l_timeframe_4, S1_ADX_1, PRICE_CLOSE, MODE_MINUSDI, gi_276);
double l_icci_44 = iCCI(NULL, l_timeframe_8, S1_CCI, PRICE_CLOSE, gi_280);
if (iOpen(Symbol(), l_timeframe_12, 3) – iClose(Symbol(), l_timeframe_12, 0) >= S1_dig1 && l_istochastic_20 >= S1_SHC && l_iadx_28 < l_iadx_36 && l_icci_44 >= 30.0) return (1);
return (0.0);
}

void OpenBuyOrder() {
int li_0 = 1;
if (Additional_Decimals == TRUE) li_0 = 10 * li_0;
double l_price_4 = 0;
double l_price_12 = 0;
l_price_4 = 0;
if (!openPositions()) {
if (StopLoss > 0) l_price_4 = Ask – StopLoss * Point * li_0;
l_price_12 = 0;
if (TakeProfit > 0) l_price_12 = Ask + TakeProfit * Point * li_0;
OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, g_slippage_284, l_price_4, l_price_12, “”, MAGIC, 0, Green);
prtAlert(“EA_High-Profits_EUR-USD : OpenBuy for ” + DoubleToStr(Ask, 4));
}
}

void OpenSellOrder() {
int li_0 = 1;
if (Additional_Decimals == TRUE) li_0 = 10 * li_0;
double l_price_4 = 0;
double l_price_12 = 0;
l_price_4 = 0;
if (!openPositions2()) {
if (StopLoss > 0) l_price_4 = Bid + StopLoss * Point * li_0;
l_price_12 = 0;
if (TakeProfit > 0) l_price_12 = Bid – TakeProfit * Point * li_0;
OrderSend(Symbol(), OP_SELL, LotsOptimized2(), Bid, g_slippage_284, l_price_4, l_price_12, “”, MAGIC2, 0, Red);
prtAlert(“EA_High-Profits_EUR-USD : OpenSell for ” + DoubleToStr(Bid, 4));
}
}

void prtAlert(string as_0 = “”) {
Print(Symbol() + ” – ” + as_0);
Alert(Symbol() + ” – ” + as_0);
}

bool openPositions() {
int l_count_0 = 0;
for (int l_pos_4 = OrdersTotal() – 1; l_pos_4 >= 0; l_pos_4–) {
OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES);
if (OrderMagicNumber() == MAGIC) {
if (OrderSymbol() == Symbol())
if (OrderType() == OP_BUY) l_count_0++;
}
}
return (l_count_0);
}

bool openPositions2() {
int l_count_0 = 0;
for (int l_pos_4 = OrdersTotal() – 1; l_pos_4 >= 0; l_pos_4–) {
OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES);
if (OrderMagicNumber() == MAGIC2) {
if (OrderSymbol() == Symbol())
if (OrderType() == OP_SELL) l_count_0++;
}
}
return (l_count_0);
}

int start() {
if (Symbol() != “EURUSD” && Symbol() != “EURUSDm”) return;

if (AccountFreeMargin() < 1000.0 * LotsOptimized())
if (AccountFreeMargin() < 1000.0 * LotsOptimized2()) return (0);
if (BUY() == 1.0) OpenBuyOrder();
if (SELL() == 1.0) OpenSellOrder();
return (0);
}

double LotsOptimized() {
double ld_ret_0 = Lots;
int l_hist_total_8 = OrdersHistoryTotal();
int l_count_12 = 0;
ld_ret_0 = NormalizeDouble(AccountFreeMargin() * MaximumRisk / 1000.0, 1);
if (Use_EAs_Management == TRUE) ld_ret_0 = NormalizeDouble(AccountBalance() / Quantity_EAs * MaximumRisk / 1000.0, 1);
if (Use_EAs_Management == TRUE && Account_Mini == TRUE) ld_ret_0 = 10.0 * NormalizeDouble(AccountBalance() / Quantity_EAs * MaximumRisk / 1000.0, 1);
if (Use_EAs_Management == TRUE && Account_Micro == TRUE) ld_ret_0 = 100.0 * NormalizeDouble(AccountBalance() / Quantity_EAs * MaximumRisk / 1000.0, 1);
if (DecreaseFactor > 0.0) {
for (int l_pos_16 = l_hist_total_8 – 1; l_pos_16 >= 0; l_pos_16–) {
if (OrderSelect(l_pos_16, SELECT_BY_POS, MODE_HISTORY) == FALSE) {
Print(“Error in history!”);
break;
}
if (OrderSymbol() != Symbol() || OrderType() > OP_SELL || OrderMagicNumber() != MAGIC) continue;
if (OrderProfit() > 0.0) break;
if (OrderProfit() < 0.0 && OrderMagicNumber() == MAGIC) l_count_12++;
}
if (l_count_12 > 2) ld_ret_0 = NormalizeDouble(ld_ret_0 – ld_ret_0 * l_count_12 / DecreaseFactor, 1);
}
if (ld_ret_0 < 0.1) ld_ret_0 = 0.1;
if (Use_Money_Management == FALSE) ld_ret_0 = Lots;
if (ld_ret_0 > MaxLots) ld_ret_0 = MaxLots;
return (ld_ret_0);
}

double LotsOptimized2() {
double ld_ret_0 = Lots;
int l_hist_total_8 = OrdersHistoryTotal();
int l_count_12 = 0;
ld_ret_0 = NormalizeDouble(AccountFreeMargin() * MaximumRisk / 1000.0, 1);
if (Use_EAs_Management == TRUE) ld_ret_0 = NormalizeDouble(AccountBalance() / Quantity_EAs * MaximumRisk / 1000.0, 1);
if (Use_EAs_Management == TRUE && Account_Mini == TRUE) ld_ret_0 = 10.0 * NormalizeDouble(AccountBalance() / Quantity_EAs * MaximumRisk / 1000.0, 1);
if (Use_EAs_Management == TRUE && Account_Micro == TRUE) ld_ret_0 = 100.0 * NormalizeDouble(AccountBalance() / Quantity_EAs * MaximumRisk / 1000.0, 1);
if (DecreaseFactor > 0.0) {
for (int l_pos_16 = l_hist_total_8 – 1; l_pos_16 >= 0; l_pos_16–) {
if (OrderSelect(l_pos_16, SELECT_BY_POS, MODE_HISTORY) == FALSE) {
Print(“Error in history!”);
break;
}
if (OrderSymbol() != Symbol() || OrderType() > OP_SELL || OrderMagicNumber() != MAGIC2) continue;
if (OrderProfit() > 0.0) break;
if (OrderProfit() < 0.0 && OrderMagicNumber() == MAGIC2) l_count_12++;
}
if (l_count_12 > 2) ld_ret_0 = NormalizeDouble(ld_ret_0 – ld_ret_0 * l_count_12 / DecreaseFactor, 1);
}
if (ld_ret_0 < 0.1) ld_ret_0 = 0.1;
if (Use_Money_Management == FALSE) ld_ret_0 = Lots;
if (ld_ret_0 > MaxLots) ld_ret_0 = MaxLots;
return (ld_ret_0);
}

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

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

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

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

相关资源

暂无评论

暂无评论...