Documentation ¶
Overview ¶
import "github.com/thetruetrade/gotrade" Package indicators provides a range of technical trading indicators. All indicators follow the basic structure of: - receiving price data, processing this price data and storing the transformed result. - maximum and minimum bounds of the transformed results are calculated automatically. - a lookback period indicating the lag between source data and the transformed result. - the source data bar from which the indicator is valid Functions are provided for each indicator that provide indicator creation for the following scenarios: Online Usage - the data stream length is not known ahead of time, e.g. real time data streams Offline Usage - the data stream length is known ahead of time, e.g. historical data streams Both scenarios provide the following indicator creation functions * Indicator with default parameters * Indicator with default parameters for attachment to a data stream * Indicator with specified parameters * Indicator with specified parameters for attachment to a data stream * Indicator without storage with specified parameters - for use inside other indicators, has no storage of results which is instead - provided via a callback when it becomes available for use in the parent indicator.
Moving Average Convergence and Divergence (Macd)
Simple Moving Average (Sma)
Index ¶
- Variables
- type Adl
- func NewAdl() (indicator *Adl, err error)
- func NewAdlForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adl, err error)
- func NewAdlForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adl, err error)
- func NewAdlWithSrcLen(sourceLength uint) (indicator *Adl, err error)
- type AdlWithoutStorage
- type Adx
- func NewAdx(timePeriod int) (indicator *Adx, err error)
- func NewAdxForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Adx, err error)
- func NewAdxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Adx, err error)
- func NewAdxWithSrcLen(sourceLength uint, timePeriod int) (indicator *Adx, err error)
- func NewDefaultAdx() (indicator *Adx, err error)
- func NewDefaultAdxForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adx, err error)
- func NewDefaultAdxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adx, err error)
- func NewDefaultAdxWithSrcLen(sourceLength uint) (indicator *Adx, err error)
- type AdxWithoutStorage
- type Adxr
- func NewAdxr(timePeriod int) (indicator *Adxr, err error)
- func NewAdxrForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Adxr, err error)
- func NewAdxrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Adxr, err error)
- func NewAdxrWithSrcLen(sourceLength uint, timePeriod int) (indicator *Adxr, err error)
- func NewDefaultAdxr() (indicator *Adxr, err error)
- func NewDefaultAdxrForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adxr, err error)
- func NewDefaultAdxrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adxr, err error)
- func NewDefaultAdxrWithSrcLen(sourceLength uint) (indicator *Adxr, err error)
- type AdxrWithoutStorage
- type Aroon
- func NewAroon(timePeriod int) (indicator *Aroon, err error)
- func NewAroonForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Aroon, err error)
- func NewAroonForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Aroon, err error)
- func NewAroonWithSrcLen(sourceLength uint, timePeriod int) (indicator *Aroon, err error)
- func NewDefaultAroon() (indicator *Aroon, err error)
- func NewDefaultAroonForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Aroon, err error)
- func NewDefaultAroonForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Aroon, err error)
- func NewDefaultAroonWithSrcLen(sourceLength uint) (indicator *Aroon, err error)
- type AroonOsc
- func NewAroonOsc(timePeriod int) (indicator *AroonOsc, err error)
- func NewAroonOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *AroonOsc, err error)
- func NewAroonOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *AroonOsc, err error)
- func NewAroonOscWithSrcLen(sourceLength uint, timePeriod int) (indicator *AroonOsc, err error)
- func NewDefaultAroonOsc() (indicator *AroonOsc, err error)
- func NewDefaultAroonOscForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AroonOsc, err error)
- func NewDefaultAroonOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AroonOsc, err error)
- func NewDefaultAroonOscWithSrcLen(sourceLength uint) (indicator *AroonOsc, err error)
- type AroonOscWithoutStorage
- type AroonWithoutStorage
- type Atr
- func NewAtr(timePeriod int) (indicator *Atr, err error)
- func NewAtrForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Atr, err error)
- func NewAtrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Atr, err error)
- func NewAtrWithSrcLen(sourceLength uint, timePeriod int) (indicator *Atr, err error)
- func NewDefaultAtr() (indicator *Atr, err error)
- func NewDefaultAtrForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Atr, err error)
- func NewDefaultAtrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Atr, err error)
- func NewDefaultAtrWithSrcLen(sourceLength uint) (indicator *Atr, err error)
- type AtrWithoutStorage
- type AvgPrice
- func NewAvgPrice() (indicator *AvgPrice, err error)
- func NewAvgPriceForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AvgPrice, err error)
- func NewAvgPriceForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AvgPrice, err error)
- func NewAvgPriceWithSrcLen(sourceLength uint) (indicator *AvgPrice, err error)
- type AvgPriceWithoutStorage
- type BollingerBands
- func NewBollingerBands(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *BollingerBands, err error)
- func NewBollingerBandsForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *BollingerBands, err error)
- func NewBollingerBandsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *BollingerBands, err error)
- func NewBollingerBandsWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *BollingerBands, err error)
- func NewDefaultBollingerBands() (indicator *BollingerBands, err error)
- func NewDefaultBollingerBandsForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *BollingerBands, err error)
- func NewDefaultBollingerBandsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *BollingerBands, err error)
- func NewDefaultBollingerBandsWithSrcLen(sourceLength uint) (indicator *BollingerBands, err error)
- type BollingerBandsWithoutStorage
- type Cci
- func NewCci(timePeriod int) (indicator *Cci, err error)
- func NewCciForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Cci, err error)
- func NewCciForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Cci, err error)
- func NewCciWithSrcLen(sourceLength uint, timePeriod int) (indicator *Cci, err error)
- func NewDefaultCci() (indicator *Cci, err error)
- func NewDefaultCciForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Cci, err error)
- func NewDefaultCciForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Cci, err error)
- func NewDefaultCciWithSrcLen(sourceLength uint) (indicator *Cci, err error)
- type CciWithoutStorage
- type ChaikinOsc
- func NewChaikinOsc(fastTimePeriod int, slowTimePeriod int) (indicator *ChaikinOsc, err error)
- func NewChaikinOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, fastTimePeriod int, ...) (indicator *ChaikinOsc, err error)
- func NewChaikinOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, ...) (indicator *ChaikinOsc, err error)
- func NewChaikinOscWithSrcLen(sourceLength uint, fastTimePeriod int, slowTimePeriod int) (indicator *ChaikinOsc, err error)
- func NewDefaultChaikinOsc() (indicator *ChaikinOsc, err error)
- func NewDefaultChaikinOscForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *ChaikinOsc, err error)
- func NewDefaultChaikinOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *ChaikinOsc, err error)
- func NewDefaultChaikinOscWithSrcLen(sourceLength uint) (indicator *ChaikinOsc, err error)
- type ChaikinOscWithoutStorage
- type Dema
- func NewDefaultDema() (indicator *Dema, err error)
- func NewDefaultDemaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Dema, err error)
- func NewDefaultDemaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Dema, err error)
- func NewDefaultDemaWithSrcLen(sourceLength uint) (indicator *Dema, err error)
- func NewDema(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Dema, err error)
- func NewDemaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Dema, err error)
- func NewDemaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Dema, err error)
- func NewDemaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Dema, err error)
- type DemaWithoutStorage
- type Dx
- func NewDefaultDx() (indicator *Dx, err error)
- func NewDefaultDxForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Dx, err error)
- func NewDefaultDxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Dx, err error)
- func NewDefaultDxWithSrcLen(sourceLength uint) (indicator *Dx, err error)
- func NewDx(timePeriod int) (indicator *Dx, err error)
- func NewDxForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Dx, err error)
- func NewDxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Dx, err error)
- func NewDxWithSrcLen(sourceLength uint, timePeriod int) (indicator *Dx, err error)
- type DxWithoutStorage
- type Ema
- func NewDefaultEma() (indicator *Ema, err error)
- func NewDefaultEmaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Ema, err error)
- func NewDefaultEmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Ema, err error)
- func NewDefaultEmaWithSrcLen(sourceLength uint) (indicator *Ema, err error)
- func NewEma(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Ema, err error)
- func NewEmaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Ema, err error)
- func NewEmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Ema, err error)
- func NewEmaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Ema, err error)
- type EmaWithoutStorage
- type Hhv
- func NewDefaultHhv() (indicator *Hhv, err error)
- func NewDefaultHhvForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Hhv, err error)
- func NewDefaultHhvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Hhv, err error)
- func NewDefaultHhvWithSrcLen(sourceLength uint) (indicator *Hhv, err error)
- func NewHhv(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Hhv, err error)
- func NewHhvForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Hhv, err error)
- func NewHhvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Hhv, err error)
- func NewHhvWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Hhv, err error)
- type HhvBars
- func NewDefaultHhvBars() (indicator *HhvBars, err error)
- func NewDefaultHhvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *HhvBars, err error)
- func NewDefaultHhvBarsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *HhvBars, err error)
- func NewDefaultHhvBarsWithSrcLen(sourceLength uint) (indicator *HhvBars, err error)
- func NewHhvBars(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *HhvBars, err error)
- func NewHhvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *HhvBars, err error)
- func NewHhvBarsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *HhvBars, err error)
- func NewHhvBarsWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *HhvBars, err error)
- type HhvBarsWithoutStorage
- type HhvWithoutStorage
- type Indicator
- type IndicatorWithFloatBounds
- type IndicatorWithIntBounds
- type IndicatorWithTimePeriod
- type Kama
- func NewDefaultKama() (indicator *Kama, err error)
- func NewDefaultKamaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Kama, err error)
- func NewDefaultKamaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Kama, err error)
- func NewDefaultKamaWithSrcLen(sourceLength uint) (indicator *Kama, err error)
- func NewKama(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Kama, err error)
- func NewKamaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Kama, err error)
- func NewKamaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Kama, err error)
- func NewKamaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Kama, err error)
- type KamaWithoutStorage
- type LinReg
- func NewDefaultLinReg() (indicator *LinReg, err error)
- func NewDefaultLinRegForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinReg, err error)
- func NewDefaultLinRegForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinReg, err error)
- func NewDefaultLinRegWithSrcLen(sourceLength uint) (indicator *LinReg, err error)
- func NewLinReg(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinReg, err error)
- func NewLinRegForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LinReg, err error)
- func NewLinRegForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LinReg, err error)
- func NewLinRegWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinReg, err error)
- func (ind LinReg) GetLookbackPeriod() int
- func (ind LinReg) IncDataLength()
- func (ind LinReg) Length() int
- func (ind LinReg) MaxValue() float64
- func (ind LinReg) MinValue() float64
- func (ind *LinReg) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
- func (ind LinReg) SetValidFromBar(streamBarIndex int)
- func (ind LinReg) UpdateMinMax(minCandidate float64, maxCandidate float64)
- func (ind LinReg) ValidFromBar() int
- type LinRegAng
- func NewDefaultLinRegAng() (indicator *LinRegAng, err error)
- func NewDefaultLinRegAngForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegAng, err error)
- func NewDefaultLinRegAngForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegAng, err error)
- func NewDefaultLinRegAngWithSrcLen(sourceLength uint) (indicator *LinRegAng, err error)
- func NewLinRegAng(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegAng, err error)
- func NewLinRegAngForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LinRegAng, err error)
- func NewLinRegAngForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LinRegAng, err error)
- func NewLinRegAngWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegAng, err error)
- func (ind LinRegAng) GetLookbackPeriod() int
- func (ind LinRegAng) IncDataLength()
- func (ind LinRegAng) Length() int
- func (ind LinRegAng) MaxValue() float64
- func (ind LinRegAng) MinValue() float64
- func (ind *LinRegAng) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
- func (ind LinRegAng) SetValidFromBar(streamBarIndex int)
- func (ind LinRegAng) UpdateMinMax(minCandidate float64, maxCandidate float64)
- func (ind LinRegAng) ValidFromBar() int
- type LinRegInt
- func NewDefaultLinRegInt() (indicator *LinRegInt, err error)
- func NewDefaultLinRegIntForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegInt, err error)
- func NewDefaultLinRegIntForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegInt, err error)
- func NewDefaultLinRegIntWithSrcLen(sourceLength uint) (indicator *LinRegInt, err error)
- func NewLinRegInt(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegInt, err error)
- func NewLinRegIntForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LinRegInt, err error)
- func NewLinRegIntForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LinRegInt, err error)
- func NewLinRegIntWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegInt, err error)
- func (ind LinRegInt) GetLookbackPeriod() int
- func (ind LinRegInt) IncDataLength()
- func (ind LinRegInt) Length() int
- func (ind LinRegInt) MaxValue() float64
- func (ind LinRegInt) MinValue() float64
- func (ind *LinRegInt) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
- func (ind LinRegInt) SetValidFromBar(streamBarIndex int)
- func (ind LinRegInt) UpdateMinMax(minCandidate float64, maxCandidate float64)
- func (ind LinRegInt) ValidFromBar() int
- type LinRegSlp
- func NewDefaultLinRegSlp() (indicator *LinRegSlp, err error)
- func NewDefaultLinRegSlpForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegSlp, err error)
- func NewDefaultLinRegSlpForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegSlp, err error)
- func NewDefaultLinRegSlpWithSrcLen(sourceLength uint) (indicator *LinRegSlp, err error)
- func NewLinRegSlp(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegSlp, err error)
- func NewLinRegSlpForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LinRegSlp, err error)
- func NewLinRegSlpForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LinRegSlp, err error)
- func NewLinRegSlpWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegSlp, err error)
- func (ind LinRegSlp) GetLookbackPeriod() int
- func (ind LinRegSlp) IncDataLength()
- func (ind LinRegSlp) Length() int
- func (ind LinRegSlp) MaxValue() float64
- func (ind LinRegSlp) MinValue() float64
- func (ind *LinRegSlp) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
- func (ind LinRegSlp) SetValidFromBar(streamBarIndex int)
- func (ind LinRegSlp) UpdateMinMax(minCandidate float64, maxCandidate float64)
- func (ind LinRegSlp) ValidFromBar() int
- type LinRegWithoutStorage
- func (ind LinRegWithoutStorage) GetLookbackPeriod() int
- func (ind LinRegWithoutStorage) IncDataLength()
- func (ind LinRegWithoutStorage) Length() int
- func (ind LinRegWithoutStorage) MaxValue() float64
- func (ind LinRegWithoutStorage) MinValue() float64
- func (ind *LinRegWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
- func (ind LinRegWithoutStorage) SetValidFromBar(streamBarIndex int)
- func (ind LinRegWithoutStorage) UpdateMinMax(minCandidate float64, maxCandidate float64)
- func (ind LinRegWithoutStorage) ValidFromBar() int
- type Llv
- func NewDefaultLlv() (indicator *Llv, err error)
- func NewDefaultLlvForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Llv, err error)
- func NewDefaultLlvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Llv, err error)
- func NewDefaultLlvWithSrcLen(sourceLength uint) (indicator *Llv, err error)
- func NewLlv(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Llv, err error)
- func NewLlvForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Llv, err error)
- func NewLlvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Llv, err error)
- func NewLlvWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Llv, err error)
- type LlvBars
- func NewDefaultLlvBars() (indicator *LlvBars, err error)
- func NewDefaultLlvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LlvBars, err error)
- func NewDefaultLlvBarsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LlvBars, err error)
- func NewDefaultLlvBarsWithSrcLen(sourceLength uint) (indicator *LlvBars, err error)
- func NewLlvBars(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LlvBars, err error)
- func NewLlvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LlvBars, err error)
- func NewLlvBarsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *LlvBars, err error)
- func NewLlvBarsWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LlvBars, err error)
- type LlvBarsWithoutStorage
- type LlvWithoutStorage
- type Macd
- func NewDefaultMacd() (indicator *Macd, err error)
- func NewDefaultMacdForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Macd, err error)
- func NewDefaultMacdForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Macd, err error)
- func NewDefaultMacdWithSrcLen(sourceLength uint) (indicator *Macd, err error)
- func NewMacd(fastTimePeriod int, slowTimePeriod int, signalTimePeriod int, ...) (indicator *Macd, err error)
- func NewMacdForStream(priceStream gotrade.DOHLCVStreamSubscriber, fastTimePeriod int, ...) (indicator *Macd, err error)
- func NewMacdForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, ...) (indicator *Macd, err error)
- func NewMacdWithSrcLen(sourceLength uint, fastTimePeriod int, slowTimePeriod int, ...) (indicator *Macd, err error)
- func (ind Macd) GetLookbackPeriod() int
- func (ind Macd) IncDataLength()
- func (ind Macd) Length() int
- func (ind Macd) MaxValue() float64
- func (ind Macd) MinValue() float64
- func (ind *Macd) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
- func (ind *Macd) ReceiveTick(tickData float64, streamBarIndex int)
- func (ind Macd) SetValidFromBar(streamBarIndex int)
- func (ind Macd) UpdateMinMax(minCandidate float64, maxCandidate float64)
- func (ind Macd) ValidFromBar() int
- type MedPrice
- func NewMedPrice() (indicator *MedPrice, err error)
- func NewMedPriceForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MedPrice, err error)
- func NewMedPriceForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MedPrice, err error)
- func NewMedPriceWithSrcLen(sourceLength uint) (indicator *MedPrice, err error)
- type MedPriceWithoutStorage
- type Mfi
- func NewDefaultMfi() (indicator *Mfi, err error)
- func NewDefaultMfiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mfi, err error)
- func NewDefaultMfiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mfi, err error)
- func NewDefaultMfiWithSrcLen(sourceLength uint) (indicator *Mfi, err error)
- func NewMfi(timePeriod int) (indicator *Mfi, err error)
- func NewMfiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Mfi, err error)
- func NewMfiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Mfi, err error)
- func NewMfiWithSrcLen(sourceLength uint, timePeriod int) (indicator *Mfi, err error)
- type MfiWithoutStorage
- type MinusDi
- func NewDefaultMinusDi() (indicator *MinusDi, err error)
- func NewDefaultMinusDiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MinusDi, err error)
- func NewDefaultMinusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MinusDi, err error)
- func NewDefaultMinusDiWithSrcLen(sourceLength uint) (indicator *MinusDi, err error)
- func NewMinusDi(timePeriod int) (indicator *MinusDi, err error)
- func NewMinusDiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDi, err error)
- func NewMinusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDi, err error)
- func NewMinusDiWithSrcLen(sourceLength uint, timePeriod int) (indicator *MinusDi, err error)
- type MinusDiWithoutStorage
- type MinusDm
- func NewDefaultMinusDm() (indicator *MinusDm, err error)
- func NewDefaultMinusDmForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MinusDm, err error)
- func NewDefaultMinusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MinusDm, err error)
- func NewDefaultMinusDmWithSrcLen(sourceLength uint) (indicator *MinusDm, err error)
- func NewMinusDm(timePeriod int) (indicator *MinusDm, err error)
- func NewMinusDmForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDm, err error)
- func NewMinusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDm, err error)
- func NewMinusDmWithSrcLen(sourceLength uint, timePeriod int) (indicator *MinusDm, err error)
- type MinusDmWithoutStorage
- type Mom
- func NewDefaultMom() (indicator *Mom, err error)
- func NewDefaultMomForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mom, err error)
- func NewDefaultMomForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mom, err error)
- func NewDefaultMomWithSrcLen(sourceLength uint) (indicator *Mom, err error)
- func NewMom(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Mom, err error)
- func NewMomForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Mom, err error)
- func NewMomForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Mom, err error)
- func NewMomWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Mom, err error)
- type MomWithoutStorage
- type Obv
- func NewObv() (indicator *Obv, err error)
- func NewObvForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Obv, err error)
- func NewObvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Obv, err error)
- func NewObvWithSrcLen(sourceLength uint) (indicator *Obv, err error)
- type ObvWithoutStorage
- type PlusDi
- func NewDefaultPlusDi() (indicator *PlusDi, err error)
- func NewDefaultPlusDiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *PlusDi, err error)
- func NewDefaultPlusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *PlusDi, err error)
- func NewDefaultPlusDiWithSrcLen(sourceLength uint) (indicator *PlusDi, err error)
- func NewPlusDi(timePeriod int) (indicator *PlusDi, err error)
- func NewPlusDiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDi, err error)
- func NewPlusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDi, err error)
- func NewPlusDiWithSrcLen(sourceLength uint, timePeriod int) (indicator *PlusDi, err error)
- type PlusDiWithoutStorage
- type PlusDm
- func NewDefaultPlusDm() (indicator *PlusDm, err error)
- func NewDefaultPlusDmForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *PlusDm, err error)
- func NewDefaultPlusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *PlusDm, err error)
- func NewDefaultPlusDmWithSrcLen(sourceLength uint) (indicator *PlusDm, err error)
- func NewPlusDm(timePeriod int) (indicator *PlusDm, err error)
- func NewPlusDmForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDm, err error)
- func NewPlusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDm, err error)
- func NewPlusDmWithSrcLen(sourceLength uint, timePeriod int) (indicator *PlusDm, err error)
- type PlusDmWithoutStorage
- type Roc
- func NewDefaultRoc() (indicator *Roc, err error)
- func NewDefaultRocForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Roc, err error)
- func NewDefaultRocForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Roc, err error)
- func NewDefaultRocWithSrcLen(sourceLength uint) (indicator *Roc, err error)
- func NewRoc(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Roc, err error)
- func NewRocForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Roc, err error)
- func NewRocForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Roc, err error)
- func NewRocWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Roc, err error)
- type RocP
- func NewDefaultRocP() (indicator *RocP, err error)
- func NewDefaultRocPForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocP, err error)
- func NewDefaultRocPForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocP, err error)
- func NewDefaultRocPWithSrcLen(sourceLength uint) (indicator *RocP, err error)
- func NewRocP(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocP, err error)
- func NewRocPForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *RocP, err error)
- func NewRocPForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *RocP, err error)
- func NewRocPWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocP, err error)
- type RocPWithoutStorage
- type RocR
- func NewDefaultRocR() (indicator *RocR, err error)
- func NewDefaultRocRForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocR, err error)
- func NewDefaultRocRForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocR, err error)
- func NewDefaultRocRWithSrcLen(sourceLength uint) (indicator *RocR, err error)
- func NewRocR(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR, err error)
- func NewRocRForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *RocR, err error)
- func NewRocRForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *RocR, err error)
- func NewRocRWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR, err error)
- type RocR100
- func NewDefaultRocR100() (indicator *RocR100, err error)
- func NewDefaultRocR100ForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocR100, err error)
- func NewDefaultRocR100ForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocR100, err error)
- func NewDefaultRocR100WithSrcLen(sourceLength uint) (indicator *RocR100, err error)
- func NewRocR100(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error)
- func NewRocR100ForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *RocR100, err error)
- func NewRocR100ForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *RocR100, err error)
- func NewRocR100WithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error)
- type RocR100WithoutStorage
- type RocRWithoutStorage
- type RocWithoutStorage
- type Rsi
- func NewDefaultRsi() (indicator *Rsi, err error)
- func NewDefaultRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Rsi, err error)
- func NewDefaultRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Rsi, err error)
- func NewDefaultRsiWithSrcLen(sourceLength uint) (indicator *Rsi, err error)
- func NewRsi(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Rsi, err error)
- func NewRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Rsi, err error)
- func NewRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Rsi, err error)
- func NewRsiWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Rsi, err error)
- type RsiWithoutStorage
- type Sar
- func NewDefaultSar() (indicator *Sar, err error)
- func NewDefaultSarForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sar, err error)
- func NewDefaultSarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sar, err error)
- func NewDefaultSarWithSrcLen(sourceLength uint) (indicator *Sar, err error)
- func NewSar(accelerationFactor float64, accelerationFactorMax float64) (indicator *Sar, err error)
- func NewSarForStream(priceStream gotrade.DOHLCVStreamSubscriber, accelerationFactor float64, ...) (indicator *Sar, err error)
- func NewSarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, ...) (indicator *Sar, err error)
- func NewSarWithSrcLen(sourceLength uint, accelerationFactor float64, accelerationFactorMax float64) (indicator *Sar, err error)
- type SarWithoutStorage
- type Sma
- func NewDefaultSma() (indicator *Sma, err error)
- func NewDefaultSmaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sma, err error)
- func NewDefaultSmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sma, err error)
- func NewDefaultSmaWithSrcLen(sourceLength uint) (indicator *Sma, err error)
- func NewSma(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Sma, err error)
- func NewSmaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Sma, err error)
- func NewSmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Sma, err error)
- func NewSmaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Sma, err error)
- type SmaWithoutStorage
- type StdDev
- func NewDefaultStdDev() (indicator *StdDev, err error)
- func NewDefaultStdDevForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StdDev, err error)
- func NewDefaultStdDevForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StdDev, err error)
- func NewDefaultStdDevWithSrcLen(sourceLength uint) (indicator *StdDev, err error)
- func NewStdDev(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *StdDev, err error)
- func NewStdDevForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *StdDev, err error)
- func NewStdDevForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *StdDev, err error)
- func NewStdDevWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *StdDev, err error)
- type StdDevWithoutStorage
- type StochOsc
- func NewDefaultStochOsc() (indicator *StochOsc, err error)
- func NewDefaultStochOscForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochOsc, err error)
- func NewDefaultStochOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochOsc, err error)
- func NewDefaultStochOscWithSrcLen(sourceLength uint) (indicator *StochOsc, err error)
- func NewStochOsc(fastKTimePeriod int, slowKTimePeriod int, slowDTimePeriod int) (indicator *StochOsc, err error)
- func NewStochOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, fastKTimePeriod int, ...) (indicator *StochOsc, err error)
- func NewStochOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, ...) (indicator *StochOsc, err error)
- func NewStochOscWithSrcLen(sourceLength uint, fastKTimePeriod int, slowKTimePeriod int, ...) (indicator *StochOsc, err error)
- type StochOscWithoutStorage
- type StochRsi
- func NewDefaultStochRsi() (indicator *StochRsi, err error)
- func NewDefaultStochRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochRsi, err error)
- func NewDefaultStochRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochRsi, err error)
- func NewDefaultStochRsiWithSrcLen(sourceLength uint) (indicator *StochRsi, err error)
- func NewStochRsi(timePeriod int, fastKTimePeriod int, fastDTimePeriod int) (indicator *StochRsi, err error)
- func NewStochRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *StochRsi, err error)
- func NewStochRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *StochRsi, err error)
- func NewStochRsiWithSrcLen(sourceLength uint, timePeriod int, fastKTimePeriod int, fastDTimePeriod int) (indicator *StochRsi, err error)
- type StochRsiWithoutStorage
- type Tema
- func NewDefaultTema() (indicator *Tema, err error)
- func NewDefaultTemaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Tema, err error)
- func NewDefaultTemaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Tema, err error)
- func NewDefaultTemaWithSrcLen(sourceLength uint) (indicator *Tema, err error)
- func NewTema(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tema, err error)
- func NewTemaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Tema, err error)
- func NewTemaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Tema, err error)
- func NewTemaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tema, err error)
- type TemaWithoutStorage
- type Trima
- func NewDefaultTrima() (indicator *Trima, err error)
- func NewDefaultTrimaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Trima, err error)
- func NewDefaultTrimaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Trima, err error)
- func NewDefaultTrimaWithSrcLen(sourceLength uint) (indicator *Trima, err error)
- func NewTrima(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Trima, err error)
- func NewTrimaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Trima, err error)
- func NewTrimaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Trima, err error)
- func NewTrimaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Trima, err error)
- type TrimaWithoutStorage
- type TrueRange
- func NewTrueRange() (indicator *TrueRange, err error)
- func NewTrueRangeForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TrueRange, err error)
- func NewTrueRangeForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TrueRange, err error)
- func NewTrueRangeWithSrcLen(sourceLength uint) (indicator *TrueRange, err error)
- type TrueRangeWithoutStorage
- type Tsf
- func NewDefaultTsf() (indicator *Tsf, err error)
- func NewDefaultTsfForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Tsf, err error)
- func NewDefaultTsfForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Tsf, err error)
- func NewDefaultTsfWithSrcLen(sourceLength uint) (indicator *Tsf, err error)
- func NewTsf(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tsf, err error)
- func NewTsfForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Tsf, err error)
- func NewTsfForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Tsf, err error)
- func NewTsfWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tsf, err error)
- func (ind Tsf) GetLookbackPeriod() int
- func (ind Tsf) IncDataLength()
- func (ind Tsf) Length() int
- func (ind Tsf) MaxValue() float64
- func (ind Tsf) MinValue() float64
- func (ind *Tsf) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
- func (ind Tsf) SetValidFromBar(streamBarIndex int)
- func (ind Tsf) UpdateMinMax(minCandidate float64, maxCandidate float64)
- func (ind Tsf) ValidFromBar() int
- type TypPrice
- func NewTypPrice() (indicator *TypPrice, err error)
- func NewTypPriceForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TypPrice, err error)
- func NewTypPriceForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TypPrice, err error)
- func NewTypPriceWithSrcLen(sourceLength uint) (indicator *TypPrice, err error)
- type TypPriceWithoutStorage
- type ValueAvailableActionAroon
- type ValueAvailableActionBollinger
- type ValueAvailableActionDOHLCV
- type ValueAvailableActionFloat
- type ValueAvailableActionInt
- type ValueAvailableActionLinearReg
- type ValueAvailableActionMacd
- type ValueAvailableActionStoch
- type Var
- func NewDefaultVar() (indicator *Var, err error)
- func NewDefaultVarForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Var, err error)
- func NewDefaultVarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Var, err error)
- func NewDefaultVarWithSrcLen(sourceLength uint) (indicator *Var, err error)
- func NewVar(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Var, err error)
- func NewVarForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Var, err error)
- func NewVarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Var, err error)
- func NewVarWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Var, err error)
- type VarWithoutStorage
- type WillR
- func NewDefaultWillR() (indicator *WillR, err error)
- func NewDefaultWillRForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *WillR, err error)
- func NewDefaultWillRForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *WillR, err error)
- func NewDefaultWillRWithSrcLen(sourceLength uint) (indicator *WillR, err error)
- func NewWillR(timePeriod int) (indicator *WillR, err error)
- func NewWillRForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *WillR, err error)
- func NewWillRForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *WillR, err error)
- func NewWillRWithSrcLen(sourceLength uint, timePeriod int) (indicator *WillR, err error)
- type WillRWithoutStorage
- type Wma
- func NewDefaultWma() (indicator *Wma, err error)
- func NewDefaultWmaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Wma, err error)
- func NewDefaultWmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Wma, err error)
- func NewDefaultWmaWithSrcLen(sourceLength uint) (indicator *Wma, err error)
- func NewWma(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Wma, err error)
- func NewWmaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Wma, err error)
- func NewWmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, ...) (indicator *Wma, err error)
- func NewWmaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Wma, err error)
- type WmaWithoutStorage
Constants ¶
This section is empty.
Variables ¶
var ( ErrSourceDataEmpty = errors.New("Source data is empty") ErrNotEnoughSourceDataForLookbackPeriod = errors.New("Source data does not contain enough data for the specfied lookback period") ErrLookbackPeriodMustBeGreaterThanZero = errors.New("Lookback period must be greater than 0") ErrValueAvailableActionIsNil = errors.New("A ValueAvailableAction is required") ErrDOHLCVDataSelectFuncIsNil = errors.New("A DOHLCVDataSelectionFunc is required") ErrStrBelowMinimum = "is less than the minimum" ErrStrAboveMaximum = "is greater than the maximum" // lookback minimum MinimumLookbackPeriod int = 0 // lookback maximum MaximumLookbackPeriod int = 100000 )
Functions ¶
This section is empty.
Types ¶
type Adl ¶
type Adl struct { *AdlWithoutStorage // public variables Data []float64 }
An Accumulation Distribution Line Indicator (Adl)
func NewAdlForStream ¶
func NewAdlForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adl, err error)
NewAdlForStream creates an Accumulation Distribution Line Indicator (Adl) for online usage with a source data stream
func NewAdlForStreamWithSrcLen ¶
func NewAdlForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adl, err error)
NewAdlForStreamWithSrcLen creates an Accumulation Distribution Line Indicator (Adl) for offline usage with a source data stream
func NewAdlWithSrcLen ¶
NewAdlWithSrcLen creates an Accumulation Distribution Line Indicator (Adl) for offline usage
func (Adl) UpdateIndicatorWithNewValue ¶
type AdlWithoutStorage ¶
type AdlWithoutStorage struct {
// contains filtered or unexported fields
}
An Accumulation Distribution Line Indicator (Adl), no storage, for use in other indicators
func NewAdlWithoutStorage ¶
func NewAdlWithoutStorage(valueAvailableAction ValueAvailableActionFloat) (indicator *AdlWithoutStorage, err error)
NewAdlWithoutStorage creates an Accumulation Distribution Line Indicator (Adl) without storage
func (*AdlWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *AdlWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (AdlWithoutStorage) UpdateIndicatorWithNewValue ¶
type Adx ¶
type Adx struct { *AdxWithoutStorage // public variables Data []float64 }
A Directional Movement Indicator (Adx)
func NewAdxForStream ¶
func NewAdxForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Adx, err error)
NewAdxForStream creates an Average Directional Index (Adx) for online usage with a source data stream
func NewAdxForStreamWithSrcLen ¶
func NewAdxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Adx, err error)
NewAdxForStreamWithSrcLen creates an Average Directional Index (Adx) for offline usage with a source data stream
func NewAdxWithSrcLen ¶
NewAdxWithSrcLen creates an Average Directional Index (Adx) for offline usage
func NewDefaultAdx ¶
NewDefaultAdx creates an Average Directional Index (Adx) for online usage with default parameters
- timePeriod: 14
func NewDefaultAdxForStream ¶
func NewDefaultAdxForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adx, err error)
NewDefaultAdxForStream creates an Average Directional Index (Adx) for online usage with a source data stream
func NewDefaultAdxForStreamWithSrcLen ¶
func NewDefaultAdxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adx, err error)
NewDefaultAdxForStreamWithSrcLen creates an Average Directional Index (Adx) for offline usage with a source data stream
func NewDefaultAdxWithSrcLen ¶
NewDefaultAdxWithSrcLen creates an Average Directional Index (Adx) for offline usage with default parameters
func (Adx) UpdateIndicatorWithNewValue ¶
type AdxWithoutStorage ¶
type AdxWithoutStorage struct {
// contains filtered or unexported fields
}
An Average Directional Index (Adx), no storage, for use in other indicators
func NewAdxWithoutStorage ¶
func NewAdxWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *AdxWithoutStorage, err error)
NewAdxWithoutStorage creates an Average Directional Index (Adx) without storage
func (*AdxWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *AdxWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (AdxWithoutStorage) UpdateIndicatorWithNewValue ¶
type Adxr ¶
type Adxr struct { *AdxrWithoutStorage // public variables Data []float64 }
A Directional Movement Indicator Rating (Adxr)
func NewAdxrForStream ¶
func NewAdxrForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Adxr, err error)
NewAdxrForStream creates an Average Directional Rating Index (Adxr) for online usage with a source data stream
func NewAdxrForStreamWithSrcLen ¶
func NewAdxrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Adxr, err error)
NewAdxrForStreamWithSrcLen creates an Average Directional Index Rating (Adxr) for offline usage with a source data stream
func NewAdxrWithSrcLen ¶
NewAdxrWithSrcLen creates an Average Directional Index Rating (Adxr) for offline usage
func NewDefaultAdxr ¶
NewDefaultAdxr creates an Average Directional Index Rating (Adxr) for online usage with default parameters
- timePeriod: 14
func NewDefaultAdxrForStream ¶
func NewDefaultAdxrForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adxr, err error)
NewDefaultAdxrForStream creates an Average Directional Index Rating (Adxr) for online usage with a source data stream
func NewDefaultAdxrForStreamWithSrcLen ¶
func NewDefaultAdxrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adxr, err error)
NewDefaultAdxrForStreamWithSrcLen creates an Average Directional Index Rating (Adxr) for offline usage with a source data stream
func NewDefaultAdxrWithSrcLen ¶
NewDefaultAdxrWithSrcLen creates an Average Directional Index Rating (Adxr) for offline usage with default parameters
func (Adxr) UpdateIndicatorWithNewValue ¶
type AdxrWithoutStorage ¶
type AdxrWithoutStorage struct {
// contains filtered or unexported fields
}
An Average Directional Index Rating (Adxr), no storage
func NewAdxrWithoutStorage ¶
func NewAdxrWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *AdxrWithoutStorage, err error)
NewAdxrWithoutStorage creates an Average Directional Index Rating (Adxr) without storage
func (*AdxrWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *AdxrWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (AdxrWithoutStorage) UpdateIndicatorWithNewValue ¶
type Aroon ¶
type Aroon struct { *AroonWithoutStorage // public variables Up []float64 Down []float64 }
An Aroon (Aroon)
func NewAroonForStream ¶
func NewAroonForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Aroon, err error)
NewAroonForStream creates an Aroon (Aroon) for online usage with a source data stream
func NewAroonForStreamWithSrcLen ¶
func NewAroonForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Aroon, err error)
NewAroonForStreamWithSrcLen creates an Aroon (Aroon) for online usage with a source data stream
func NewAroonWithSrcLen ¶
NewAroonWithSrcLen creates an Aroon (Aroon) for offline usage
func NewDefaultAroon ¶
NewDefaultAroon creates an Aroon (Aroon) for online usage with default parameters
- timePeriod: 14
func NewDefaultAroonForStream ¶
func NewDefaultAroonForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Aroon, err error)
NewDefaultAroonForStream creates an Aroon (Aroon) for online usage with a source data stream
func NewDefaultAroonForStreamWithSrcLen ¶
func NewDefaultAroonForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Aroon, err error)
NewDefaultAroonForStreamWithSrcLen creates an Aroon (Aroon) for online usage with a source data stream
func NewDefaultAroonWithSrcLen ¶
NewDefaultAroonWithSrcLen creates an Aroon (Aroon) for offline usage with default parameters
func (Aroon) UpdateIndicatorWithNewValue ¶
type AroonOsc ¶
type AroonOsc struct { *AroonOscWithoutStorage // public variables Data []float64 }
An AroonOsc (AroonOsc)
func NewAroonOsc ¶
NewAroonOsc creates an Aroon Oscillator (AroonOsc) for online usage
func NewAroonOscForStream ¶
func NewAroonOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *AroonOsc, err error)
NewAroonOscForStream creates an Aroon Oscillator (AroonOsc) for online usage with a source data stream
func NewAroonOscForStreamWithSrcLen ¶
func NewAroonOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *AroonOsc, err error)
NewAroonOscForStreamWithSrcLen creates an Aroon Oscillator (AroonOsc) for offline usage with a source data stream
func NewAroonOscWithSrcLen ¶
NewAroonOscWithSrcLen creates an Aroon Oscillator (AroonOsc) for offline usage
func NewDefaultAroonOsc ¶
NewDefaultAroonOsc creates an Aroon Oscillator (AroonOsc) for online usage with default parameters
- timePeriod: 14
func NewDefaultAroonOscForStream ¶
func NewDefaultAroonOscForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AroonOsc, err error)
NewDefaultAroonOscForStream creates an Aroon Oscillator (AroonOsc) for online usage with a source data stream
func NewDefaultAroonOscForStreamWithSrcLen ¶
func NewDefaultAroonOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AroonOsc, err error)
NewDefaultAroonOscForStreamWithSrcLen creates an Aroon Oscillator (AroonOsc) for offline usage with a source data stream
func NewDefaultAroonOscWithSrcLen ¶
NewDefaultAroonOscWithSrcLen creates an Aroon Oscillator (AroonOsc) for offline usage with default parameters
func (*AroonOsc) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (AroonOsc) UpdateIndicatorWithNewValue ¶
type AroonOscWithoutStorage ¶
type AroonOscWithoutStorage struct {
// contains filtered or unexported fields
}
func NewAroonOscWithoutStorage ¶
func NewAroonOscWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *AroonOscWithoutStorage, err error)
func (AroonOscWithoutStorage) UpdateIndicatorWithNewValue ¶
type AroonWithoutStorage ¶
type AroonWithoutStorage struct {
// contains filtered or unexported fields
}
An Aroon (Aroon), no storage, for use in other indicators
func NewAroonWithoutStorage ¶
func NewAroonWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionAroon) (indicator *AroonWithoutStorage, err error)
NewAroonWithoutStorage creates an Aroon (Aroon) without storage
func (*AroonWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *AroonWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (AroonWithoutStorage) UpdateIndicatorWithNewValue ¶
type Atr ¶
type Atr struct { *AtrWithoutStorage // public variables Data []float64 }
An Average True Range Indicator (Atr)
func NewAtrForStream ¶
func NewAtrForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Atr, err error)
NewAtrForStream creates an Average True Range (Atr) for online usage with a source data stream
func NewAtrForStreamWithSrcLen ¶
func NewAtrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Atr, err error)
NewAtrForStreamWithSrcLen creates an Average True Range (Atr) for offline usage with a source data stream
func NewAtrWithSrcLen ¶
NewAtrWithSrcLen creates an Average True Range (Atr) for offline usage
func NewDefaultAtr ¶
NewDefaultAtr creates an Average True Range (Atr) for online usage with default parameters
- timePeriod: 14
func NewDefaultAtrForStream ¶
func NewDefaultAtrForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Atr, err error)
NewDefaultAtrForStream creates an Average True Range (Atr) for online usage with a source data stream
func NewDefaultAtrForStreamWithSrcLen ¶
func NewDefaultAtrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Atr, err error)
NewDefaultAtrForStreamWithSrcLen creates an Average True Range (Atr) for offline usage with a source data stream
func NewDefaultAtrWithSrcLen ¶
NewDefaultAtrWithSrcLen creates an Average True Range (Atr) for offline usage with default parameters
func (Atr) UpdateIndicatorWithNewValue ¶
type AtrWithoutStorage ¶
type AtrWithoutStorage struct {
// contains filtered or unexported fields
}
An Average True Range Indicator (Atr), no storage, for use in other indicators
func NewAtrWithoutStorage ¶
func NewAtrWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *AtrWithoutStorage, err error)
NewAtrWithoutStorage creates an Average True Range Indicator (Atr) without storage
func (*AtrWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *AtrWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (AtrWithoutStorage) UpdateIndicatorWithNewValue ¶
type AvgPrice ¶
type AvgPrice struct { *AvgPriceWithoutStorage // public variables Data []float64 }
An Average Price Indicator
func NewAvgPrice ¶
NewAvgPrice creates an Average Price (AvgPrice) for online usage
func NewAvgPriceForStream ¶
func NewAvgPriceForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AvgPrice, err error)
NewAvgPriceForStream creates an Avgerage Price Indicator(AvgPrice) for online usage with a source data stream
func NewAvgPriceForStreamWithSrcLen ¶
func NewAvgPriceForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AvgPrice, err error)
NewAvgPriceForStreamWithSrcLen creates an Avgerage Price Indicator(AvgPrice) for offline usage with a source data stream
func NewAvgPriceWithSrcLen ¶
NewAvgPriceWithSrcLen creates an Avgerage Price Indicator(AvgPrice) for offline usage
func (AvgPrice) UpdateIndicatorWithNewValue ¶
type AvgPriceWithoutStorage ¶
type AvgPriceWithoutStorage struct {
// contains filtered or unexported fields
}
An Average Price (AvgPrice), no storage, for use in other indicators
func NewAvgPriceWithoutStorage ¶
func NewAvgPriceWithoutStorage(valueAvailableAction ValueAvailableActionFloat) (indicator *AvgPriceWithoutStorage, err error)
NewAvgPriceWithoutStorage creates an Average Price(AvgPrice) without storage
func (*AvgPriceWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *AvgPriceWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (AvgPriceWithoutStorage) UpdateIndicatorWithNewValue ¶
type BollingerBands ¶
type BollingerBands struct { *BollingerBandsWithoutStorage // public variables UpperBand []float64 MiddleBand []float64 LowerBand []float64 // contains filtered or unexported fields }
A Bollinger Band Indicator
func NewBollingerBands ¶
func NewBollingerBands(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *BollingerBands, err error)
NewBollingerBands creates a Bollinger Band Indicator (BollingerBand) for online usage
func NewBollingerBandsForStream ¶
func NewBollingerBandsForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *BollingerBands, err error)
NewBollingerBandsForStream creates a Bollinger Bands Indicator (BollingerBand) for online usage with a source data stream
func NewBollingerBandsForStreamWithSrcLen ¶
func NewBollingerBandsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *BollingerBands, err error)
NewBollingerBandsForStreamWithSrcLen creates a Bollinger Bands Indicator (BollingerBand) for online usage with a source data stream
func NewBollingerBandsWithSrcLen ¶
func NewBollingerBandsWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *BollingerBands, err error)
NewBollingerBandsWithSrcLen creates a Bollinger Band Indicator (BollingerBand) for offline usage
func NewDefaultBollingerBands ¶
func NewDefaultBollingerBands() (indicator *BollingerBands, err error)
NewDefaultBollingerBands creates a Bollinger Band Indicator (BollingerBand) for online usage with default parameters
- timePeriod: 5
- selectData: useClosePrice
func NewDefaultBollingerBandsForStream ¶
func NewDefaultBollingerBandsForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *BollingerBands, err error)
NewDefaultBollingerBandsForStream creates a Bollinger Bands Indicator (BollingerBand) for online usage with a source data stream
func NewDefaultBollingerBandsForStreamWithSrcLen ¶
func NewDefaultBollingerBandsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *BollingerBands, err error)
NewDefaultBollingerBandsForStreamWithSrcLen creates a Bollinger Bands Indicator (BollingerBand) for online usage with a source data stream
func NewDefaultBollingerBandsWithSrcLen ¶
func NewDefaultBollingerBandsWithSrcLen(sourceLength uint) (indicator *BollingerBands, err error)
NewDefaultBollingerBandsWithSrcLen creates a Bollinger Band Indicator (BollingerBand) for offline usage
func (*BollingerBands) ReceiveDOHLCVTick ¶
func (ind *BollingerBands) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
type BollingerBandsWithoutStorage ¶
type BollingerBandsWithoutStorage struct {
// contains filtered or unexported fields
}
A Bollinger Band Indicator (BollingerBand), no storage, for use in other indicators
func NewBollingerBandsWithoutStorage ¶
func NewBollingerBandsWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionBollinger) (indicator *BollingerBandsWithoutStorage, err error)
NewBollingerBandsWithoutStorage creates a Bollinger Band Indicator (BollingerBand) without storage
func (*BollingerBandsWithoutStorage) RecieveTick ¶
func (ind *BollingerBandsWithoutStorage) RecieveTick(tickData float64, streamBarIndex int)
ReceiveTick consumes a source data float price tick
type Cci ¶
type Cci struct { *CciWithoutStorage // public variables Data []float64 }
A Commodity Channel Index Indicator (Cci)
func NewCciForStream ¶
func NewCciForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Cci, err error)
NewCciForStream creates a Commodity Channel Index (Cci) for online usage with a source data stream
func NewCciForStreamWithSrcLen ¶
func NewCciForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Cci, err error)
NewCciForStreamWithSrcLen creates a Commodity Channel Index (Cci) for offline usage with a source data stream
func NewCciWithSrcLen ¶
NewCciWithSrcLen creates a Commodity Channel Index (Cci) for offline usage
func NewDefaultCci ¶
NewDefaultCci creates a Commodity Channel Index (Cci) for online usage with default parameters
- timePeriod: 14
func NewDefaultCciForStream ¶
func NewDefaultCciForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Cci, err error)
NewDefaultCciForStream creates a Commodity Channel Index (Cci) for online usage with a source data stream
func NewDefaultCciForStreamWithSrcLen ¶
func NewDefaultCciForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Cci, err error)
NewDefaultCciForStreamWithSrcLen creates a Commodity Channel Index (Cci) for offline usage with a source data stream
func NewDefaultCciWithSrcLen ¶
NewDefaultCciWithSrcLen creates a Commodity Channel Index (Cci) for offline usage with default parameters
func (*Cci) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Cci) UpdateIndicatorWithNewValue ¶
type CciWithoutStorage ¶
type CciWithoutStorage struct {
// contains filtered or unexported fields
}
A Commodity Channel Index Indicator (Cci), no storage, for use in other indicators
func NewCciWithoutStorage ¶
func NewCciWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *CciWithoutStorage, err error)
NewCciWithoutStorage creates a Commodity Channel Index Indicator (Cci) without storage
func (CciWithoutStorage) UpdateIndicatorWithNewValue ¶
type ChaikinOsc ¶
type ChaikinOsc struct { *ChaikinOscWithoutStorage // public variables Data []float64 }
A Chaikin Oscillator Indicator (ChaikinOsc)
func NewChaikinOsc ¶
func NewChaikinOsc(fastTimePeriod int, slowTimePeriod int) (indicator *ChaikinOsc, err error)
NewChaikinOsc creates a Chaikin Oscillator (ChaikinOsc) for online usage
func NewChaikinOscForStream ¶
func NewChaikinOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, fastTimePeriod int, slowTimePeriod int) (indicator *ChaikinOsc, err error)
NewChaikinOscForStream creates a Chaikin Oscillator (ChaikinOsc) for online usage with a source data stream
func NewChaikinOscForStreamWithSrcLen ¶
func NewChaikinOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, fastTimePeriod int, slowTimePeriod int) (indicator *ChaikinOsc, err error)
NewChaikinOscForStreamWithSrcLen creates a Chaikin Oscillator (ChaikinOsc) for offline usage with a source data stream
func NewChaikinOscWithSrcLen ¶
func NewChaikinOscWithSrcLen(sourceLength uint, fastTimePeriod int, slowTimePeriod int) (indicator *ChaikinOsc, err error)
NewChaikinOscWithSrcLen creates a Chaikin Oscillator (ChaikinOsc) for offline usage
func NewDefaultChaikinOsc ¶
func NewDefaultChaikinOsc() (indicator *ChaikinOsc, err error)
NewDefaultChaikinOsc creates a Chaikin Oscillator (ChaikinOsc) for online usage with default parameters
- fastTimePeriod: 3
- slowTimePeriod: 10
func NewDefaultChaikinOscForStream ¶
func NewDefaultChaikinOscForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *ChaikinOsc, err error)
NewDefaultChaikinOscForStream creates a Chaikin Oscillator (ChaikinOsc) for online usage with a source data stream
func NewDefaultChaikinOscForStreamWithSrcLen ¶
func NewDefaultChaikinOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *ChaikinOsc, err error)
NewDefaultChaikinOscForStreamWithSrcLen creates a Chaikin Oscillator (ChaikinOsc) for offline usage with a source data stream
func NewDefaultChaikinOscWithSrcLen ¶
func NewDefaultChaikinOscWithSrcLen(sourceLength uint) (indicator *ChaikinOsc, err error)
NewDefaultChaikinOscWithSrcLen creates a Chaikin Oscillator (ChaikinOsc) for offline usage with default parameters
func (*ChaikinOsc) ReceiveDOHLCVTick ¶
func (ind *ChaikinOsc) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (ChaikinOsc) UpdateIndicatorWithNewValue ¶
type ChaikinOscWithoutStorage ¶
type ChaikinOscWithoutStorage struct {
// contains filtered or unexported fields
}
A Chaikin Oscillator Indicator (ChaikinOsc), no storage, for use in other indicators
func NewChaikinOscWithoutStorage ¶
func NewChaikinOscWithoutStorage(fastTimePeriod int, slowTimePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *ChaikinOscWithoutStorage, err error)
NewChaikinOscWithoutStorage creates a Chaikin Oscillator Indicator (ChaikinOsc) without storage This should be as simple as EMA(Adl,3) - EMA(Adl,10), however it seems the TA-Lib emas are intialised with the first adl value and not offset like the macd to conincide, they are both calculated from the 2nd bar and used before their lookback period is reached - so the emas are calculated inline and not using the general EmaWithoutStorage
func (ChaikinOscWithoutStorage) UpdateIndicatorWithNewValue ¶
type Dema ¶
type Dema struct { *DemaWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Double Exponential Moving Average Indicator (Dema)
func NewDefaultDema ¶
NewDefaultDema creates a Double Exponential Moving Average (Dema) for online usage with default parameters
- timePeriod: 30
- selectData: useClosePrice
func NewDefaultDemaForStream ¶
func NewDefaultDemaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Dema, err error)
NewDefaultDemaForStream creates a Double Exponential Moving Average (Dema) for online usage with a source data stream
func NewDefaultDemaForStreamWithSrcLen ¶
func NewDefaultDemaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Dema, err error)
NewDefaultDemaForStreamWithSrcLen creates a Double Exponential Moving Average (Dema) for offline usage with a source data stream
func NewDefaultDemaWithSrcLen ¶
NewDefaultDemaWithSrcLen creates a Double Exponential Moving Average (Dema) for offline usage with default parameters
func NewDema ¶
func NewDema(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Dema, err error)
NewDema creates a Double Exponential Moving Average (Dema) for online usage
func NewDemaForStream ¶
func NewDemaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Dema, err error)
NewDemaForStream creates a Double Exponential Moving Average (Dema) for online usage with a source data stream
func NewDemaForStreamWithSrcLen ¶
func NewDemaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Dema, err error)
NewDemaForStreamWithSrcLen creates a Double Exponential Moving Average (Dema) for offline usage with a source data stream
func NewDemaWithSrcLen ¶
func NewDemaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Dema, err error)
NewDemaWithSrcLen creates a Double Exponential Moving Average (Dema) for offline usage
func (*Dema) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Dema) UpdateIndicatorWithNewValue ¶
type DemaWithoutStorage ¶
type DemaWithoutStorage struct {
// contains filtered or unexported fields
}
A Double Exponential Moving Average Indicator (Dema), no storage, for use in other indicators
func NewDemaWithoutStorage ¶
func NewDemaWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *DemaWithoutStorage, err error)
NewDemaWithoutStorage creates a Double Exponential Moving Average Indicator (Dema) without storage
func (*DemaWithoutStorage) ReceiveTick ¶
func (dema *DemaWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (DemaWithoutStorage) UpdateIndicatorWithNewValue ¶
type Dx ¶
type Dx struct { *DxWithoutStorage // public variables Data []float64 }
A Directional Movement Index Indicator (Dx)
func NewDefaultDx ¶
NewDefaultDx creates a Directional Movement Index (Dx) for online usage with default parameters
- timePeriod: 14
func NewDefaultDxForStream ¶
func NewDefaultDxForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Dx, err error)
NewDefaultDxForStream creates a Directional Movement Index (Dx) for online usage with a source data stream
func NewDefaultDxForStreamWithSrcLen ¶
func NewDefaultDxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Dx, err error)
NewDefaultDxForStreamWithSrcLen creates a Directional Movement Index (Dx) for offline usage with a source data stream
func NewDefaultDxWithSrcLen ¶
NewDefaultDxWithSrcLen creates a Directional Movement Index (Dx) for offline usage with default parameters
func NewDxForStream ¶
func NewDxForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Dx, err error)
NewDxForStream creates a Directional Movement Index (Dx) for online usage with a source data stream
func NewDxForStreamWithSrcLen ¶
func NewDxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Dx, err error)
NewDxForStreamWithSrcLen creates a Directional Movement Index (Dx) for offline usage with a source data stream
func NewDxWithSrcLen ¶
NewDxWithSrcLen creates a Directional Movement Index (Dx) for offline usage
func (Dx) UpdateIndicatorWithNewValue ¶
type DxWithoutStorage ¶
type DxWithoutStorage struct {
// contains filtered or unexported fields
}
An Directional Movement Index Indicator (Dx), no storage, for use in other indicators
func NewDxWithoutStorage ¶
func NewDxWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *DxWithoutStorage, err error)
NewDxWithoutStorage creates a Directional Movement Index Indicator (Dx) without storage
func (*DxWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *DxWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (DxWithoutStorage) UpdateIndicatorWithNewValue ¶
type Ema ¶
type Ema struct { *EmaWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
An Exponential Moving Average Indicator (Ema)
func NewDefaultEma ¶
NewDefaultEma creates an Exponential Moving Average (Ema) for online usage with default parameters
- timePeriod: 25
func NewDefaultEmaForStream ¶
func NewDefaultEmaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Ema, err error)
NewDefaultEmaForStream creates an Exponential Moving Average (Ema) for online usage with a source data stream
func NewDefaultEmaForStreamWithSrcLen ¶
func NewDefaultEmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Ema, err error)
NewDefaultEmaForStreamWithSrcLen creates an Exponential Moving Average (Ema) for offline usage with a source data stream
func NewDefaultEmaWithSrcLen ¶
NewDefaultEmaWithSrcLen creates an Exponential Moving Average (Ema) for offline usage with default parameters
func NewEma ¶
func NewEma(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Ema, err error)
NewEma creates an Exponential Moving Average Indicator (Ema) for online usage
func NewEmaForStream ¶
func NewEmaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Ema, err error)
NewEmaForStream creates an Exponential Moving Average (Ema) for online usage with a source data stream
func NewEmaForStreamWithSrcLen ¶
func NewEmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Ema, err error)
NewEmaForStreamWithSrcLen creates an Exponential Moving Average (Ema) for offline usage with a source data stream
func NewEmaWithSrcLen ¶
func NewEmaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Ema, err error)
NewEmaWithSrcLen creates an Exponential Moving Average (Ema) for offline usage
func (*Ema) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Ema) UpdateIndicatorWithNewValue ¶
type EmaWithoutStorage ¶
type EmaWithoutStorage struct {
// contains filtered or unexported fields
}
An Exponential Moving Average Indicator (Ema), no storage, for use in other indicators
func NewEmaWithoutStorage ¶
func NewEmaWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *EmaWithoutStorage, err error)
NewEmaWithoutStorage creates an Exponential Moving Average Indicator (Ema) without storage
func (*EmaWithoutStorage) ReceiveTick ¶
func (ind *EmaWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (EmaWithoutStorage) UpdateIndicatorWithNewValue ¶
type Hhv ¶
type Hhv struct { *HhvWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Highest High Value Indicator (hhv)
func NewDefaultHhv ¶
NewDefaultHhv creates a Highest High Value Indicator (Hhv) for online usage with default parameters
- timePeriod: 25
func NewDefaultHhvForStream ¶
func NewDefaultHhvForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Hhv, err error)
NewDefaultHhvForStream creates a Highest High Value Indicator (Hhv)for online usage with a source data stream
func NewDefaultHhvForStreamWithSrcLen ¶
func NewDefaultHhvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Hhv, err error)
NewDefaultHhvForStreamWithSrcLen creates a Highest High Value Indicator (Hhv)for offline usage with a source data stream
func NewDefaultHhvWithSrcLen ¶
NewDefaultHhvWithSrcLen creates a Highest High Value Indicator (Hhv)for offline usage with default parameters
func NewHhv ¶
func NewHhv(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Hhv, err error)
NewHhv creates a Highest High Value Indicator (Hhv) for online usage
func NewHhvForStream ¶
func NewHhvForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Hhv, err error)
NewHhvForStream creates a Highest High Value Indicator (Hhv)for online usage with a source data stream
func NewHhvForStreamWithSrcLen ¶
func NewHhvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Hhv, err error)
NewHhvForStreamWithSrcLen creates a Highest High Value Indicator (Hhv)for offline usage with a source data stream
func NewHhvWithSrcLen ¶
func NewHhvWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Hhv, err error)
NewHhvWithSrcLen creates a Highest High Value Indicator (Hhv)for offline usage
func (*Hhv) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Hhv) UpdateIndicatorWithNewValue ¶
type HhvBars ¶
type HhvBars struct { *HhvBarsWithoutStorage // public variables Data []int64 // contains filtered or unexported fields }
A Highest High Value Bars Indicator (HhvBars)
func NewDefaultHhvBars ¶
NewDefaultHhvBars creates a Highest High Value Indicator (HhvBars) for online usage with default parameters
- timePeriod: 25
func NewDefaultHhvBarsForStream ¶
func NewDefaultHhvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *HhvBars, err error)
NewDefaultHhvBarsForStream creates a Highest High Value Indicator (HhvBars)for online usage with a source data stream
func NewDefaultHhvBarsForStreamWithSrcLen ¶
func NewDefaultHhvBarsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *HhvBars, err error)
NewDefaultHhvBarsForStreamWithSrcLen creates a Highest High Value Indicator (HhvBars)for offline usage with a source data stream
func NewDefaultHhvBarsWithSrcLen ¶
NewDefaultHhvBarsWithSrcLen creates a Highest High Value Indicator (HhvBars)for offline usage with default parameters
func NewHhvBars ¶
func NewHhvBars(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *HhvBars, err error)
NewHhvBars creates a Highest High Value Bars Indicator (HhvBars) for online usage
func NewHhvBarsForStream ¶
func NewHhvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *HhvBars, err error)
NewHhvBarsForStream creates a Highest High Value Indicator (HhvBars)for online usage with a source data stream
func NewHhvBarsForStreamWithSrcLen ¶
func NewHhvBarsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *HhvBars, err error)
NewHhvBarsForStreamWithSrcLen creates a Highest High Value Indicator (HhvBars)for offline usage with a source data stream
func NewHhvBarsWithSrcLen ¶
func NewHhvBarsWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *HhvBars, err error)
NewHhvBarsWithSrcLen creates a Highest High Value Indicator (HhvBars)for offline usage
func (*HhvBars) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (HhvBars) UpdateIndicatorWithNewValue ¶
type HhvBarsWithoutStorage ¶
type HhvBarsWithoutStorage struct {
// contains filtered or unexported fields
}
A Highest High Value Bars Indicator (HhvBars), no storage, for use in other indicators
func NewHhvBarsWithoutStorage ¶
func NewHhvBarsWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionInt) (indicator *HhvBarsWithoutStorage, err error)
NewHhvBarsWithoutStorage creates a Highest High Value Bars Indicator Indicator (HhvBars) without storage
func (*HhvBarsWithoutStorage) ReceiveTick ¶
func (ind *HhvBarsWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (HhvBarsWithoutStorage) UpdateIndicatorWithNewValue ¶
type HhvWithoutStorage ¶
type HhvWithoutStorage struct {
// contains filtered or unexported fields
}
A Highest High Value Indicator (Hhv), no storage, for use in other indicators
func NewHhvWithoutStorage ¶
func NewHhvWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *HhvWithoutStorage, err error)
NewHhvWithoutStorage creates a Highest High Value Indicator (Hhv) without storage
func (*HhvWithoutStorage) ReceiveTick ¶
func (ind *HhvWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (HhvWithoutStorage) UpdateIndicatorWithNewValue ¶
type Indicator ¶
type Indicator interface { // the source data bar number from which this indicator is valid, starts at bar 1. ValidFromBar() int // the lookback period, if applicable, the amount of lag the indicator displays with regards to the source data. GetLookbackPeriod() int // the length of the transformed data generated by the indicator. Length() int }
type IndicatorWithIntBounds ¶
type IndicatorWithTimePeriod ¶
type IndicatorWithTimePeriod interface {
GetTimePeriod() int
}
type Kama ¶
type Kama struct { *KamaWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Kaufman Adaptive Moving Average Indicator (Kama)
func NewDefaultKama ¶
NewDefaultKama creates a Kaufman Adaptive Moving Average Indicator (Kama) for online usage with default parameters
- timePeriod: 25
func NewDefaultKamaForStream ¶
func NewDefaultKamaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Kama, err error)
NewDefaultKamaForStream creates a Kaufman Adaptive Moving Average Indicator (Kama) for online usage with a source data stream
func NewDefaultKamaForStreamWithSrcLen ¶
func NewDefaultKamaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Kama, err error)
NewDefaultKamaForStreamWithSrcLen creates a Kaufman Adaptive Moving Average Indicator (Kama) for offline usage with a source data stream
func NewDefaultKamaWithSrcLen ¶
NewDefaultKamaWithSrcLen creates a Kaufman Adaptive Moving Average Indicator (Kama) for offline usage with default parameters
func NewKama ¶
func NewKama(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Kama, err error)
NewKama creates a Kaufman Adaptive Moving Average Indicator (Kama) for online usage
func NewKamaForStream ¶
func NewKamaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Kama, err error)
NewKamaForStream creates a Kaufman Adaptive Moving Average Indicator (Kama) for online usage with a source data stream
func NewKamaForStreamWithSrcLen ¶
func NewKamaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Kama, err error)
NewKamaForStreamWithSrcLen creates a Kaufman Adaptive Moving Average Indicator (Kama) for offline usage with a source data stream
func NewKamaWithSrcLen ¶
func NewKamaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Kama, err error)
NewKamaWithSrcLen creates a Kaufman Adaptive Moving Average Indicator (Kama) for offline usage
func (*Kama) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Kama) UpdateIndicatorWithNewValue ¶
type KamaWithoutStorage ¶
type KamaWithoutStorage struct {
// contains filtered or unexported fields
}
A Kaufman Adaptive Moving Average Indicator (Kama), no storage, for use in other indicators
func NewKamaWithoutStorage ¶
func NewKamaWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *KamaWithoutStorage, err error)
NewKamaWithoutStorage creates a Kaufman Adaptive Moving Average Indicator (Kama) without storage
func (*KamaWithoutStorage) ReceiveTick ¶
func (ind *KamaWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (KamaWithoutStorage) UpdateIndicatorWithNewValue ¶
type LinReg ¶
type LinReg struct { *LinRegWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Linear Regression Indicator (LinReg)
func NewDefaultLinReg ¶
NewDefaultLinReg creates a Linear Regression Indicator (LinReg) for online usage with default parameters
- timePeriod: 14
func NewDefaultLinRegForStream ¶
func NewDefaultLinRegForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinReg, err error)
NewDefaultLinRegForStream creates a Linear Regression Indicator (LinReg) for online usage with a source data stream
func NewDefaultLinRegForStreamWithSrcLen ¶
func NewDefaultLinRegForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinReg, err error)
NewDefaultLinRegForStreamWithSrcLen creates a Linear Regression Indicator (LinReg) for offline usage with a source data stream
func NewDefaultLinRegWithSrcLen ¶
NewDefaultLinRegWithSrcLen creates a Linear Regression Indicator (LinReg) for offline usage with default parameters
func NewLinReg ¶
func NewLinReg(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinReg, err error)
NewLinReg creates a Linear Regression Indicator (LinReg) for online usage
func NewLinRegForStream ¶
func NewLinRegForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinReg, err error)
NewLinRegForStream creates a Linear Regression Indicator (LinReg) for online usage with a source data stream
func NewLinRegForStreamWithSrcLen ¶
func NewLinRegForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinReg, err error)
NewLinRegForStreamWithSrcLen creates a Linear Regression Indicator (LinReg) for offline usage with a source data stream
func NewLinRegWithSrcLen ¶
func NewLinRegWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinReg, err error)
NewLinRegWithSrcLen creates a Linear Regression Indicator (LinReg) for offline usage
func (LinReg) GetLookbackPeriod ¶
func (ind LinReg) GetLookbackPeriod() int
func (LinReg) IncDataLength ¶
func (ind LinReg) IncDataLength()
func (*LinReg) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (LinReg) SetValidFromBar ¶
func (ind LinReg) SetValidFromBar(streamBarIndex int)
func (LinReg) UpdateMinMax ¶
func (LinReg) ValidFromBar ¶
func (ind LinReg) ValidFromBar() int
type LinRegAng ¶
type LinRegAng struct { *LinRegWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Linear Regression Angle Indicator (LinRegAng)
func NewDefaultLinRegAng ¶
NewDefaultLinRegAng creates a Linear Regression Angle Indicator (LinRegAng) for online usage with default parameters
- timePeriod: 14
func NewDefaultLinRegAngForStream ¶
func NewDefaultLinRegAngForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegAng, err error)
NewDefaultLinRegAngForStream creates a Linear Regression Angle Indicator (LinRegAng) for online usage with a source data stream
func NewDefaultLinRegAngForStreamWithSrcLen ¶
func NewDefaultLinRegAngForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegAng, err error)
NewDefaultLinRegAngForStreamWithSrcLen creates a Linear Regression Angle Indicator (LinRegAng) for offline usage with a source data stream
func NewDefaultLinRegAngWithSrcLen ¶
NewDefaultLinRegAngWithSrcLen creates a Linear Regression Angle Indicator (LinRegAng) for offline usage with default parameters
func NewLinRegAng ¶
func NewLinRegAng(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegAng, err error)
NewLinRegAng creates a Linear Regression Angle Indicator (LinRegAng) for online usage
func NewLinRegAngForStream ¶
func NewLinRegAngForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegAng, err error)
NewLinRegAngForStream creates a Linear Regression Angle Indicator (LinRegAng) for online usage with a source data stream
func NewLinRegAngForStreamWithSrcLen ¶
func NewLinRegAngForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegAng, err error)
NewLinRegAngForStreamWithSrcLen creates a Linear Regression Angle Indicator (LinRegAng) for offline usage with a source data stream
func NewLinRegAngWithSrcLen ¶
func NewLinRegAngWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegAng, err error)
NewLinRegAngWithSrcLen creates a Linear Regression Angle Indicator (LinRegAng) for offline usage
func (LinRegAng) GetLookbackPeriod ¶
func (ind LinRegAng) GetLookbackPeriod() int
func (LinRegAng) IncDataLength ¶
func (ind LinRegAng) IncDataLength()
func (*LinRegAng) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (LinRegAng) SetValidFromBar ¶
func (ind LinRegAng) SetValidFromBar(streamBarIndex int)
func (LinRegAng) UpdateMinMax ¶
func (LinRegAng) ValidFromBar ¶
func (ind LinRegAng) ValidFromBar() int
type LinRegInt ¶
type LinRegInt struct { *LinRegWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Linear Regression Intercept Indicator (LinRegInt)
func NewDefaultLinRegInt ¶
NewDefaultLinRegInt creates a Linear Regression Intercept Indicator (LinRegInt) for online usage with default parameters
- timePeriod: 14
func NewDefaultLinRegIntForStream ¶
func NewDefaultLinRegIntForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegInt, err error)
NewDefaultLinRegIntForStream creates a Linear Regression Intercept Indicator (LinRegInt) for online usage with a source data stream
func NewDefaultLinRegIntForStreamWithSrcLen ¶
func NewDefaultLinRegIntForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegInt, err error)
NewDefaultLinRegIntForStreamWithSrcLen creates a Linear Regression Intercept Indicator (LinRegInt) for offline usage with a source data stream
func NewDefaultLinRegIntWithSrcLen ¶
NewDefaultLinRegIntWithSrcLen creates a Linear Regression Intercept Indicator (LinRegInt) for offline usage with default parameters
func NewLinRegInt ¶
func NewLinRegInt(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegInt, err error)
NewLinRegInt creates a Linear Regression Intercept Indicator (LinRegInt) for online usage
func NewLinRegIntForStream ¶
func NewLinRegIntForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegInt, err error)
NewLinRegIntForStream creates a Linear Regression Intercept Indicator (LinRegInt) for online usage with a source data stream
func NewLinRegIntForStreamWithSrcLen ¶
func NewLinRegIntForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegInt, err error)
NewLinRegIntForStreamWithSrcLen creates a Linear Regression Intercept Indicator (LinRegInt) for offline usage with a source data stream
func NewLinRegIntWithSrcLen ¶
func NewLinRegIntWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegInt, err error)
NewLinRegIntWithSrcLen creates a Linear Regression Intercept Indicator (LinRegInt) for offline usage
func (LinRegInt) GetLookbackPeriod ¶
func (ind LinRegInt) GetLookbackPeriod() int
func (LinRegInt) IncDataLength ¶
func (ind LinRegInt) IncDataLength()
func (*LinRegInt) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (LinRegInt) SetValidFromBar ¶
func (ind LinRegInt) SetValidFromBar(streamBarIndex int)
func (LinRegInt) UpdateMinMax ¶
func (LinRegInt) ValidFromBar ¶
func (ind LinRegInt) ValidFromBar() int
type LinRegSlp ¶
type LinRegSlp struct { *LinRegWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Linear Regression Intercept Indicator (LinRegInt)
func NewDefaultLinRegSlp ¶
NewDefaultLinRegSlp creates a Linear Regression Slope Indicator (LinRegSlp) for online usage with default parameters
- timePeriod: 14
func NewDefaultLinRegSlpForStream ¶
func NewDefaultLinRegSlpForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegSlp, err error)
NewDefaultLinRegSlpForStream creates a Linear Regression Slope Indicator (LinRegSlp) for online usage with a source data stream
func NewDefaultLinRegSlpForStreamWithSrcLen ¶
func NewDefaultLinRegSlpForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegSlp, err error)
NewDefaultLinRegSlpForStreamWithSrcLen creates a Linear Regression Slope Indicator (LinRegSlp) for offline usage with a source data stream
func NewDefaultLinRegSlpWithSrcLen ¶
NewDefaultLinRegSlpWithSrcLen creates a Linear Regression Slope Indicator (LinRegSlp) for offline usage with default parameters
func NewLinRegSlp ¶
func NewLinRegSlp(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegSlp, err error)
NewLinRegSlp creates a Linear Regression Slope Indicator (LinRegSlp) for online usage
func NewLinRegSlpForStream ¶
func NewLinRegSlpForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegSlp, err error)
NewLinRegSlpForStream creates a Linear Regression Slope Indicator (LinRegSlp) for online usage with a source data stream
func NewLinRegSlpForStreamWithSrcLen ¶
func NewLinRegSlpForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegSlp, err error)
NewLinRegSlpForStreamWithSrcLen creates a Linear Regression Slope Indicator (LinRegSlp) for offline usage with a source data stream
func NewLinRegSlpWithSrcLen ¶
func NewLinRegSlpWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegSlp, err error)
NewLinRegSlpWithSrcLen creates a Linear Regression Slope Indicator (LinRegSlp) for offline usage
func (LinRegSlp) GetLookbackPeriod ¶
func (ind LinRegSlp) GetLookbackPeriod() int
func (LinRegSlp) IncDataLength ¶
func (ind LinRegSlp) IncDataLength()
func (*LinRegSlp) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (LinRegSlp) SetValidFromBar ¶
func (ind LinRegSlp) SetValidFromBar(streamBarIndex int)
func (LinRegSlp) UpdateMinMax ¶
func (LinRegSlp) ValidFromBar ¶
func (ind LinRegSlp) ValidFromBar() int
type LinRegWithoutStorage ¶
type LinRegWithoutStorage struct {
// contains filtered or unexported fields
}
A Linear Regression Indicator (LinReg), no storage, for use in other indicators
func NewLinRegWithoutStorage ¶
func NewLinRegWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionLinearReg) (indicator *LinRegWithoutStorage, err error)
NewLinRegWithoutStorage creates a Linear Regression Indicator (LinReg) without storage
func (LinRegWithoutStorage) GetLookbackPeriod ¶
func (ind LinRegWithoutStorage) GetLookbackPeriod() int
func (LinRegWithoutStorage) IncDataLength ¶
func (ind LinRegWithoutStorage) IncDataLength()
func (*LinRegWithoutStorage) ReceiveTick ¶
func (ind *LinRegWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (LinRegWithoutStorage) SetValidFromBar ¶
func (ind LinRegWithoutStorage) SetValidFromBar(streamBarIndex int)
func (LinRegWithoutStorage) UpdateMinMax ¶
func (LinRegWithoutStorage) ValidFromBar ¶
func (ind LinRegWithoutStorage) ValidFromBar() int
type Llv ¶
type Llv struct { *LlvWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Lowest Low Value Indicator (hhv)
func NewDefaultLlv ¶
NewDefaultLlv creates a Lowest Low Value Indicator (Llv) for online usage with default parameters
- timePeriod: 25
func NewDefaultLlvForStream ¶
func NewDefaultLlvForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Llv, err error)
NewDefaultLlvForStream creates a Lowest Low Value Indicator (Llv)for online usage with a source data stream
func NewDefaultLlvForStreamWithSrcLen ¶
func NewDefaultLlvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Llv, err error)
NewDefaultLlvForStreamWithSrcLen creates a Lowest Low Value Indicator (Llv)for offline usage with a source data stream
func NewDefaultLlvWithSrcLen ¶
NewDefaultLlvWithSrcLen creates a Lowest Low Value Indicator (Llv)for offline usage with default parameters
func NewLlv ¶
func NewLlv(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Llv, err error)
NewLlv creates a Lowest Low Value Indicator (Llv) for online usage
func NewLlvForStream ¶
func NewLlvForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Llv, err error)
NewLlvForStream creates a Lowest Low Value Indicator (Llv)for online usage with a source data stream
func NewLlvForStreamWithSrcLen ¶
func NewLlvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Llv, err error)
NewLlvForStreamWithSrcLen creates a Lowest Low Value Indicator (Llv)for offline usage with a source data stream
func NewLlvWithSrcLen ¶
func NewLlvWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Llv, err error)
NewLlvWithSrcLen creates a Lowest Low Value Indicator (Llv)for offline usage
func (*Llv) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Llv) UpdateIndicatorWithNewValue ¶
type LlvBars ¶
type LlvBars struct { *LlvBarsWithoutStorage // public variables Data []int64 // contains filtered or unexported fields }
A Lowest Low Value Bars Indicator (LlvBars)
func NewDefaultLlvBars ¶
NewDefaultLlvBars creates a Lowest Low Value Indicator (LlvBars) for online usage with default parameters
- timePeriod: 25
func NewDefaultLlvBarsForStream ¶
func NewDefaultLlvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LlvBars, err error)
NewDefaultLlvBarsForStream creates a Lowest Low Value Indicator (LlvBars)for online usage with a source data stream
func NewDefaultLlvBarsForStreamWithSrcLen ¶
func NewDefaultLlvBarsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LlvBars, err error)
NewDefaultLlvBarsForStreamWithSrcLen creates a Lowest Low Value Indicator (LlvBars)for offline usage with a source data stream
func NewDefaultLlvBarsWithSrcLen ¶
NewDefaultLlvBarsWithSrcLen creates a Lowest Low Value Indicator (LlvBars)for offline usage with default parameters
func NewLlvBars ¶
func NewLlvBars(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LlvBars, err error)
NewLlvBars creates a Lowest Low Value Bars Indicator (LlvBars) for online usage
func NewLlvBarsForStream ¶
func NewLlvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LlvBars, err error)
NewLlvBarsForStream creates a Lowest Low Value Indicator (LlvBars)for online usage with a source data stream
func NewLlvBarsForStreamWithSrcLen ¶
func NewLlvBarsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LlvBars, err error)
NewLlvBarsForStreamWithSrcLen creates a Lowest Low Value Indicator (LlvBars)for offline usage with a source data stream
func NewLlvBarsWithSrcLen ¶
func NewLlvBarsWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LlvBars, err error)
NewLlvBarsWithSrcLen creates a Lowest Low Value Indicator (LlvBars)for offline usage
func (*LlvBars) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (LlvBars) UpdateIndicatorWithNewValue ¶
type LlvBarsWithoutStorage ¶
type LlvBarsWithoutStorage struct {
// contains filtered or unexported fields
}
A Lowest Low Value Bars Indicator (LlvBars), no storage, for use in other indicators
func NewLlvBarsWithoutStorage ¶
func NewLlvBarsWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionInt) (indicator *LlvBarsWithoutStorage, err error)
NewLlvBarsWithoutStorage creates a Lowest Low Value Bars Indicator Indicator (LlvBars) without storage
func (*LlvBarsWithoutStorage) ReceiveTick ¶
func (ind *LlvBarsWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (LlvBarsWithoutStorage) UpdateIndicatorWithNewValue ¶
type LlvWithoutStorage ¶
type LlvWithoutStorage struct {
// contains filtered or unexported fields
}
A Lowest Low Value Indicator (Llv), no storage, for use in other indicators
func NewLlvWithoutStorage ¶
func NewLlvWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *LlvWithoutStorage, err error)
NewLlvWithoutStorage creates a Lowest Low Value Indicator Indicator (Llv) without storage
func (*LlvWithoutStorage) ReceiveTick ¶
func (ind *LlvWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (LlvWithoutStorage) UpdateIndicatorWithNewValue ¶
type Macd ¶
type Macd struct { // public variables Macd []float64 Signal []float64 Histogram []float64 // contains filtered or unexported fields }
A Moving Average Convergence-Divergence (Macd) Indicator
func NewDefaultMacd ¶
NewDefaultMacd creates a Moving Average Convergence Divergence Indicator (Macd) for online usage with default parameters
fastTimePeriod - 12 slowTimePeriod - 26 signalTimePeriod - 9
func NewDefaultMacdForStream ¶
func NewDefaultMacdForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Macd, err error)
NewDefaultMacdForStream creates a Moving Average Convergence Divergence Indicator (Macd) for online usage with a source data stream
func NewDefaultMacdForStreamWithSrcLen ¶
func NewDefaultMacdForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Macd, err error)
NewDefaultMacdForStreamWithSrcLen creates a Moving Average Convergence Divergence Indicator (Macd) for offline usage with a source data stream
func NewDefaultMacdWithSrcLen ¶
NewDefaultMacdWithSrcLen creates a Moving Average Convergence Divergence Indicator (Macd) for offline usage with default parameters
func NewMacd ¶
func NewMacd(fastTimePeriod int, slowTimePeriod int, signalTimePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Macd, err error)
NewMacd creates a Moving Average Convergence Divergence Indicator (Macd) for online usage
func NewMacdForStream ¶
func NewMacdForStream(priceStream gotrade.DOHLCVStreamSubscriber, fastTimePeriod int, slowTimePeriod int, signalTimePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Macd, err error)
NewMacdForStream creates a Moving Average Convergence Divergence Indicator (Macd) for online usage with a source data stream
func NewMacdForStreamWithSrcLen ¶
func NewMacdForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, fastTimePeriod int, slowTimePeriod int, signalTimePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Macd, err error)
NewMacdForStreamWithSrcLen creates a Moving Average Convergence Divergence Indicator (Macd) for offline usage with a source data stream
func NewMacdWithSrcLen ¶
func NewMacdWithSrcLen(sourceLength uint, fastTimePeriod int, slowTimePeriod int, signalTimePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Macd, err error)
NewMacdWithSrcLen creates a Moving Average Convergence Divergence Indicator (Macd) for offline usage
func (Macd) GetLookbackPeriod ¶
func (ind Macd) GetLookbackPeriod() int
func (Macd) IncDataLength ¶
func (ind Macd) IncDataLength()
func (*Macd) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (*Macd) ReceiveTick ¶
func (Macd) SetValidFromBar ¶
func (ind Macd) SetValidFromBar(streamBarIndex int)
func (Macd) UpdateMinMax ¶
func (Macd) ValidFromBar ¶
func (ind Macd) ValidFromBar() int
type MedPrice ¶
type MedPrice struct { *MedPriceWithoutStorage // public variables Data []float64 }
A Median Price Indicator (MedPrice)
func NewMedPrice ¶
func NewMedPriceForStream ¶
func NewMedPriceForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MedPrice, err error)
NewMedPriceForStream creates a Median Price Indicator (MedPrice) for online usage with a source data stream
func NewMedPriceForStreamWithSrcLen ¶
func NewMedPriceForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MedPrice, err error)
NewMedPriceForStreamWithSrcLen creates a Median Price Indicator (MedPrice) for offline usage with a source data stream
func NewMedPriceWithSrcLen ¶
NewMedPriceWithSrcLen creates a Median Price Indicator (MedPrice) for offline usage
func (MedPrice) UpdateIndicatorWithNewValue ¶
type MedPriceWithoutStorage ¶
type MedPriceWithoutStorage struct {
// contains filtered or unexported fields
}
A Median Price Indicator (MedPrice), no storage, for use in other indicators
func NewMedPriceWithoutStorage ¶
func NewMedPriceWithoutStorage(valueAvailableAction ValueAvailableActionFloat) (indicator *MedPriceWithoutStorage, err error)
NewMedPriceWithoutStorage creates a Median Price Indicator (MedPrice) without storage
func (*MedPriceWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *MedPriceWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (MedPriceWithoutStorage) UpdateIndicatorWithNewValue ¶
type Mfi ¶
type Mfi struct { *MfiWithoutStorage // public variables Data []float64 }
A Money Flow Index Indicator (Mfi)
func NewDefaultMfi ¶
NewDefaultMfi creates a Money Flow Index Indicator (Mfi) for online usage with default parameters
- timePeriod: 25
func NewDefaultMfiForStream ¶
func NewDefaultMfiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mfi, err error)
NewDefaultMfiForStream creates a Money Flow Index Indicator (Mfi) for online usage with a source data stream
func NewDefaultMfiForStreamWithSrcLen ¶
func NewDefaultMfiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mfi, err error)
NewDefaultMfiForStreamWithSrcLen creates a Money Flow Index Indicator (Mfi) for offline usage with a source data stream
func NewDefaultMfiWithSrcLen ¶
NewDefaultMfiWithSrcLen creates a Money Flow Index Indicator (Mfi) for offline usage with default parameters
func NewMfiForStream ¶
func NewMfiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Mfi, err error)
NewMfiForStream creates a Money Flow Index Indicator (Mfi) for online usage with a source data stream
func NewMfiForStreamWithSrcLen ¶
func NewMfiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Mfi, err error)
NewMfiForStreamWithSrcLen creates a Money Flow Index Indicator (Mfi) for offline usage with a source data stream
func NewMfiWithSrcLen ¶
NewMfiWithSrcLen creates a Money Flow Index Indicator (Mfi) for offline usage
func (Mfi) UpdateIndicatorWithNewValue ¶
type MfiWithoutStorage ¶
type MfiWithoutStorage struct {
// contains filtered or unexported fields
}
A Money Flow Index Indicator (Mfi), no storage, for use in other indicators
func NewMfiWithoutStorage ¶
func NewMfiWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *MfiWithoutStorage, err error)
NewMfiWithoutStorage creates a Money Flow Index Indicator (Mfi) without storage
func (*MfiWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *MfiWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (MfiWithoutStorage) UpdateIndicatorWithNewValue ¶
type MinusDi ¶
type MinusDi struct { *MinusDiWithoutStorage // public variables Data []float64 }
A Minus Directional Indicator (MinusDi)
func NewDefaultMinusDi ¶
NewDefaultMinusDi creates a Minus Directional Indicator (MinusDi) for online usage with default parameters
- timePeriod: 14
func NewDefaultMinusDiForStream ¶
func NewDefaultMinusDiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MinusDi, err error)
NewDefaultMinusDiForStream creates a Minus Directional Indicator (MinusDi) for online usage with a source data stream
func NewDefaultMinusDiForStreamWithSrcLen ¶
func NewDefaultMinusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MinusDi, err error)
NewDefaultMinusDiForStreamWithSrcLen creates a Minus Directional Indicator (MinusDi) for offline usage with a source data stream
func NewDefaultMinusDiWithSrcLen ¶
NewDefaultMinusDiWithSrcLen creates a Minus Directional Indicator (MinusDi) for offline usage with default parameters
func NewMinusDi ¶
NewMinusDi creates a Minus Directional Indicator (MinusDi) for online usage
func NewMinusDiForStream ¶
func NewMinusDiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDi, err error)
NewMinusDiForStream creates a Minus Directional Indicator (MinusDi) for online usage with a source data stream
func NewMinusDiForStreamWithSrcLen ¶
func NewMinusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDi, err error)
NewMinusDiForStreamWithSrcLen creates a Minus Directional Indicator (MinusDi) for offline usage with a source data stream
func NewMinusDiWithSrcLen ¶
NewMinusDiWithSrcLen creates a Minus Directional Indicator (MinusDi) for offline usage
func (MinusDi) UpdateIndicatorWithNewValue ¶
type MinusDiWithoutStorage ¶
type MinusDiWithoutStorage struct {
// contains filtered or unexported fields
}
A Minus Directional Indicator (MinusDi), no storage, for use in other indicators
func NewMinusDiWithoutStorage ¶
func NewMinusDiWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *MinusDiWithoutStorage, err error)
NewMinusDiWithoutStorage creates a Minus Directional Indicator (MinusDi) without storage
func (*MinusDiWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *MinusDiWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (MinusDiWithoutStorage) UpdateIndicatorWithNewValue ¶
type MinusDm ¶
type MinusDm struct { *MinusDmWithoutStorage // public variables Data []float64 }
A Minus Directional Movement Indicator (MinusDm)
func NewDefaultMinusDm ¶
NewDefaultMinusDm creates a Minus Directional Movement Indicator (MinusDm) for online usage with default parameters
- timePeriod: 14
func NewDefaultMinusDmForStream ¶
func NewDefaultMinusDmForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MinusDm, err error)
NewDefaultMinusDmForStream creates a Minus Directional Movement Indicator (MinusDm) for online usage with a source data stream
func NewDefaultMinusDmForStreamWithSrcLen ¶
func NewDefaultMinusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MinusDm, err error)
NewDefaultMinusDmForStreamWithSrcLen creates a Minus Directional Movement Indicator (MinusDm) for offline usage with a source data stream
func NewDefaultMinusDmWithSrcLen ¶
NewDefaultMinusDmWithSrcLen creates a Minus Directional Movement Indicator (MinusDm) for offline usage with default parameters
func NewMinusDm ¶
NewMinusDm creates a Minus Directional Movement Indicator (MinusDm) for online usage
func NewMinusDmForStream ¶
func NewMinusDmForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDm, err error)
NewMinusDmForStream creates a Minus Directional Movement Indicator (MinusDm) for online usage with a source data stream
func NewMinusDmForStreamWithSrcLen ¶
func NewMinusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDm, err error)
NewMinusDmForStreamWithSrcLen creates a Minus Directional Movement Indicator (MinusDm) for offline usage with a source data stream
func NewMinusDmWithSrcLen ¶
NewMinusDmWithSrcLen creates a Minus Directional Movement Indicator (MinusDm) for offline usage
func (MinusDm) UpdateIndicatorWithNewValue ¶
type MinusDmWithoutStorage ¶
type MinusDmWithoutStorage struct {
// contains filtered or unexported fields
}
A Minus Directional Movement Indicator (MinusDm), no storage, for use in other indicators
func NewMinusDmWithoutStorage ¶
func NewMinusDmWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *MinusDmWithoutStorage, err error)
NewMinusDmWithoutStorage creates a Minus Directional Movement Indicator (MinusDm) without storage
func (*MinusDmWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *MinusDmWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (MinusDmWithoutStorage) UpdateIndicatorWithNewValue ¶
type Mom ¶
type Mom struct { *MomWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Momentum Indicator (Mom)
func NewDefaultMom ¶
NewDefaultMom creates a Momentum (Mom) for online usage with default parameters
- timePeriod: 10
- selectData: useClosePrice
func NewDefaultMomForStream ¶
func NewDefaultMomForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mom, err error)
NewDefaultMomForStream creates a Momentum (Mom) for online usage with a source data stream
func NewDefaultMomForStreamWithSrcLen ¶
func NewDefaultMomForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mom, err error)
NewDefaultMomForStreamWithSrcLen creates a Momentum (Mom) for offline usage with a source data stream
func NewDefaultMomWithSrcLen ¶
NewDefaultMomWithSrcLen creates a Momentum (Mom) for offline usage with default parameters
func NewMom ¶
func NewMom(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Mom, err error)
NewMom creates a Momentum (Mom) for online usage
func NewMomForStream ¶
func NewMomForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Mom, err error)
NewMomForStream creates a Momentum (Mom) for online usage with a source data stream
func NewMomForStreamWithSrcLen ¶
func NewMomForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Mom, err error)
NewMomForStreamWithSrcLen creates a Momentum (Mom) for offline usage with a source data stream
func NewMomWithSrcLen ¶
func NewMomWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Mom, err error)
NewMomWithSrcLen creates a Momentum (Mom) for offline usage
func (*Mom) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Mom) UpdateIndicatorWithNewValue ¶
type MomWithoutStorage ¶
type MomWithoutStorage struct {
// contains filtered or unexported fields
}
A Momentum Indicator (Mom), no storage, for use in other indicators
func NewMomWithoutStorage ¶
func NewMomWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *MomWithoutStorage, err error)
NewMomWithoutStorage creates a Momentum Indicator (Mom) without storage
func (*MomWithoutStorage) ReceiveTick ¶
func (ind *MomWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (MomWithoutStorage) UpdateIndicatorWithNewValue ¶
type Obv ¶
type Obv struct { *ObvWithoutStorage // public variables Data []float64 }
A On Balance Volume Indicator (Obv)
func NewObvForStream ¶
func NewObvForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Obv, err error)
NewObvForStream creates an On Balance Volume (Obv) for online usage with a source data stream
func NewObvForStreamWithSrcLen ¶
func NewObvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Obv, err error)
NewObvForStreamWithSrcLen creates an On Balance Volume (Obv) for offline usage with a source data stream
func NewObvWithSrcLen ¶
NewObvWithSrcLen creates an On Balance Volume (Obv) for offline usage
func (Obv) UpdateIndicatorWithNewValue ¶
type ObvWithoutStorage ¶
type ObvWithoutStorage struct {
// contains filtered or unexported fields
}
An On Balance Volume Indicator (Obv), no storage, for use in other indicators
func NewObvWithoutStorage ¶
func NewObvWithoutStorage(valueAvailableAction ValueAvailableActionFloat) (indicator *ObvWithoutStorage, err error)
NewObvWithoutStorage creates an On Balance Volume Indicator (Obv) without storage
func (*ObvWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *ObvWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (ObvWithoutStorage) UpdateIndicatorWithNewValue ¶
type PlusDi ¶
type PlusDi struct { *PlusDiWithoutStorage // public variables Data []float64 }
A Plus Directional Indicator (PlusDi)
func NewDefaultPlusDi ¶
NewDefaultPlusDi creates a Plus Directional Indicator (PlusDi) for online usage with default parameters
- timePeriod: 14
func NewDefaultPlusDiForStream ¶
func NewDefaultPlusDiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *PlusDi, err error)
NewDefaultPlusDiForStream creates a Plus Directional Indicator (PlusDi) for online usage with a source data stream
func NewDefaultPlusDiForStreamWithSrcLen ¶
func NewDefaultPlusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *PlusDi, err error)
NewDefaultPlusDiForStreamWithSrcLen creates a Plus Directional Indicator (PlusDi) for offline usage with a source data stream
func NewDefaultPlusDiWithSrcLen ¶
NewDefaultPlusDiWithSrcLen creates a Plus Directional Indicator (PlusDi) for offline usage with default parameters
func NewPlusDiForStream ¶
func NewPlusDiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDi, err error)
NewPlusDiForStream creates a Plus Directional Indicator (PlusDi) for online usage with a source data stream
func NewPlusDiForStreamWithSrcLen ¶
func NewPlusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDi, err error)
NewPlusDiForStreamWithSrcLen creates a Plus Directional Indicator (PlusDi) for offline usage with a source data stream
func NewPlusDiWithSrcLen ¶
NewPlusDiWithSrcLen creates a Plus Directional Indicator (PlusDi) for offline usage
func (PlusDi) UpdateIndicatorWithNewValue ¶
type PlusDiWithoutStorage ¶
type PlusDiWithoutStorage struct {
// contains filtered or unexported fields
}
A Plus Directional Indicator (PlusDi), no storage, for use in other indicators
func NewPlusDiWithoutStorage ¶
func NewPlusDiWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *PlusDiWithoutStorage, err error)
NewPlusDiWithoutStorage creates a Plus Directional Indicator (PlusDi) without storage
func (*PlusDiWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *PlusDiWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (PlusDiWithoutStorage) UpdateIndicatorWithNewValue ¶
type PlusDm ¶
type PlusDm struct { *PlusDmWithoutStorage // public variables Data []float64 }
A Plus Directional Movement Indicator (PlusDm)
func NewDefaultPlusDm ¶
NewDefaultPlusDm creates a Plus Directional Movement Indicator (PlusDm) for online usage with default parameters
- timePeriod: 14
func NewDefaultPlusDmForStream ¶
func NewDefaultPlusDmForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *PlusDm, err error)
NewDefaultPlusDmForStream creates a Plus Directional Movement Indicator (PlusDm) for online usage with a source data stream
func NewDefaultPlusDmForStreamWithSrcLen ¶
func NewDefaultPlusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *PlusDm, err error)
NewDefaultPlusDmForStreamWithSrcLen creates a Plus Directional Movement Indicator (PlusDm) for offline usage with a source data stream
func NewDefaultPlusDmWithSrcLen ¶
NewDefaultPlusDmWithSrcLen creates a Plus Directional Movement Indicator (PlusDm) for offline usage with default parameters
func NewPlusDmForStream ¶
func NewPlusDmForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDm, err error)
NewPlusDmForStream creates a Plus Directional Movement Indicator (PlusDm) for online usage with a source data stream
func NewPlusDmForStreamWithSrcLen ¶
func NewPlusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDm, err error)
NewPlusDmForStreamWithSrcLen creates a Plus Directional Movement Indicator (PlusDm) for offline usage with a source data stream
func NewPlusDmWithSrcLen ¶
NewPlusDmWithSrcLen creates a Plus Directional Movement Indicator (PlusDm) for offline usage
func (PlusDm) UpdateIndicatorWithNewValue ¶
type PlusDmWithoutStorage ¶
type PlusDmWithoutStorage struct {
// contains filtered or unexported fields
}
A Plus Directional Movement Indicator (PlusDm), no storage, for use in other indicators
func NewPlusDmWithoutStorage ¶
func NewPlusDmWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *PlusDmWithoutStorage, err error)
NewPlusDmWithoutStorage creates a Plus Directional Movement Indicator (PlusDm) without storage
func (*PlusDmWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *PlusDmWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (PlusDmWithoutStorage) UpdateIndicatorWithNewValue ¶
type Roc ¶
type Roc struct { *RocWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Rate of Change Indicator (Roc)
func NewDefaultRoc ¶
NewDefaultRoc creates a Rate of Change Indicator (Roc) for online usage with default parameters
- timePeriod: 10
func NewDefaultRocForStream ¶
func NewDefaultRocForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Roc, err error)
NewDefaultRocForStream creates a Rate of Change Indicator (Roc) for online usage with a source data stream
func NewDefaultRocForStreamWithSrcLen ¶
func NewDefaultRocForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Roc, err error)
NewDefaultRocForStreamWithSrcLen creates a Rate of Change Indicator (Roc) for offline usage with a source data stream
func NewDefaultRocWithSrcLen ¶
NewDefaultRocWithSrcLen creates a Rate of Change Indicator (Roc) for offline usage with default parameters
func NewRoc ¶
func NewRoc(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Roc, err error)
NewRoc creates a Rate of Change Indicator (Roc) for online usage
func NewRocForStream ¶
func NewRocForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Roc, err error)
NewRocForStream creates a Rate of Change Indicator (Roc) for online usage with a source data stream
func NewRocForStreamWithSrcLen ¶
func NewRocForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Roc, err error)
NewRocForStreamWithSrcLen creates a Rate of Change Indicator (Roc) for offline usage with a source data stream
func NewRocWithSrcLen ¶
func NewRocWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Roc, err error)
NewRocWithSrcLen creates a Rate of Change Indicator (Roc) for offline usage
func (*Roc) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Roc) UpdateIndicatorWithNewValue ¶
type RocP ¶
type RocP struct { *RocPWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Rate of Change Percentage Indicator (RocP)
func NewDefaultRocP ¶
NewDefaultRocP creates a Rate of Change Percentage Indicator (RocP) for online usage with default parameters
- timePeriod: 10
func NewDefaultRocPForStream ¶
func NewDefaultRocPForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocP, err error)
NewDefaultRocPForStream creates a Rate of Change Percentage Indicator (RocP) for online usage with a source data stream
func NewDefaultRocPForStreamWithSrcLen ¶
func NewDefaultRocPForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocP, err error)
NewDefaultRocPForStreamWithSrcLen creates a Rate of Change Percentage Indicator (RocP) for offline usage with a source data stream
func NewDefaultRocPWithSrcLen ¶
NewDefaultRocPWithSrcLen creates a Rate of Change Percentage Indicator (RocP) for offline usage with default parameters
func NewRocP ¶
func NewRocP(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocP, err error)
NewRocP creates a Rate of Change Percentage Indicator (RocP) for online usage
func NewRocPForStream ¶
func NewRocPForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocP, err error)
NewRocPForStream creates a Rate of Change Percentage Indicator (RocP) for online usage with a source data stream
func NewRocPForStreamWithSrcLen ¶
func NewRocPForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocP, err error)
NewRocPForStreamWithSrcLen creates a Rate of Change Percentage Indicator (RocP) for offline usage with a source data stream
func NewRocPWithSrcLen ¶
func NewRocPWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocP, err error)
NewRocPWithSrcLen creates a Rate of Change Percentage Indicator (RocP) for offline usage
func (*RocP) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (RocP) UpdateIndicatorWithNewValue ¶
type RocPWithoutStorage ¶
type RocPWithoutStorage struct {
// contains filtered or unexported fields
}
A Rate of Change Percentage Indicator (RocP), no storage, for use in other indicators
func NewRocPWithoutStorage ¶
func NewRocPWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *RocPWithoutStorage, err error)
NewRocPWithoutStorage creates a Rate of Change Percentage Indicator (RocP) without storage
func (*RocPWithoutStorage) ReceiveTick ¶
func (ind *RocPWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (RocPWithoutStorage) UpdateIndicatorWithNewValue ¶
type RocR ¶
type RocR struct { *RocRWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Rate of Change Ratio Indicator (RocR)
func NewDefaultRocR ¶
NewDefaultRocR creates a Rate of Change Ratio Indicator (RocR) for online usage with default parameters
- timePeriod: 10
func NewDefaultRocRForStream ¶
func NewDefaultRocRForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocR, err error)
NewDefaultRocRForStream creates a Rate of Change Ratio Indicator (RocR) for online usage with a source data stream
func NewDefaultRocRForStreamWithSrcLen ¶
func NewDefaultRocRForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocR, err error)
NewDefaultRocRForStreamWithSrcLen creates a Rate of Change Ratio Indicator (RocR) for offline usage with a source data stream
func NewDefaultRocRWithSrcLen ¶
NewDefaultRocRWithSrcLen creates a Rate of Change Ratio Indicator (RocR) for offline usage with default parameters
func NewRocR ¶
func NewRocR(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR, err error)
NewRocR creates a Rate of Change Ratio Indicator (RocR) for online usage
func NewRocRForStream ¶
func NewRocRForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR, err error)
NewRocRForStream creates a Rate of Change Ratio Indicator (RocR) for online usage with a source data stream
func NewRocRForStreamWithSrcLen ¶
func NewRocRForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR, err error)
NewRocRForStreamWithSrcLen creates a Rate of Change Ratio Indicator (RocR) for offline usage with a source data stream
func NewRocRWithSrcLen ¶
func NewRocRWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR, err error)
NewRocRWithSrcLen creates a Rate of Change Ratio Indicator (RocR) for offline usage
func (*RocR) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (RocR) UpdateIndicatorWithNewValue ¶
type RocR100 ¶
type RocR100 struct { *RocR100WithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Rate of Change Ratio Indicator (RocR)
func NewDefaultRocR100 ¶
/ NewDefaultRocR100 creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for online usage with default parameters
- timePeriod: 10
func NewDefaultRocR100ForStream ¶
func NewDefaultRocR100ForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocR100, err error)
NewDefaultRocR100ForStream creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for online usage with a source data stream
func NewDefaultRocR100ForStreamWithSrcLen ¶
func NewDefaultRocR100ForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocR100, err error)
NewDefaultRocR100ForStreamWithSrcLen creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for offline usage with a source data stream
func NewDefaultRocR100WithSrcLen ¶
NewDefaultRocR100WithSrcLen creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for offline usage with default parameters
func NewRocR100 ¶
func NewRocR100(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error)
NewRocR100 creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for online usage
func NewRocR100ForStream ¶
func NewRocR100ForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error)
NewRocR100ForStream creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for online usage with a source data stream
func NewRocR100ForStreamWithSrcLen ¶
func NewRocR100ForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error)
NewRocR100ForStreamWithSrcLen creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for offline usage with a source data stream
func NewRocR100WithSrcLen ¶
func NewRocR100WithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error)
NewRocR100WithSrcLen creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for offline usage
func (*RocR100) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (RocR100) UpdateIndicatorWithNewValue ¶
type RocR100WithoutStorage ¶
type RocR100WithoutStorage struct {
// contains filtered or unexported fields
}
A Rate of Change Ratio 100 Scale Indicator (RocR100), no storage, for use in other indicators
func NewRocR100WithoutStorage ¶
func NewRocR100WithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *RocR100WithoutStorage, err error)
NewRocR100WithoutStorage creates a Rate of Change Ratio 100 Scale Indicator (RocR100) without storage
func (*RocR100WithoutStorage) ReceiveTick ¶
func (ind *RocR100WithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (RocR100WithoutStorage) UpdateIndicatorWithNewValue ¶
type RocRWithoutStorage ¶
type RocRWithoutStorage struct {
// contains filtered or unexported fields
}
A Rate of Change Ratio Indicator (RocR), no storage, for use in other indicators
func NewRocRWithoutStorage ¶
func NewRocRWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *RocRWithoutStorage, err error)
NewRocRWithoutStorage creates a Rate of Change Ratio Indicator (RocR) without storage
func (*RocRWithoutStorage) ReceiveTick ¶
func (ind *RocRWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (RocRWithoutStorage) UpdateIndicatorWithNewValue ¶
type RocWithoutStorage ¶
type RocWithoutStorage struct {
// contains filtered or unexported fields
}
A Rate of Change Indicator (Roc), no storage, for use in other indicators
func NewRocWithoutStorage ¶
func NewRocWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *RocWithoutStorage, err error)
NewRocWithoutStorage creates a Rate of Change Indicator (Roc) without storage
func (*RocWithoutStorage) ReceiveTick ¶
func (ind *RocWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (RocWithoutStorage) UpdateIndicatorWithNewValue ¶
type Rsi ¶
type Rsi struct { *RsiWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Relative Strength Indicator (Rsi)
func NewDefaultRsi ¶
NewDefaultRsi creates a Relative Strength Indicator (Rsi) for online usage with default parameters
- timePeriod: 14
func NewDefaultRsiForStream ¶
func NewDefaultRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Rsi, err error)
NewDefaultRsiForStream creates a Relative Strength Indicator (Rsi) for online usage with a source data stream
func NewDefaultRsiForStreamWithSrcLen ¶
func NewDefaultRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Rsi, err error)
NewDefaultRsiForStreamWithSrcLen creates a Relative Strength Indicator (Rsi) for offline usage with a source data stream
func NewDefaultRsiWithSrcLen ¶
NewDefaultRsiWithSrcLen creates a Relative Strength Indicator (Rsi) for offline usage with default parameters
func NewRsi ¶
func NewRsi(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Rsi, err error)
NewRsi creates a Relative Strength Indicator (Rsi) for online usage
func NewRsiForStream ¶
func NewRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Rsi, err error)
NewRsiForStream creates a Relative Strength Indicator (Rsi) for online usage with a source data stream
func NewRsiForStreamWithSrcLen ¶
func NewRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Rsi, err error)
NewRsiForStreamWithSrcLen creates a Relative Strength Indicator (Rsi) for offline usage with a source data stream
func NewRsiWithSrcLen ¶
func NewRsiWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Rsi, err error)
NewRsiWithSrcLen creates a Relative Strength Indicator (Rsi) for offline usage
func (*Rsi) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Rsi) UpdateIndicatorWithNewValue ¶
type RsiWithoutStorage ¶
type RsiWithoutStorage struct {
// contains filtered or unexported fields
}
A Relative Strength Indicator (Rsi), no storage, for use in other indicators
func NewRsiWithoutStorage ¶
func NewRsiWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *RsiWithoutStorage, err error)
NewRsiWithoutStorage creates a Relative Strength Indicator (Rsi) without storage
func (*RsiWithoutStorage) ReceiveTick ¶
func (ind *RsiWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (RsiWithoutStorage) UpdateIndicatorWithNewValue ¶
type Sar ¶
type Sar struct { *SarWithoutStorage // public variables Data []float64 }
A Stop and Reverse Indicator (Sar)
func NewDefaultSar ¶
NewDefaultSar creates a Stop and Reverse Indicator (Sar) for online usage with default parameters
- accelerationFactor: 0.02
- accelerationFactorMax: 0.2
func NewDefaultSarForStream ¶
func NewDefaultSarForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sar, err error)
NewDefaultSarForStream creates a Stop and Reverse Indicator (Sar) for online usage with a source data stream
func NewDefaultSarForStreamWithSrcLen ¶
func NewDefaultSarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sar, err error)
NewDefaultSarForStreamWithSrcLen creates a Stop and Reverse Indicator (Sar) for offline usage with a source data stream
func NewDefaultSarWithSrcLen ¶
NewDefaultSarWithSrcLen creates a Stop and Reverse Indicator (Sar) for offline usage with default parameters
func NewSarForStream ¶
func NewSarForStream(priceStream gotrade.DOHLCVStreamSubscriber, accelerationFactor float64, accelerationFactorMax float64) (indicator *Sar, err error)
NewSarForStream creates a Stop and Reverse Indicator (Sar) for online usage with a source data stream
func NewSarForStreamWithSrcLen ¶
func NewSarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, accelerationFactor float64, accelerationFactorMax float64) (indicator *Sar, err error)
NewSarForStreamWithSrcLen creates a Stop and Reverse Indicator (Sar) for offline usage with a source data stream
func NewSarWithSrcLen ¶
func NewSarWithSrcLen(sourceLength uint, accelerationFactor float64, accelerationFactorMax float64) (indicator *Sar, err error)
NewSarWithSrcLen creates a Stop and Reverse Indicator (Sar) for offline usage
func (Sar) UpdateIndicatorWithNewValue ¶
type SarWithoutStorage ¶
type SarWithoutStorage struct {
// contains filtered or unexported fields
}
A Stop and Reverse Indicator (Sar), no storage, for use in other indicators
func NewSarWithoutStorage ¶
func NewSarWithoutStorage(accelerationFactor float64, accelerationFactorMax float64, valueAvailableAction ValueAvailableActionFloat) (indicator *SarWithoutStorage, err error)
func (*SarWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *SarWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (SarWithoutStorage) UpdateIndicatorWithNewValue ¶
type Sma ¶
type Sma struct { *SmaWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Simple Moving Average Indicator (Sma)
func NewDefaultSma ¶
NewDefaultSma creates a Simple Moving Average Indicator (Sma) for online usage with default parameters
- timePeriod: 10
func NewDefaultSmaForStream ¶
func NewDefaultSmaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sma, err error)
NewDefaultSmaForStream creates a Simple Moving Average Indicator (Sma) for online usage with a source data stream
func NewDefaultSmaForStreamWithSrcLen ¶
func NewDefaultSmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sma, err error)
NewDefaultSmaForStreamWithSrcLen creates a Simple Moving Average Indicator (Sma) for offline usage with a source data stream
func NewDefaultSmaWithSrcLen ¶
NewDefaultSmaWithSrcLen creates a Simple Moving Average Indicator (Sma) for offline usage with default parameters
func NewSma ¶
func NewSma(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Sma, err error)
NewSma creates a Simple Moving Average Indicator (Sma) for online usage
func NewSmaForStream ¶
func NewSmaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Sma, err error)
NewSmaForStream creates a Simple Moving Average Indicator (Sma) for online usage with a source data stream
func NewSmaForStreamWithSrcLen ¶
func NewSmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Sma, err error)
NewSmaForStreamWithSrcLen creates a Simple Moving Average Indicator (Sma) for offline usage with a source data stream
func NewSmaWithSrcLen ¶
func NewSmaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Sma, err error)
NewSmaWithSrcLen creates a Simple Moving Average Indicator (Sma) for offline usage
func (*Sma) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Sma) UpdateIndicatorWithNewValue ¶
type SmaWithoutStorage ¶
type SmaWithoutStorage struct {
// contains filtered or unexported fields
}
A Simple Moving Average Indicator (Sma), no storage, for use in other indicators
func NewSmaWithoutStorage ¶
func NewSmaWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *SmaWithoutStorage, err error)
NewSmaWithoutStorage creates a Simple Moving Average Indicator (Sma) without storage
func (*SmaWithoutStorage) ReceiveTick ¶
func (ind *SmaWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (SmaWithoutStorage) UpdateIndicatorWithNewValue ¶
type StdDev ¶
type StdDev struct { *StdDevWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Standard Deviation Indicator (StdDev)
func NewDefaultStdDev ¶
NewDefaultStdDev creates a Standard Deviation Indicator (StdDev) for online usage with default parameters
- timePeriod: 10
func NewDefaultStdDevForStream ¶
func NewDefaultStdDevForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StdDev, err error)
NewDefaultStdDevForStream creates a Standard Deviation Indicator (StdDev) for online usage with a source data stream
func NewDefaultStdDevForStreamWithSrcLen ¶
func NewDefaultStdDevForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StdDev, err error)
NewDefaultStdDevForStreamWithSrcLen creates a Standard Deviation Indicator (StdDev) for offline usage with a source data stream
func NewDefaultStdDevWithSrcLen ¶
NewDefaultStdDevWithSrcLen creates a Standard Deviation Indicator (StdDev) for offline usage with default parameters
func NewStdDev ¶
func NewStdDev(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *StdDev, err error)
NewStdDev creates a Standard Deviation Indicator (StdDev) for online usage
func NewStdDevForStream ¶
func NewStdDevForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *StdDev, err error)
NewStdDevForStream creates a Standard Deviation Indicator (StdDev) for online usage with a source data stream
func NewStdDevForStreamWithSrcLen ¶
func NewStdDevForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *StdDev, err error)
NewStdDevForStreamWithSrcLen creates a Standard Deviation Indicator (StdDev) for offline usage with a source data stream
func NewStdDevWithSrcLen ¶
func NewStdDevWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *StdDev, err error)
NewStdDevWithSrcLen creates a Standard Deviation Indicator (StdDev) for offline usage
func (*StdDev) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (StdDev) UpdateIndicatorWithNewValue ¶
type StdDevWithoutStorage ¶
type StdDevWithoutStorage struct {
// contains filtered or unexported fields
}
A Standard Deviation Indicator (StdDev), no storage, for use in other indicators
func NewStdDevWithoutStorage ¶
func NewStdDevWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *StdDevWithoutStorage, err error)
func (*StdDevWithoutStorage) ReceiveTick ¶
func (stdDev *StdDevWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (StdDevWithoutStorage) UpdateIndicatorWithNewValue ¶
type StochOsc ¶
type StochOsc struct { *StochOscWithoutStorage // public variables SlowK []float64 SlowD []float64 }
A Stochastic Oscillator Indicator (StochOsc)
func NewDefaultStochOsc ¶
NewDefaultStochOsc creates a Stochastic Oscillator Indicator (StochOsc) for online usage with default parameters
- fastKTimePeriod : 5
- slowKTimePeriod : 3
- slowDTimePeriod : 3
func NewDefaultStochOscForStream ¶
func NewDefaultStochOscForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochOsc, err error)
NewDefaultStochOscForStream creates a Stochastic Oscillator Indicator (StochOsc) for online usage with a source data stream
func NewDefaultStochOscForStreamWithSrcLen ¶
func NewDefaultStochOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochOsc, err error)
NewDefaultStochOscForStreamWithSrcLen creates a Stochastic Oscillator Indicator (StochOsc) for offline usage with a source data stream
func NewDefaultStochOscWithSrcLen ¶
NewDefaultStochOscWithSrcLen creates a Stochastic Oscillator Indicator (StochOsc) for offline usage with default parameters
func NewStochOsc ¶
func NewStochOsc(fastKTimePeriod int, slowKTimePeriod int, slowDTimePeriod int) (indicator *StochOsc, err error)
NewStochOsc creates a Stochastic Oscillator Indicator (StochOsc) for online usage
func NewStochOscForStream ¶
func NewStochOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, fastKTimePeriod int, slowKTimePeriod int, slowDTimePeriod int) (indicator *StochOsc, err error)
NewStochOscForStream creates a Stochastic Oscillator Indicator (StochOsc) for online usage with a source data stream
func NewStochOscForStreamWithSrcLen ¶
func NewStochOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, fastKTimePeriod int, slowKTimePeriod int, slowDTimePeriod int) (indicator *StochOsc, err error)
NewStochOscForStreamWithSrcLen creates a Stochastic Oscillator Indicator (StochOsc) for offline usage with a source data stream
func NewStochOscWithSrcLen ¶
func NewStochOscWithSrcLen(sourceLength uint, fastKTimePeriod int, slowKTimePeriod int, slowDTimePeriod int) (indicator *StochOsc, err error)
NewStochOscWithSrcLen creates a Stochastic Oscillator Indicator (StochOsc) for offline usage
func (StochOsc) UpdateIndicatorWithNewValue ¶
type StochOscWithoutStorage ¶
type StochOscWithoutStorage struct {
// contains filtered or unexported fields
}
A Stochastic Oscillator Indicator (StochOsc), no storage, for use in other indicators
func NewStochOscWithoutStorage ¶
func NewStochOscWithoutStorage(fastKTimePeriod int, slowKTimePeriod int, slowDTimePeriod int, valueAvailableAction ValueAvailableActionStoch) (indicator *StochOscWithoutStorage, err error)
NewStochOscWithoutStorage creates a Stochastic Oscillator Indicator (StochOsc) without storage
func (*StochOscWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *StochOscWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (StochOscWithoutStorage) UpdateIndicatorWithNewValue ¶
type StochRsi ¶
type StochRsi struct { *StochRsiWithoutStorage // public variables SlowK []float64 SlowD []float64 }
A Stochastic Relative Strength Indicator (StochRsi)
func NewDefaultStochRsi ¶
NewDefaultStochRsi creates a Stochastic Relative Strength Indicator (StochRsi) for online usage with default parameters
- timePeriod : 14
- fastKTimePeriod : 5
- fastDTimePeriod : 3
func NewDefaultStochRsiForStream ¶
func NewDefaultStochRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochRsi, err error)
NewDefaultStochRsiForStream creates a Stochastic Relative Strength Indicator (StochRsi) for online usage with a source data stream
func NewDefaultStochRsiForStreamWithSrcLen ¶
func NewDefaultStochRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochRsi, err error)
NewDefaultStochRsiForStreamWithSrcLen creates a Stochastic Relative Strength Indicator (StochRsi) for offline usage with a source data stream
func NewDefaultStochRsiWithSrcLen ¶
NewDefaultStochRsiWithSrcLen creates a Stochastic Relative Strength Indicator (StochRsi) for offline usage with default parameters
func NewStochRsi ¶
func NewStochRsi(timePeriod int, fastKTimePeriod int, fastDTimePeriod int) (indicator *StochRsi, err error)
NewStochRsi creates a Stochastic Relative Strength Indicator (StochRsi) for online usage
func NewStochRsiForStream ¶
func NewStochRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, fastKTimePeriod int, fastDTimePeriod int) (indicator *StochRsi, err error)
NewStochRsiForStream creates a Stochastic Relative Strength Indicator (StochRsi) for online usage with a source data stream
func NewStochRsiForStreamWithSrcLen ¶
func NewStochRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, fastKTimePeriod int, fastDTimePeriod int) (indicator *StochRsi, err error)
NewStochRsiForStreamWithSrcLen creates a Stochastic Relative Strength Indicator (StochRsi) for offline usage with a source data stream
func NewStochRsiWithSrcLen ¶
func NewStochRsiWithSrcLen(sourceLength uint, timePeriod int, fastKTimePeriod int, fastDTimePeriod int) (indicator *StochRsi, err error)
NewStochRsiWithSrcLen creates a Stochastic Relative Strength Indicator (StochRsi) for offline usage
func (StochRsi) UpdateIndicatorWithNewValue ¶
type StochRsiWithoutStorage ¶
type StochRsiWithoutStorage struct {
// contains filtered or unexported fields
}
A Stochastic Relative Strength Indicator (StochRsi), no storage, for use in other indicators
func NewStochRsiWithoutStorage ¶
func NewStochRsiWithoutStorage(timePeriod int, fastKTimePeriod int, fastDTimePeriod int, valueAvailableAction ValueAvailableActionStoch) (indicator *StochRsiWithoutStorage, err error)
NewStochRsiWithoutStorage creates a Stochastic Relative Strength Indicator (StochRsi) without storage
func (*StochRsiWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *StochRsiWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (StochRsiWithoutStorage) UpdateIndicatorWithNewValue ¶
type Tema ¶
type Tema struct { *TemaWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Tripple Exponential Moving Average Indicator (Tema)
func NewDefaultTema ¶
NewDefaultTema creates a Tripple Exponential Moving Average Indicator (Tema) for online usage with default parameters
- timePeriod: 30
func NewDefaultTemaForStream ¶
func NewDefaultTemaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Tema, err error)
NewDefaultTemaForStream creates a Tripple Exponential Moving Average Indicator (Tema) for online usage with a source data stream
func NewDefaultTemaForStreamWithSrcLen ¶
func NewDefaultTemaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Tema, err error)
NewDefaultTemaForStreamWithSrcLen creates a Tripple Exponential Moving Average Indicator (Tema) for offline usage with a source data stream
func NewDefaultTemaWithSrcLen ¶
NewDefaultTemaWithSrcLen creates a Tripple Exponential Moving Average Indicator (Tema) for offline usage with default parameters
func NewTema ¶
func NewTema(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tema, err error)
NewTema creates a Tripple Exponential Moving Average Indicator (Tema) for online usage
func NewTemaForStream ¶
func NewTemaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tema, err error)
NewTemaForStream creates a Tripple Exponential Moving Average Indicator (Tema) for online usage with a source data stream
func NewTemaForStreamWithSrcLen ¶
func NewTemaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tema, err error)
NewTemaForStreamWithSrcLen creates a Tripple Exponential Moving Average Indicator (Tema) for offline usage with a source data stream
func NewTemaWithSrcLen ¶
func NewTemaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tema, err error)
NewTemaWithSrcLen creates a Tripple Exponential Moving Average Indicator (Tema) for offline usage
func (*Tema) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Tema) UpdateIndicatorWithNewValue ¶
type TemaWithoutStorage ¶
type TemaWithoutStorage struct {
// contains filtered or unexported fields
}
A Tripple Exponential Moving Average Indicator (Tema), no storage, for use in other indicators
func NewTemaWithoutStorage ¶
func NewTemaWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *TemaWithoutStorage, err error)
func (*TemaWithoutStorage) ReceiveTick ¶
func (ind *TemaWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (TemaWithoutStorage) UpdateIndicatorWithNewValue ¶
type Trima ¶
type Trima struct { *TrimaWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Triangular Moving Average Indicator (Trima)
func NewDefaultTrima ¶
NewDefaultTrima creates a Triangular Moving Average Indicator (Trima) for online usage with default parameters
- timePeriod: 30
func NewDefaultTrimaForStream ¶
func NewDefaultTrimaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Trima, err error)
NewDefaultTrimaForStream creates a Triangular Moving Average Indicator (Trima) for online usage with a source data stream
func NewDefaultTrimaForStreamWithSrcLen ¶
func NewDefaultTrimaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Trima, err error)
NewDefaultTrimaForStreamWithSrcLen creates a Triangular Moving Average Indicator (Trima) for offline usage with a source data stream
func NewDefaultTrimaWithSrcLen ¶
NewDefaultTrimaWithSrcLen creates a Triangular Moving Average Indicator (Trima) for offline usage with default parameters
func NewTrima ¶
func NewTrima(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Trima, err error)
NewTrima creates a Triangular Moving Average Indicator (Trima) for online usage
func NewTrimaForStream ¶
func NewTrimaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Trima, err error)
NewTrimaForStream creates a Triangular Moving Average Indicator (Trima) for online usage with a source data stream
func NewTrimaForStreamWithSrcLen ¶
func NewTrimaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Trima, err error)
NewTrimaForStreamWithSrcLen creates a Triangular Moving Average Indicator (Trima) for offline usage with a source data stream
func NewTrimaWithSrcLen ¶
func NewTrimaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Trima, err error)
NewTrimaWithSrcLen creates a Triangular Moving Average Indicator (Trima) for offline usage
func (*Trima) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Trima) UpdateIndicatorWithNewValue ¶
type TrimaWithoutStorage ¶
type TrimaWithoutStorage struct {
// contains filtered or unexported fields
}
A Triangular Moving Average Indicator (Trima), no storage, for use in other indicators
func NewTrimaWithoutStorage ¶
func NewTrimaWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *TrimaWithoutStorage, err error)
NewTrimaWithoutStorage creates a Triangular Moving Average Indicator (Trima) without storage
func (*TrimaWithoutStorage) ReceiveTick ¶
func (tema *TrimaWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (TrimaWithoutStorage) UpdateIndicatorWithNewValue ¶
type TrueRange ¶
type TrueRange struct { *TrueRangeWithoutStorage // public variables Data []float64 }
A True Range Indicator (TrueRange)
func NewTrueRange ¶
NewTrueRange creates a True Range Indicator (TrueRange) for online usage
func NewTrueRangeForStream ¶
func NewTrueRangeForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TrueRange, err error)
NewTrueRangeForStream creates a True Range Indicator (TrueRange) for online usage with a source data stream
func NewTrueRangeForStreamWithSrcLen ¶
func NewTrueRangeForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TrueRange, err error)
NewTrueRangeForStreamWithSrcLen creates a True Range Indicator (TrueRange) for offline usage with a source data stream
func NewTrueRangeWithSrcLen ¶
NewTrueRangeWithSrcLen creates a True Range Indicator (TrueRange) for offline usage
func (TrueRange) UpdateIndicatorWithNewValue ¶
type TrueRangeWithoutStorage ¶
type TrueRangeWithoutStorage struct {
// contains filtered or unexported fields
}
A True Range Indicator (TrueRange), no storage, for use in other indicators
func NewTrueRangeWithoutStorage ¶
func NewTrueRangeWithoutStorage(valueAvailableAction ValueAvailableActionFloat) (indicator *TrueRangeWithoutStorage, err error)
NewTrueRangeWithoutStorage creates a True Range Indicator (TrueRange) without storage
func (*TrueRangeWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *TrueRangeWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (TrueRangeWithoutStorage) UpdateIndicatorWithNewValue ¶
type Tsf ¶
type Tsf struct { *LinRegWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Time Series Forecast Indicator (Tsf)
func NewDefaultTsf ¶
NewDefaultTsf creates a Time Series Forecast Indicator (Tsf) for online usage with default parameters
- timePeriod: 10
func NewDefaultTsfForStream ¶
func NewDefaultTsfForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Tsf, err error)
NewDefaultTsfForStream creates a Time Series Forecast Indicator (Tsf) for online usage with a source data stream
func NewDefaultTsfForStreamWithSrcLen ¶
func NewDefaultTsfForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Tsf, err error)
NewDefaultTsfForStreamWithSrcLen creates a Time Series Forecast Indicator (Tsf) for offline usage with a source data stream
func NewDefaultTsfWithSrcLen ¶
NewDefaultTsfWithSrcLen creates a Time Series Forecast Indicator (Tsf) for offline usage with default parameters
func NewTsf ¶
func NewTsf(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tsf, err error)
NewTsf creates a Time Series Forecast Indicator (Tsf) for online usage
func NewTsfForStream ¶
func NewTsfForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tsf, err error)
NewTsfForStream creates a Time Series Forecast Indicator (Tsf) for online usage with a source data stream
func NewTsfForStreamWithSrcLen ¶
func NewTsfForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tsf, err error)
NewTsfForStreamWithSrcLen creates a Time Series Forecast Indicator (Tsf) for offline usage with a source data stream
func NewTsfWithSrcLen ¶
func NewTsfWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tsf, err error)
NewTsfWithSrcLen creates a Time Series Forecast Indicator (Tsf) for offline usage
func (Tsf) GetLookbackPeriod ¶
func (ind Tsf) GetLookbackPeriod() int
func (Tsf) IncDataLength ¶
func (ind Tsf) IncDataLength()
func (*Tsf) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Tsf) SetValidFromBar ¶
func (ind Tsf) SetValidFromBar(streamBarIndex int)
func (Tsf) UpdateMinMax ¶
func (Tsf) ValidFromBar ¶
func (ind Tsf) ValidFromBar() int
type TypPrice ¶
type TypPrice struct { *TypPriceWithoutStorage // public variables Data []float64 }
A Typical Price Indicator (TypPrice)
func NewTypPrice ¶
NewTypPrice creates a Typical Price Indicator (TypPrice) for online usage
func NewTypPriceForStream ¶
func NewTypPriceForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TypPrice, err error)
NewTypPriceForStream creates a Typical Price Indicator (TypPrice) for online usage with a source data stream
func NewTypPriceForStreamWithSrcLen ¶
func NewTypPriceForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TypPrice, err error)
NewTypPriceForStreamWithSrcLen creates a Typical Price Indicator (TypPrice) for offline usage with a source data stream
func NewTypPriceWithSrcLen ¶
NewTypPriceWithSrcLen creates a Typical Price Indicator (TypPrice) for offline usage
func (TypPrice) UpdateIndicatorWithNewValue ¶
type TypPriceWithoutStorage ¶
type TypPriceWithoutStorage struct {
// contains filtered or unexported fields
}
func NewTypPriceWithoutStorage ¶
func NewTypPriceWithoutStorage(valueAvailableAction ValueAvailableActionFloat) (indicator *TypPriceWithoutStorage, err error)
func (*TypPriceWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *TypPriceWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (TypPriceWithoutStorage) UpdateIndicatorWithNewValue ¶
type ValueAvailableActionInt ¶
type Var ¶
type Var struct { *VarWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Variance Indicator (Var)
func NewDefaultVar ¶
NewDefaultVar creates a Variance Indicator (Var) for online usage with default parameters
- timePeriod: 10
func NewDefaultVarForStream ¶
func NewDefaultVarForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Var, err error)
NewDefaultVarForStream creates a Variance Indicator (Var) for online usage with a source data stream
func NewDefaultVarForStreamWithSrcLen ¶
func NewDefaultVarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Var, err error)
NewDefaultVarForStreamWithSrcLen creates a Variance Indicator (Var) for offline usage with a source data stream
func NewDefaultVarWithSrcLen ¶
NewDefaultVarWithSrcLen creates a Variance Indicator (Var) for offline usage with default parameters
func NewVar ¶
func NewVar(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Var, err error)
NewVar creates a Variance Indicator (Var) for online usage
func NewVarForStream ¶
func NewVarForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Var, err error)
NewVarForStream creates a Variance Indicator (Var) for online usage with a source data stream
func NewVarForStreamWithSrcLen ¶
func NewVarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Var, err error)
NewVarForStreamWithSrcLen creates a Variance Indicator (Var) for offline usage with a source data stream
func NewVarWithSrcLen ¶
func NewVarWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Var, err error)
NewVarWithSrcLen creates a Variance Indicator (Var) for offline usage
func (*Var) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Var) UpdateIndicatorWithNewValue ¶
type VarWithoutStorage ¶
type VarWithoutStorage struct {
// contains filtered or unexported fields
}
A Variance Indicator (Var), no storage, for use in other indicators
func NewVarWithoutStorage ¶
func NewVarWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *VarWithoutStorage, err error)
NewVarWithoutStorage creates a Variance Indicator (Var) without storage
func (*VarWithoutStorage) ReceiveTick ¶
func (ind *VarWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance - Knuth
func (VarWithoutStorage) UpdateIndicatorWithNewValue ¶
type WillR ¶
type WillR struct { *WillRWithoutStorage // public variables Data []float64 }
A Simple Moving Average Indicator
func NewDefaultWillR ¶
NewDefaultWillR creates a Williams Percent R Indicator (WillR) for online usage with default parameters
- timePeriod: 14
func NewDefaultWillRForStream ¶
func NewDefaultWillRForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *WillR, err error)
NewDefaultWillRForStream creates a Williams Percent R Indicator (WillR) for online usage with a source data stream
func NewDefaultWillRForStreamWithSrcLen ¶
func NewDefaultWillRForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *WillR, err error)
NewDefaultWillRForStreamWithSrcLen creates a Williams Percent R Indicator (WillR) for offline usage with a source data stream
func NewDefaultWillRWithSrcLen ¶
NewDefaultWillRWithSrcLen creates a Williams Percent R Indicator (WillR) for offline usage with default parameters
func NewWillRForStream ¶
func NewWillRForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *WillR, err error)
NewWillRForStream creates a Williams Percent R Indicator (WillR) for online usage with a source data stream
func NewWillRForStreamWithSrcLen ¶
func NewWillRForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *WillR, err error)
NewWillRForStreamWithSrcLen creates a Williams Percent R Indicator (WillR) for offline usage with a source data stream
func NewWillRWithSrcLen ¶
NewWillRWithSrcLen creates a Williams Percent R Indicator (WillR) for offline usage
func (WillR) UpdateIndicatorWithNewValue ¶
type WillRWithoutStorage ¶
type WillRWithoutStorage struct {
// contains filtered or unexported fields
}
A Williamns Percent R Indicator
func NewWillRWithoutStorage ¶
func NewWillRWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *WillRWithoutStorage, err error)
NewWillRWithoutStorage creates a Williams Percent R Indicator (WillR) without storage
func (*WillRWithoutStorage) ReceiveDOHLCVTick ¶
func (ind *WillRWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int)
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (WillRWithoutStorage) UpdateIndicatorWithNewValue ¶
type Wma ¶
type Wma struct { *WmaWithoutStorage // public variables Data []float64 // contains filtered or unexported fields }
A Weighted Moving Average Indicator (Wma)
func NewDefaultWma ¶
NewDefaultWma creates a Weighted Moving Average Indicator (Wma) for online usage with default parameters
- timePeriod: 10
func NewDefaultWmaForStream ¶
func NewDefaultWmaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Wma, err error)
NewDefaultWmaForStream creates a Weighted Moving Average Indicator (Wma) for online usage with a source data stream
func NewDefaultWmaForStreamWithSrcLen ¶
func NewDefaultWmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Wma, err error)
NewDefaultWmaForStreamWithSrcLen creates a Weighted Moving Average Indicator (Wma) for offline usage with a source data stream
func NewDefaultWmaWithSrcLen ¶
NewDefaultWmaWithSrcLen creates a Weighted Moving Average Indicator (Wma) for offline usage with default parameters
func NewWma ¶
func NewWma(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Wma, err error)
NewWma creates a Weighted Moving Average Indicator (Wma) for online usage
func NewWmaForStream ¶
func NewWmaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Wma, err error)
NewWmaForStream creates a Weighted Moving Average Indicator (Wma) for online usage with a source data stream
func NewWmaForStreamWithSrcLen ¶
func NewWmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Wma, err error)
NewWmaForStreamWithSrcLen creates a Weighted Moving Average Indicator (Wma) for offline usage with a source data stream
func NewWmaWithSrcLen ¶
func NewWmaWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Wma, err error)
NewWmaWithSrcLen creates a Weighted Moving Average Indicator (Wma) for offline usage
func (*Wma) ReceiveDOHLCVTick ¶
ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (Wma) UpdateIndicatorWithNewValue ¶
type WmaWithoutStorage ¶
type WmaWithoutStorage struct {
// contains filtered or unexported fields
}
A Weighted Moving Average Indicator (Wma), no storage, for use in other indicators
func NewWmaWithoutStorage ¶
func NewWmaWithoutStorage(timePeriod int, valueAvailableAction ValueAvailableActionFloat) (indicator *WmaWithoutStorage, err error)
NewWmaWithoutStorage creates a Weighted Moving Average Indicator (Wma) without storage
func (*WmaWithoutStorage) ReceiveTick ¶
func (ind *WmaWithoutStorage) ReceiveTick(tickData float64, streamBarIndex int)
func (WmaWithoutStorage) UpdateIndicatorWithNewValue ¶
Source Files ¶
- adl.go
- adx.go
- adxr.go
- aroon.go
- aroonosc.go
- atr.go
- avgprice.go
- bollingerbands.go
- cci.go
- chainkinosc.go
- dema.go
- dx.go
- ema.go
- hhv.go
- hhvbars.go
- indicators.go
- kama.go
- linreg.go
- linregang.go
- linregint.go
- linregslp.go
- llv.go
- llvbars.go
- macd.go
- medprice.go
- mfi.go
- minusdi.go
- minusdm.go
- momentum.go
- obv.go
- plusdi.go
- plusdm.go
- roc.go
- rocp.go
- rocr.go
- rocr100.go
- rsi.go
- sar.go
- sma.go
- stddev.go
- stochosc.go
- stochrsi.go
- tema.go
- trima.go
- truerange.go
- tsf.go
- typprice.go
- var.go
- willr.go
- wma.go