Lipi Reference Lipi

Variables

barstate.islastconfirmedhistory

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

Example


          indicator("BarState.islastconfirmedhistory Example", overlay=true)

// Check if the current bar is the last confirmed historical bar
is_last_confirmed = barstate.islastconfirmedhistory
// Highlight the last confirmed historical bar
plotshape(is_last_confirmed, location=location.abovebar, style=shape.triangleup, color=color.blue, size=size.small)
        

Type

series bool