Hi guys,
I’ve been backtesting several codes in metatrader 5 and it seems that the takeprofit and the stoploss are not being executed. Here’s a sample screenshot from one of my backtests:
Also, there are several people that are experiencing the same problem on another thread in the mql5 forum.
I’m not sure how to backtest properly with this problem still unsolved.
There’s no answer up to now in the MQL5 forum so I was hoping that there’s somebody here that could help us with this problem. Appreciate your help for taking the time to read this and thanks in advance!
As you can see above, the spread between the equity curve and the balance curve is getting bigger since the trades are not being closed off. This is also similar to several of the codes that I backtested.
While I don’t know the answer to your question, I read recently that MT5 merged positions unlike MT4, so that before you could open 2, open 1 of the same position and have two separate entries. After the conversion to 5, this would be changed to 1 position of size 3 when the second order is placed. Is it possible that you are not closing the right position?