is.lastbar? I dont really understand the context. barstate.isfirst — true if the current bar is the first in the whole range of bars available, false otherwise. barstate.islast — true if the current bar is the last in the whole range of bars available, false otherwise. This flag helps to detect the ...