Swap calculation in tester.

 

Hello, in spite of myself, I decided to convert a new expert advisor that I wrote in mq4 on the mq5 language.

There is a big issue in MT5 tester I've found seeing backtest.

The swap cost are applied  at a fixed value that is not related to the size of the order:

Here two lines of two backtests executed at 0.01 size and 1.0 lot size : 

2010.04.07 02:0032EURUSDbuyin0.011.33835320.000.000.00100 153.43MM*12721*5306
2010.04.09 15:4633EURUSDsellout0.011.34366330.00-4.805.31100 153.94tp 1.34366

 

2010.04.07 02:0032EURUSDbuyin1.001.33835320.000.000.00102 380.40MM*12721*5306
2010.04.09 15:4633EURUSDsellout1.001.34366330.00-4.80531.00102 906.60tp 1.34366

 

The swap column, that is the nearest to the profit column, indicates that the tester apply the full swap cost to the 0.01 lots orders.

The account is an Alpari demo that shows  swaps costs of -1.2$ for long and -1.0$ for short.

I've searched but it don't seems that this issue was noted before.

 

The absence of any comment to this thread clearly show how is the MQL5 world.

;) 

Reason: