Documentation ¶
Index ¶
- type DataFromKline
- func (d *DataFromKline) AppendResults(ki *gctkline.Item) error
- func (d *DataFromKline) HasDataAtTime(t time.Time) (bool, error)
- func (d *DataFromKline) Load() error
- func (d *DataFromKline) StreamClose() ([]decimal.Decimal, error)
- func (d *DataFromKline) StreamHigh() ([]decimal.Decimal, error)
- func (d *DataFromKline) StreamLow() ([]decimal.Decimal, error)
- func (d *DataFromKline) StreamOpen() ([]decimal.Decimal, error)
- func (d *DataFromKline) StreamVol() ([]decimal.Decimal, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataFromKline ¶
type DataFromKline struct { *data.Base Item *gctkline.Item RangeHolder *gctkline.IntervalRangeHolder }
DataFromKline is a struct which implements the data.Streamer interface It holds candle data for a specified range with helper functions
func NewDataFromKline ¶
func NewDataFromKline() *DataFromKline
NewDataFromKline returns a new struct
func (*DataFromKline) AppendResults ¶
func (d *DataFromKline) AppendResults(ki *gctkline.Item) error
AppendResults 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, error)
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() ([]decimal.Decimal, error)
StreamClose returns all Close prices from the beginning until the current iteration
func (*DataFromKline) StreamHigh ¶
func (d *DataFromKline) StreamHigh() ([]decimal.Decimal, error)
StreamHigh returns all High prices from the beginning until the current iteration
func (*DataFromKline) StreamLow ¶
func (d *DataFromKline) StreamLow() ([]decimal.Decimal, error)
StreamLow returns all Low prices from the beginning until the current iteration
func (*DataFromKline) StreamOpen ¶
func (d *DataFromKline) StreamOpen() ([]decimal.Decimal, error)
StreamOpen returns all Open prices from the beginning until the current iteration