![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I think I can venture a guess on the sell-on-sell anomaly; this probably is an effect of the simulation being an "open prices only" variant. It seems like the tester deals with open trades first, before invoking the EA for a bar. If a trade (e.g. 27) runs into its s/l on the bar, then the tester closes that trade, but ascribes the next hour as closing time. Thereafter it invokes the EA for the bar, which in this case opens trade 28 (because when the EA is invoked, the trade is already closed).
Something like that. You may note that on the sell-on-sell occasions the first sell is always closed the hour after the second sell is opened, which is what my story above, if correct, would explain. It seemed to fit all the occasions I glanced at.
The other problem escapes me, but although I could find several sell-while-open-buy, I couldn't find any buy-while-open-sell. Perhaps the swap event plays a role here(?); the period from opening buy (12:00) to opening sell (8:00 the next day) includes a swap occasion, whereas the sell-to-buy period does not. Maybe you should exchange their logics, to buy at 8:00 and sell at 12:00, just to test this theory?