CandleBuilder class

Aggregates a stream of real-time Tick events into normalized Candle bars.

Constructors

CandleBuilder({required Timeframe timeframe, List<Candle>? initialCandles})

Properties

candles → List<Candle>
no setter
currentCandle → Candle?
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeframe → Timeframe
final

Methods

clear() → void
Clears the candles in this builder.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onTick(Tick tick) → Candle
Ingests a new Tick and either updates the latest candle or initiates a new candle. Returns the updated or newly created Candle.
prepend(List<Candle> candles) → void
Prepends older candles to the front of the list (for lazy historical pagination). Candles must be sorted oldest-first and must all be older than the current first candle.
setCandles(List<Candle> candles) → void
Sets the candles collection wholesale (e.g. after fetching historical data).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited