EA_Pending_Order

EA_Pending_Order

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

34 人已下载 手机查看

EA_Pending_OrderEA_Pending_Order
Strategy Tester Report
EA_Pending_Order
MetaQuotes-Demo (Build 1361)

 

交易品种EURUSD (Euro vs US Dollar)
时间周期15 分钟图 2020.01.01 22:00 – 2020.09.06 23:45 (2020.01.01 – 2020.09.07)
复盘模型每个即时价格(基于所有可利用的最小时段的每一个价格的分形插值计算)
参数Name_EA=”PendingOrder”; Start_Hour=6; End_Hour=20; TP=20; SL=100; Lots=0.01; Distance=15; Magic=69;
经测试过的柱数17538用于复盘的即时价数量464718复盘模型的质量90.00%
输入图表错误0
起始资金10000.00点差3
总净盈利-68.07总获利131.99总亏损-200.06
盈利比0.66预期盈利-0.08
绝对亏损68.95最大亏损70.61 (0.71%)相对亏损0.71% (70.61)
交易单总计860卖单 (%获利百分比)430 (74.19%)买单 (%获利百分比)430 (79.30%)
盈利交易(%占总百分比)660 (76.74%)亏损交易(%占总百分比)200 (23.26%)
最大:获利交易0.21亏损交易-1.03
平均获利交易0.20亏损交易-1.00
最大:连续获利金额15 (3.00)连续亏损金额3 (-3.00)
最多:连续获利次数3.00 (15)连续亏损次数-3.00 (3)
平均:连续获利4连续亏损1

 

//+——————————————————————+
//| EA Pending Order.mq4 |
//| Copyright 2016, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+——————————————————————+
#property copyright “Copyright 2016, WidiPramana.”
#property link “https://www.mql5.com”
#property version “1.00”
#property strict

extern string Name_EA = “PendingOrder”;
extern int Start_Hour = 6;
extern int End_Hour = 20;
extern int TP = 20;
extern int SL = 100;
extern double Lots = 0.01;
extern int Distance = 15;
extern int Magic = 69;

double slb,tpb,sls,tps,pt;
int res,wt,wk,tiket,ticet;
//+——————————————————————+
//| expert initialization function |
//+——————————————————————+
int init()
{
//—-
if(Digits==3 || Digits==5) pt=10*Point; else pt=Point;
//—-
return(0);
}
//+——————————————————————+
//| expert deinitialization function |
//+——————————————————————+
int deinit()
{
//—-

//—-
return(0);
}
//+——————————————————————+
//| expert start function |
//+——————————————————————+
int start()
{
label();

if(Hour_trade()==1){
if(totalorder(2)==0){res=OrderSend(Symbol(), OP_BUYLIMIT,NR(Lots), Ask-Distance*Point, 3, Ask-Distance*Point-SL*Point,Ask-Distance*Point+TP*Point, “”, Magic, 0, Blue);}
if(totalorder(3)==0){res=OrderSend(Symbol(), OP_SELLLIMIT,NR(Lots) , Bid+Distance*Point, 3, Bid+Distance*Point+SL*Point,Bid+Distance*Point-TP*Point, “”, Magic, 0, Red);}
if(totalorder(4)==0){res=OrderSend(Symbol(), OP_BUYSTOP,NR(Lots) , Ask+Distance*Point, 3, Ask+Distance*Point-SL*Point,Ask+Distance*Point+TP*Point, “”, Magic, 0, Blue);}
if(totalorder(5)==0){res=OrderSend(Symbol(), OP_SELLSTOP,NR(Lots) , Bid-Distance*Point, 3, Bid-Distance*Point+SL*Point,Bid-Distance*Point-TP*Point, “”, Magic, 0, Red);}
}
return(0);
}
//+——————————————————————+

int Hour_trade()
{
bool trade = false;
if(Start_Hour > End_Hour){
if (Hour() >= Start_Hour || Hour() < End_Hour) trade = true;
} else
if (Hour() >= Start_Hour && Hour() < End_Hour) trade = true;

return (trade);
}

int totalorder( int tipe)
{
int total=0;
for(int i=0; i<OrdersTotal(); i++)
{
if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) continue;
if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=Magic || OrderType()!=tipe) continue;
total++;
}

return(total);
}
double NR(double thelot)
{
double maxlots = MarketInfo(Symbol(), MODE_MAXLOT),
minilot = MarketInfo(Symbol(), MODE_MINLOT),
lstep = MarketInfo(Symbol(), MODE_LOTSTEP);
double lots = lstep * NormalizeDouble(thelot / lstep, 0);
lots = MathMax(MathMin(maxlots, lots), minilot);
return (lots);
}

void label()
{
Comment(“\n “,
“\n “,
“\n ————————————————“,
“\n :: Pending+Order”,
“\n ————————————————“,
“\n :: Spread : “, MarketInfo(Symbol(), MODE_SPREAD),
“\n :: Leverage : 1 : “, AccountLeverage(),
“\n :: Equity : “, AccountEquity(),
“\n :: Hour Server :”, Hour(), “:”, Minute(),
“\n ————————————————“);
}

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

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

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

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

相关资源

暂无评论

暂无评论...