barstate.isconfirmed
barstate.isconfirmed is a Pine Script built-in that is true on all historical bars and on the closing update of the realtime bar, and false while a realtime bar is still forming.
What barstate.isconfirmed means
barstate.isconfirmed returns true on every historical bar, and on the final tick of the bar that is currently forming. It returns false at every other moment during a live bar. In plain terms: it answers the question “is this bar finished?”
It is one of a family of barstate.* variables in Pine Script v5 and v6. The others describe position in the series rather than completion — barstate.islast (the most recent bar on the chart), barstate.isrealtime (a bar being built from live ticks), barstate.ishistory (any bar that closed before the script loaded), barstate.isfirst and barstate.isnew.
How it behaves in each context
| Context | Value | What it means |
|---|---|---|
| Historical bars | true | Every bar loaded before the script started is already closed |
| Live bar, mid-formation | false | The bar can still change — any condition read here may be false by the close |
| Live bar, closing tick | true | The one moment a live bar is final |
Why it matters on a funded account
Gating a condition on it means the script evaluates only finished candles, so a condition that was true at the close stays true in history. The cost is one bar of delay: the entry becomes available at the close of the signal bar rather than during it, and a correct backtest carries the same delay.
It fixes intrabar repainting only. Higher-timeframe lookahead and back-adjusted series repaint on fully confirmed bars too and need their own fixes. Combining it with calc_on_every_tick reintroduces intrabar evaluation elsewhere, and an alert set to fire once per bar rather than once per bar close can still trigger intrabar regardless of the code.
Read next
Part of the Puravida Edge prop trading glossary. Firm-specific figures verified September 2026; rules change frequently — confirm on the firm's site.
10 strategies, 15 portfolios, one PDF.
Every result on this site, modeled and live separately, with the preset for each account tier. One PDF, then our letters with what the systems did.
By email, from Puerto Viejo, Costa Rica. Unsubscribe anytime.