Candle class

Represents an immutable OHLCV (Open, High, Low, Close, Volume) data bar.

Annotations

Constructors

Candle({required DateTime timestamp, required double open, required double high, required double low, required double close, required double volume})
const

Properties

close → double
final
hashCode → int
The hash code for this object.
no setteroverride
high → double
final
isBearish → bool
Returns true if this is a bearish candle (close < open).
no setter
isBullish → bool
Returns true if this is a bullish candle (close >= open).
no setter
low → double
final
open → double
final
percentageChange → double
Percentage change relative to open.
no setter
priceChange → double
Absolute price change between open and close.
no setter
range → double
Total bar height from low to high.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timestamp → DateTime
final
volume → double
final

Methods

copyWith({DateTime? timestamp, double? open, double? high, double? low, double? close, double? volume}) → Candle
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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