When fills occur

Users sometimes ask us questions that boil down to this: “Why is it that when I get a signal I get a fill on the open of the next bar; why can’t I get out on the same bar the signal came from?” The answer is that your models “fire” (i.e. your entry or exit condition is tested) and signals are thus generated (if the condition is true) when a bar is complete. For daily bars, bars aren’t complete until the end of the day. Minute bars are complete at the end of every minute. Therefore the next time you could possibly get a fill with your broker is on the open of the next bar, so that is when we show it. The only way we could avoid this scheme would be to fire your model at the end of every tick (i.e., tick bars), but today’s computers could never keep up with complex models firing several times a second.

We often see articles which state something like “If the close is 3 points above the open, then get out at the close. Sorry, but that is impossible with daily bars. It is like calling your broker after the close and telling him you want the price you saw before the market closed. (Actually we seem to remember a recent mutual fund scandal where big clients were getting that done for them, but we think that loophold is closed now!) Some trading software may even allow you to backtest that way, but such a backtest would be unrealistic unless you are daytrading. Of course using NeuroShell DayTrader Pro you could say if the 3:58 minute bar is 3 points above the open, then get out on the 3:59 bar.

If your entry is a market order, and your exit is a stop/limit order, then if your entry condition is true, then the exit condition will also be tested at the same time. If the exit condition is true, then the exit will be fired at the same time your entry market order was fired. The result is that your limit or stop order might be filled on the same bar as your entry order filled (i.e. the entry order fills on the open, but the limit/stop order fills if/when the price reaches your target price on the same bar). This can only occur, however, if the exit CONDITION is true at the same time the entry condition is true, because all orders fill on the bar after the condition is true.

The condition where it is not possible to fill on the same bar as your entry order is filled is when you are calculating your limit/stop price target using circular indicators that rely on your entry price to calculate the price target. In that case, it is not possible to calculate a price target before you know what the entry price is and therefore these price target indicators return an N/A on the bar the entry fires and won’t produce a valid target price until the close of the bar on which the entry filled.

However, if you are using a price target that does not rely on the entry price (say for instance 51.4, or Min(Low,5), or MovAvg(Close,10), etc.), then you CAN have a limit/stop order placed at the same time as a Market entry order and potentially fill on the SAME bar as a market order entry filled as long as the price target is reached on that bar.

Was this article helpful?

Related Articles