I'm trying to write a strategy that places a buy stop market order a tick above the close of a bar after it closes. The problem with that is that sometimes that bar will close at the high of the bar when the buy stop market order is placed or the market will be moving quickly, thus resulting in the "Buy stop or buy stop limit orders can't be placed below the market" error.
Is there a way to catch/handle this error within my code so that when this happens the strategy dismisses the error and then enters long at market instead?
Thanks in advance for any help!
Fiddich
Comment