Package Exports
- candlesticks
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (candlesticks) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
candlesticks
The thing to manage candlesticks.
Install
$ npm install candlesticksUsage
import {
Candlesticks,
Candlestick
} from 'candlesticks'
const candlesticks = new Candlesticks({
// Determine whether the candlestick is closed
closed (time: Date): Boolean {
// ...
},
transform (datum: RawDatum): ArrayDatum {
}
})struct ArrayDatum
[
open, // Number
high, // Number
low, // Number
close, // Number
volume, // Number
time // Date
]struct ObjectDatum
{
open, // Number
high, // Number
low, // Number
close, // Number
volume, // Number
time // Date
}class: Candlesticks(options)
Candlesticks.from(data: Array<ObjectDatum | ArrayDatum | Candlestick>)
candlesticks.update(...data)
- data
Array.<RawDatum>
candlesticks.open
Returns Array.<Number> open prices
candlesticks.high
Returns Array.<Number>
candlesticks.low
Returns Array.<Number>
candlesticks.close
Returns Array.<Number>
candlesticks.volume
Returns Array.<Number>
candlesticks.time
Returns Array.<Date>
class: Candlestick(...ArrayDatum)
Candlestick.from(datum: ObjectDatum | ArrayDatum | Candlestick)
License
MIT