The rightmost bar on a live chart is not a bar yet. It is a running total that will become a bar when its interval ends. Every value drawn on it, from its close to any indicator that reads that close, is provisional. Most of the surprises people report about indicators come from forgetting that, so it is worth walking through what a bar is made of.
How a bar is built
The platform receives trades one at a time. For a one-minute bar it opens a bucket at the minute boundary, records the first trade as the open, raises the high and lowers the low as trades arrive, adds volume, and keeps the latest trade as the close. When the next minute boundary passes, the bucket is sealed and a new one opens. Until it is sealed, the close is simply the last print, and it changes with every trade.
Tick, volume and range bars close on a count rather than a clock, and the same rule holds: the bar is finished when its condition is met, not before.
What that does to an indicator
An indicator is a formula over bar values. Read it on the unfinished bar and it is a formula over a value that has not settled. A moving average that crosses on the live bar can uncross two seconds later without anything being wrong; the input moved. NinjaTrader 8 makes the choice explicit with the Calculate setting: on bar close, on price change, or on each tick. The first waits for the seal. The other two recompute on the running total and will show you signals that may not survive the bar.
Why history looks cleaner than it was
Historical bars arrive already sealed. When a chart loads, the platform builds every past bar from its final open, high, low, close and volume, and an indicator computed over them sees only finished values. The intrabar path, the order in which the high and the low were made, is not there unless the platform is told to replay the ticks. That is why a strategy can look flawless on history and hesitant live: history never showed it an unfinished bar.
What to actually do with it
- Decide, per indicator, whether it is read on the close or during the bar, and keep the backtest on the same setting.
- Treat any value on the rightmost bar as a work in progress until the bar seals.
- When a test needs the path inside the bar, use tick data or a tick replay, and say so in the results.