Lipi Reference Lipi

Variables

barstate.ishistory

Returns true if current bar is a historical bar, false otherwise.

Example


          indicator(title="barstate.ishistory Example", overlay=true)
static float barHigh = na
barHigh := high 
histValue = barstate.ishistory ? barHigh : 0
realtimeValue = barstate.ishistory ? 0 : barHigh
plot(histValue, color=color.blue, title="Historical High")
plot(realtimeValue, color=color.red, title="Real-time High")
        

Type

series bool