MT5 backtesting results | add commissions and swap

 

Dear Metaquotes,

Kindly add commssions and swaps to the backtesting results. 

The current backtest results are very misleading as do not show especially cost of swaps and also commissions.

Example. The EA below looks profitable , but when i add in commssions and swaps , its a dud.



 

You can set a commission here in the tester settings:

The swap is problematic - I guess because it is not constant but is varied by the broker due to the changing interest rates of the single currencies of a pair. You can e.g. subtract a fixed amount per lot of each closed position or increase the commission a bit more?

 
Carl Schreiber #:

You can set a commission here in the tester settings:

The swap is problematic - I guess because it is not constant but is varied by the broker due to the changing interest rates of the single currencies of a pair. You can e.g. subtract a fixed amount per lot of each closed position or increase the commission a bit more?


Thank you so much for your help. 

 

Articles

Market math: profit, loss and costs

Evgeniy Ilin, 2022.10.21 11:43

In this article, I will show you how to calculate the total profit or loss of any trade, including commission and swap. I will provide the most accurate mathematical model and use it to write the code and compare it with the standard. Besides, I will also try to get on the inside of the main MQL5 function to calculate profit and get to the bottom of all the necessary values from the specification.
 
Vinicius Pereira De Oliveira #:

Wow. Very deep and what i needed.

Thank you Vinicius.