both buy and sell orders executed on same bar
J T last edited by
I like some advice from more experienced guys. Trying to see how to avoid this.
Testing a breakout strategy.
at min 10, I place a stop order to buy at 2.00, place a stoploss at A
at min 15 I place a stop order to sell at 1.50, place a stoploss at B
at min 17, both stop orders got triggered on the same bar (when the price movement is this big) and they close out the position.
Earlier, I experienced both orders triggered, but on different bar. I am able to
add code in if order.status in [order completed], if I have gone into 1 position, I just cancel the other pending. But happening on the same bar left me scratching my head.
Any ideas or suggestions to workaround this?
ab_trader last edited by
buy orders - are they both executed or only one of them executed?