What barstate.isconfirmed does
Indicators normally recalculate on realtime price or volume updates. A crossover can appear before the close and disappear before confirmation. The flag lets you publish only the closing decision. It does not freeze the underlying moving average while the bar is open.
- The table describes the ordinary indicator update sequence. Strategies use their own calculation settings.
- Waiting for confirmation delays an intrabar decision until the close; it does not inherently add a whole bar of delay.
- Do not put barstate.isconfirmed inside request.security() to confirm the requested timeframe. TradingView documents that this usage does not work.
| Indicator execution | ishistory | isrealtime | isnew | isconfirmed |
|---|---|---|---|---|
| Historical bar | true | false | true | true |
| Realtime opening update | false | true | true | false |
| Realtime intermediate update | false | true | false | false |
| Realtime closing update | false | true | false | true |