session.islastbar

True on the last bar of the trading day: the bar that closes at the session's end (CME: 16:00 Chicago, or the early close of a holiday; FX: 17:00 New York; US stocks and crypto: midnight). Known from the clock and the calendar, not from the next bar; false on tick, volume and second charts.