I’m having a strange anomaly with the Strategy Tester.
I have coded a very simple EA that places Buy and Sell stops with SL and TP values. The Volume is calculated to use the difference between the Buy and SL in order to limit the risk to -1% of the account balance as per popular recommendations (excluding Commission for now).
The EA seems to work as coded, and the Buy/SL/TP values look fine when manually checked, however when run through the Strategy Tester I get strange values in the Profit column on the History tab (image snips attached).
My calculations are as follows:
The SL is 28597 and the Price is 30200 which gives us a difference of 1603. Over a volume of 62 shares that is a risk of 99386 or 993.86 in local currency which is just less than the balance in local currency set at the start of the testing.
With this in mind I expect the maximum local currency risk to be a little more than 1000 because of commission (Unless there’s a massive market shift of course) and on the live markets this is what happens.
When the SL is hit during testing however it shows a Profit of -2981.58 which is well more than 2x the expected amount. After the transaction commission I come to an expected total of -1103.22.
Does anyone have an idea where the discrepancy comes from or what I’m missing?
Capture2.JPG 35 KB
Capture3.JPG 84 KB