I am trying to find a way around an issue I have with back testing vs. live trading.
If I am short and get a long signal, I want to exit at the market. Because I am using Unmanaged orders, I just change the profit order to a price well above the market and it effectively becomes a market order.
While this is true in live trading; I noticed in back testing, I am actually getting a fill at the limit price (almost 20 ticks above the market) which is above even the high of the bar.
I move my profit target from 1.4120 (6E) to 1.4164 and I get an execution at 1.4164 even though the high of that bar is 1.4148. In live trading I would get a fill at the close of the signal bar plus a tick or so; this constitues almost 20 ticks slippage.
I am looking for the following answers a) do I have a setting or something basic set wrong that could cause this b) is there a simple way around this?
I have already thought of lots of ways around the issue but they all involve changing code that works in live trading to accomodate a back test.
Any suggestions will be appreciated.
Best Regards,
Scott

Comment