including commission costs in tester & optimiser

 

Hi, I can't find a possibility to add commission costs in the strategy tester.

Is this possible, if not, can't this be added to the strategy tester; I'm very sure that all developers would like to have this.


Thx;


danny

 

Commissions and swap don't show up in the tester reports, but for balance calculation you can usually expect them being accounted for, based on the information that you see in the detailed symbol description.

commissions

Just make a test trade with the strategy tester and calculate how much your balance should have changed based on entry/exit prices (with correct usage of bid and ask) and lot size. If the account that you are logged in with is a commission based model, you will probably see that there is a small difference to the expected value, which is the commission. If you can also get those values from the deal history with HistoryDealGetDouble(ticket, DEAL_COMMISSION) and HistoryDealGetDouble(ticket,DEAL_SWAP) for specific deal tickets (and of course you can log them and sum them up to the total commission).

Edit: Here is an example created with the tester that shows that this actually works (see commissions info in the numerical result statistics field on top):

commissions2


If you want to experiment how different commisions change the results, you can also create custom symbols and change the value there.

I agree that it is annoying that we don't see the cumulative commissions in the final test results, but I can imagine that this is also a political question and brokers might have a saying in this, too. Of course, this is pure speculation(!), but brokers are important Metaquotes customers and they will probably prefer us being less aware of the actual impact of commissions (just as we also don't see how much the cumulative impact of the spread has been for all trades in the test).

Reason: