Where the last bar stands, so a study can act once per bar rather than once per tick, or refuse to signal off a bar that is still moving.
The last bar's declared duration or calendar period has elapsed on the chart clock. Count-driven and unknown intervals cannot be confirmed by the clock. Without an interval, retains the legacy last-gap estimate (a single bar is confirmed). Explicit provider or replay state takes precedence over that estimate. Empty history is confirmed.
A live execution sees a newer tail than the previous calculation, including coalesced appends.
A live feed is driving updates, rather than a one-off history load.
Index of the last bar, bars.length - 1 (-1 when there are none).
OptionalexecutionNative mutation provenance. Older custom hosts may omit it.
OptionalintervalThe timeframe ('5m', '1d'), on the same terms as symbol.
OptionalsymbolThe instrument, when the host knows one. See IndicatorAttachContext.
OptionaltickThe instrument's tick size, from the price pane's minMove.
The price pane and not the indicator's own, because calc runs on the
instrument's bars whichever pane the plot lands in, and a study pane is not
quoted in the instrument's tick: an RSI is a dimensionless 0..100 band, so
its scale carries no tick at all to read.
undefined when the host has not told the chart what it is, which is the
honest answer rather than a guessed 0.01: an indicator sizing a range in
ticks has to tell "one paisa" apart from "nobody said".
The chart's IANA zone, the calendar its axis is labelled in.
OptionaltransformedTrue when the bars calc receives are a transform's elements (Renko
bricks, Heikin Ashi candles) rather than the bars the host feeds, so their
times do not mark out the clock. Absent otherwise.
OptionalresolveResolves declared, opted-in study inputs without recursively flushing the chart.
The fourth, optional argument to
calc(and the sixth tocalcTail): what the calculation cannot read off the bars themselves.It is optional so that every descriptor written against
calc(bars, settings, store)keeps its exact signature and its exact behaviour, which is the whole point: a calculation that ignores the context computes what it always did.