Documentation ¶
Index ¶
- type DataFromKline
- func (d *DataFromKline) Append(ki *gctkline.Item)
- func (d *DataFromKline) HasDataAtTime(t time.Time) bool
- func (d *DataFromKline) Load() error
- func (d *DataFromKline) StreamClose() []float64
- func (d *DataFromKline) StreamHigh() []float64
- func (d *DataFromKline) StreamLow() []float64
- func (d *DataFromKline) StreamOpen() []float64
- func (d *DataFromKline) StreamVol() []float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataFromKline ¶
type DataFromKline struct { Item gctkline.Item data.Base Range *gctkline.IntervalRangeHolder // contains filtered or unexported fields }
DataFromKline is a struct which implements the data.Streamer interface It holds candle data for a specified range with helper functions
func (*DataFromKline) Append ¶
func (d *DataFromKline) Append(ki *gctkline.Item)
Append adds a candle item to the data stream and sorts it to ensure it is all in order
func (*DataFromKline) HasDataAtTime ¶
func (d *DataFromKline) HasDataAtTime(t time.Time) bool
HasDataAtTime verifies checks the underlying range data To determine whether there is any candle data present at the time provided
func (*DataFromKline) Load ¶
func (d *DataFromKline) Load() error
Load sets the candle data to the stream for processing
func (*DataFromKline) StreamClose ¶
func (d *DataFromKline) StreamClose() []float64
StreamClose returns all Close prices from the beginning until the current iteration
func (*DataFromKline) StreamHigh ¶
func (d *DataFromKline) StreamHigh() []float64
StreamHigh returns all High prices from the beginning until the current iteration
func (*DataFromKline) StreamLow ¶
func (d *DataFromKline) StreamLow() []float64
StreamLow returns all Low prices from the beginning until the current iteration
func (*DataFromKline) StreamOpen ¶
func (d *DataFromKline) StreamOpen() []float64
StreamOpen returns all Open prices from the beginning until the current iteration
func (*DataFromKline) StreamVol ¶
func (d *DataFromKline) StreamVol() []float64
StreamVol returns all Volume prices from the beginning until the current iteration