Bug in a Sell pending order with OCO yes
-
When I place a Sell pending order with OCO on value "yes",
in backtesting this block place two pending orders as follows:
- The Sell stop order itself (at market price)
- At the same time another strange Buy stop at a different price with a stop loss and take profit with strange values
If I deactivate the OCO order then the error disapear
Chek this simple project to see the bug in action and backtest it in mt4 (my backtest are conduct in EURUSD M5 timeframe):
-
This is the idea. The second order is like in a mirror. Then, when one of them is trigerred/deleted, the other is automatically deleted.
-
But... in the same logic the buy pending order with OCO on "yes" must work in the same way, creating another order mirror, but it doesn't.
And why the "mirror" order put those so rare levels of stop loss and take profit ?
I do not understand the logics behind
-
There was a problem when no stops are used. I fixed this problem.