barstate
Properties
isconfirmed
Type: series bool
Returns true if the script is calculating the last (closing) update of the current bar.
The next script calculation will be on the new bar data.
isfirst
Type: series bool
Returns true if current bar is first bar in barset.
ishistory
Type: series bool
Returns true if current bar is a historical bar.
islast
Type: series bool
Returns true if current bar is the last bar in barset, false otherwise.
This condition is true for all real-time bars in barset.
islastconfirmedhistory
Type: series bool
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.
isnew
Type: series bool
Returns true if script is currently calculating on new bar.
This variable is true when calculating on historical bars or on first update of a newly generated real-time bar.
isrealtime
Type: series bool
Returns true if the script is calculating on a real-time bar.