Confused about how MT4 calculates Profit.

 
I ran the strategy tester on an EA I'm trying to write and debug and upon looking at the "Results" table to see info about each trade, I found discrepancies between what was reported as "Profit/Balance" and how I thought it should be.

In the attached image, you can see trades 2 to 26. Column D (Price Yellow) shows the opening price and Column J (Price Yellow) shows the close price.

What I don't understand is why is the Profit column NOT equal to the difference between the opening and closing prices? Column M, shows the calculated differences between the 2 prices and (I thought) should match up to the Profit/Loss but it doesn't. The lot size was the same (1) for all trades also. What's curious is that the results are as expected in trades 21 to 26 but all the others are off.

Am I missing something here or what?



 
If the trades were open during the time swap charges are added, that could possibly account for the difference
 
GumRai:
If the trades were open during the time swap charges are added, that could possibly account for the difference

This was run in strategy tester and no swaps or commissions involved.
 

Swaps are modelled in strategy tester.

 
SDC:

Swaps are modelled in strategy tester.


Thank you - I didn't know that. I assumed they were always zero - I saw that mentioned on this site somewhere. Are these figures shown in tester anywhere so they can be examined and taken into consideration - I don't see anything in Journal or any other tab that shows that these amounts have been included in the results.
Reason: