Profit after commission when backtesting strategy ECN broker

 
Hello, it looks there is no possibility in optimisation results to see the net profit of each strategy after commission are applied by the broker (unless opening the report in excel to sum total commission). It'd be great
 
nobody interested, worthless ?
 
Florew: nobody interested, worthless ?
Sounds like a good idea.
 

Florew, 

Did you find a way to include commission into your backtesting? I am not sure if there is way to do that in mql5.  

 

Florew, I created a workaround to do this in my EAs, using TesterWithdrawal() after the trade execution, to emulate a commission value.

... OrderSend(...) ...
...
// commission emulation
TesterWithdrawal(commission);

Simple as that, and works fine, as you don't need Excel to figure out and will have a more realistic backtesting.

Also, you can check the total Withdrawal (or total Commission) at Strategy Tester results tab.

 
How can we get the value of "commission" in program ?
 
Documentation on MQL5: Standard Library / Trade Classes / CPositionInfo / Commission
Documentation on MQL5: Standard Library / Trade Classes / CPositionInfo / Commission
  • www.mql5.com
Standard Library / Trade Classes / CPositionInfo / Commission - Documentation on MQL5