Skip to content
Algo Trade Analytics Docs

barstate.islastconfirmedhistory - Pine Script Variable

Returns true if script is executing on the dataset’s last bar when market is closed, or script is executing on the bar immediately preceding the real-time bar, if market is open. Returns false otherwise.

bool

series

  • Pine Script® code that uses this variable could calculate differently on history and real-time data.