state
Kept across bars; rolled back before each update of the forming bar (Pine’s
var).Kept across bars and across updates of the forming bar (Pine’s
varip).A list of at most
capacity values with a lifetime, default 'bar'.A matrix kept across bars and rolled back with the forming bar, all zeros at first.
StateValue
Cell
Series
A number with history, made withseries(lookback).
Tally
TallyBy
Add to
key’s sum for this bar. A new key past the capacity is dropped for the rest of the bar.Every key with its sum, in the order the keys were first added.
StateList
Add at the end. Past the capacity the script stops (OX2004):
shift the oldest first.StateMap
Set the value for
key. A new key past the capacity stops the script (OX2004).Lifetime
series()
A number with history:lookback bars kept, at most 5,000.
tally()
A sum of what event handlers add during a bar. Starts at 0 on each new bar; never rolled back.tallyBy()
A sum per key (such as a taker order id) during a bar, at mostcapacity keys. Empty on each new bar.