Skip to main content

chart.isHistory#

True for bars in the warmup pass (historical data).

SYNTAX#

ctx.isHistory: boolean

RETURNS#

boolean — true during warmup, false during tick.

REMARKS#

Mutually exclusive with ctx.isRealtime. Use to skip expensive computations during historical replay or to suppress noisy plot.marker emissions on stale bars.

EXAMPLE#

function onBar(i, ctx) {
  if (ctx.isHistory) {
    // Cheap path during warmup.
  } else {
    // Real-time tick — log to ctx.state for downstream realtime logic.
  }
}

SEE ALSO#

chart.isRealtime, chart.isFirst