Why different mDD numbers?

 

Dear Expert,

Would you please advise?

Why for the same live account, the mDD on the Trade page is -154.89 while on the statement it says mDD is 15.90 (Please see above image)? 

Thank you for your teaching.

Best,

EAgreat 

 
Thats because the MaximumDD considers the Closed Trades Also. Not just the Opened Trades. Link1. Link2.
 
ubzen:
Thats because the MaximumDD considers the Closed Trades Also. Not just the Opened Trades. Link1. Link2.


Thank you very much, ubzen, for your teaching.

If I want to use margin+mDD to determine the minimum balance needed, I should use the $154.89 and not the $15.90 in my example, right?

If so, all strategy tests only give the $15.90, how do I get the $154.89 when I test an EA?

Many thanks for your advice.

EAgreat 

 

minimum balance needed... for what?

If so, all strategy tests only give the $15.90, how do I get the $154.89 when I test an EA?

If the image on the left is the Active-Trades then what you're looking for is Maximum-Floating-Losses in Account Currency. Easiest way is to save the highest -Value seen during test. Like Below, Not Compiled, Not Tested. Recommend saving Global Scope Variables [like this one] to File for Live Experts.

extern int Magic=7;
double Max_FloatLoss$;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void start(){
    Print("Max_FloatLoss="+Max_FloatLoss());
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void Max_FloatLoss(){
    double Profit_All=Profit_All_Active();
    if(Profit_All>0){return;}
    if(Profit_All<Max_FloatLoss$){
        Max_FloatLoss$=Profit_All;
    }
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
double Profit_All_Active(){
    double Profit; for(int i=OrdersTotal()-1; i>=0; i--){
        if(!OrderSelect(i,SELECT_BY_POS)){continue;}
        if(OrderMagicNumber()!=Magic){continue;}
        Profit+=OrderProfit()+OrderCommission()+OrderSwap();
}return(Profit);}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reason: