Including Swap costs in MT5 Testing

 

Hello everybody, 


I am having the problem of calculating if my strategy is profitable or not since some of the positions are long term, and when I do the testing it shows me 0 swap costs, does anybody know how to solve this?

 
Juan Felipe RicoHello everybody, I am having the problem of calculating if my strategy is profitable or not since some of the positions are long term, and when I do the testing it shows me 0 swap costs, does anybody know how to solve this?

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.

This website uses cookies. Learn more about our Cookies Policy.