Skip to main content

chart.isRealtime#

True for bars in tick mode (the current live bar).

SYNTAX#

ctx.isRealtime: boolean

RETURNS#

boolean — true during tick, false during warmup.

REMARKS#

Mirror of ctx.isHistory. Use to gate real-time-only side effects (alerts, table updates with current values) so they don't fire during historical replay.

EXAMPLE#

function onBar(i, ctx) {
  if (ctx.isRealtime && candles[i].close > 70000) {
    plot.marker('high-alert', candles[i].close, { color: '#ef5350', shape: 'x' });
  }
}

SEE ALSO#

chart.isHistory, chart.isLast