如何更精准统计货币对最大浮亏
By
小熊
at 2018-03-13 • 0人收藏 • 1534人看过
如何更精准统计货币对最大浮亏
//********************当前货币对最大浮亏*****************************
double Maxforkui()
{
//double Maxforkui=0;
double AllProfit=0;
for (int i =OrdersTotal() - 1 ; i >= 0; i--)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol())
{
AllProfit=AllProfit+OrderProfit();
}
}
if (AllProfit<0 && AllProfit < Maxforkui) Maxforkui=AllProfit;
return(Maxforkui);
}
我用此方法为什么会不准,有没更好的方法
4 个回复 | 最后更新于 2018-03-13
登录后方可回帖
//*****************账户最大回撤*********************************************
double DrawDown()
{
double DD=AccountBalance()-AccountEquity();
if(DD>DDBuffer)DDBuffer=DD;
return(DDBuffer);
}
账户回撤是准的,但多货币对交易时,想分开统计