Skip to content
Algo Trade Analytics Docs

barstate.isnew - Pine Script Variable

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.

bool

series

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