barstate.isnew - Pine Script Variable
barstate.isnew
Section titled “barstate.isnew”Overview
Section titled “Overview”Returns true if script is currently calculating on new bar, false otherwise. This variable is true when calculating on historical bars or on first update of a newly generated real-time bar.
boolQualifier
Section titled “Qualifier”series
Remarks
Section titled “Remarks”- Pine Script® code that uses this variable could calculate differently on history and real-time data.