I am looking to place a trade that is one tick above/below the high/low of the closing candle. That is, on IsFirstTickOfBar = true and verifying my trade setup is valid, I want to put in a trade that is one tick outside the high or low of the just closed candle.
Here's an example of the scenario for a short trade (or it might be attached):
I was using a Stop Order since it was likely that the desired entry price was not hit. However, an error was generated when the price was already below the stop price. So, I tried a Short Market-if-Touched order. I'm thinking that the MIT order would work either way and it would just be entered whenever last price is the desired entry price, regardless of the direction of price movement. However, instead of getting that behavior, the MIT order acted like a limit order when price was above the desired entry price and the order was executed immediately.
Given price volatility, I don't think checking if the price is above or below and placing the appropriate order will work. By the time my machine analyzes and submits an order the reverse trade might be necessary and an error will result.
NOTE: I am using Market Replay for this testing.
So, is there a trade type that will work in this scenario?
Obviously, I could monitor price and submit a market order but that will require more coding (not a big issue) but also introduce the likelihood of more slippage.
Thank you!
Matt

Comment