OHLCInfo.fromArray constructor
OHLCInfo.fromArray(
- List array
Constructs an instance of OHLCInfo from an array of dynamic values.
The array parameter should contain the following values in order:
- [array
0]: The timestamp in milliseconds. - [array
1]: The opening price. - [array
2]: The highest price. - [array
3]: The lowest price. - [array
4]: The closing price.
Implementation
OHLCInfo.fromArray(List<dynamic> array)
: this.timestamp = Convert.toDateTime(array[0], Helpers.defaultDateTime(),
unit: TimeUnit.milliseconds),
this.open = Convert.toDouble(array[1], 0),
this.high = Convert.toDouble(array[2], 0),
this.low = Convert.toDouble(array[3], 0),
this.close = Convert.toDouble(array[4], 0);