本文整理汇总了Golang中github.com/thetruetrade/gotrade.DOHLCVStreamSubscriber类的典型用法代码示例。如果您正苦于以下问题:Golang DOHLCVStreamSubscriber类的具体用法?Golang DOHLCVStreamSubscriber怎么用?Golang DOHLCVStreamSubscriber使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DOHLCVStreamSubscriber类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: NewStochOscForStream
// NewStochOscForStream creates a Stochastic Oscillator Indicator (StochOsc) for online usage with a source data stream
func NewStochOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, fastKTimePeriod int, slowKTimePeriod int, slowDTimePeriod int) (indicator *StochOsc, err error) {
ind, err := NewStochOsc(fastKTimePeriod, slowKTimePeriod, slowDTimePeriod)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:stochosc.go
示例2: NewStochOscForStreamWithSrcLen
// NewStochOscForStreamWithSrcLen creates a Stochastic Oscillator Indicator (StochOsc) for offline usage with a source data stream
func NewStochOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, fastKTimePeriod int, slowKTimePeriod int, slowDTimePeriod int) (indicator *StochOsc, err error) {
ind, err := NewStochOscWithSrcLen(sourceLength, fastKTimePeriod, slowKTimePeriod, slowDTimePeriod)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:stochosc.go
示例3: NewMacdForStreamWithSrcLen
// NewMacdForStreamWithSrcLen creates a Moving Average Convergence Divergence Indicator (Macd) for offline usage with a source data stream
func NewMacdForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, fastTimePeriod int, slowTimePeriod int, signalTimePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Macd, err error) {
ind, err := NewMacdWithSrcLen(sourceLength, fastTimePeriod, slowTimePeriod, signalTimePeriod, selectData)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:macd.go
示例4: NewAroonOscForStream
// NewAroonOscForStream creates an Aroon Oscillator (AroonOsc) for online usage with a source data stream
func NewAroonOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *AroonOsc, err error) {
ind, err := NewAroonOsc(timePeriod)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:aroonosc.go
示例5: NewRsiForStreamWithSrcLen
// NewRsiForStreamWithSrcLen creates a Relative Strength Indicator (Rsi) for offline usage with a source data stream
func NewRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Rsi, err error) {
ind, err := NewRsiWithSrcLen(sourceLength, timePeriod, selectData)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:rsi.go
示例6: NewChaikinOscForStream
// NewChaikinOscForStream creates a Chaikin Oscillator (ChaikinOsc) for online usage with a source data stream
func NewChaikinOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, fastTimePeriod int, slowTimePeriod int) (indicator *ChaikinOsc, err error) {
newChaikinOsc, err := NewChaikinOsc(fastTimePeriod, slowTimePeriod)
priceStream.AddTickSubscription(newChaikinOsc)
return newChaikinOsc, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:chainkinosc.go
示例7: NewSarForStreamWithSrcLen
// NewSarForStreamWithSrcLen creates a Stop and Reverse Indicator (Sar) for offline usage with a source data stream
func NewSarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, accelerationFactor float64, accelerationFactorMax float64) (indicator *Sar, err error) {
ind, err := NewSarWithSrcLen(sourceLength, accelerationFactor, accelerationFactorMax)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:sar.go
示例8: NewPlusDmForStreamWithSrcLen
// NewPlusDmForStreamWithSrcLen creates a Plus Directional Movement Indicator (PlusDm) for offline usage with a source data stream
func NewPlusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDm, err error) {
ind, err := NewPlusDmWithSrcLen(sourceLength, timePeriod)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:plusdm.go
示例9: NewDefaultBollingerBandsForStream
// NewDefaultBollingerBandsForStream creates a Bollinger Bands Indicator (BollingerBand) for online usage with a source data stream
func NewDefaultBollingerBandsForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *BollingerBands, err error) {
ind, err := NewDefaultBollingerBands()
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:bollingerbands.go
示例10: NewSarForStream
// NewSarForStream creates a Stop and Reverse Indicator (Sar) for online usage with a source data stream
func NewSarForStream(priceStream gotrade.DOHLCVStreamSubscriber, accelerationFactor float64, accelerationFactorMax float64) (indicator *Sar, err error) {
ind, err := NewSar(accelerationFactor, accelerationFactorMax)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:sar.go
示例11: NewDemaForStream
// NewDemaForStream creates a Double Exponential Moving Average (Dema) for online usage with a source data stream
func NewDemaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Dema, err error) {
newDema, err := NewDema(timePeriod, selectData)
priceStream.AddTickSubscription(newDema)
return newDema, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:dema.go
示例12: NewObvForStream
// NewObvForStream creates an On Balance Volume (Obv) for online usage with a source data stream
func NewObvForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Obv, err error) {
ind, err := NewObv()
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:obv.go
示例13: NewDefaultChaikinOscForStream
// NewDefaultChaikinOscForStream creates a Chaikin Oscillator (ChaikinOsc) for online usage with a source data stream
func NewDefaultChaikinOscForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *ChaikinOsc, err error) {
ind, err := NewDefaultChaikinOsc()
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:chainkinosc.go
示例14: NewRocForStream
// NewRocForStream creates a Rate of Change Indicator (Roc) for online usage with a source data stream
func NewRocForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Roc, err error) {
ind, err := NewRoc(timePeriod, selectData)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:roc.go
示例15: NewTrueRangeForStream
// NewTrueRangeForStream creates a True Range Indicator (TrueRange) for online usage with a source data stream
func NewTrueRangeForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TrueRange, err error) {
ind, err := NewTrueRange()
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:truerange.go
示例16: NewPlusDmForStream
// NewPlusDmForStream creates a Plus Directional Movement Indicator (PlusDm) for online usage with a source data stream
func NewPlusDmForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDm, err error) {
ind, err := NewPlusDm(timePeriod)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:plusdm.go
示例17: NewTrueRangeForStreamWithSrcLen
// NewTrueRangeForStreamWithSrcLen creates a True Range Indicator (TrueRange) for offline usage with a source data stream
func NewTrueRangeForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TrueRange, err error) {
ind, err := NewTrueRangeWithSrcLen(sourceLength)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:truerange.go
示例18: NewDefaultRsiForStream
// NewDefaultRsiForStream creates a Relative Strength Indicator (Rsi) for online usage with a source data stream
func NewDefaultRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Rsi, err error) {
ind, err := NewDefaultRsi()
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:rsi.go
示例19: NewDefaultLinRegIntForStream
// NewDefaultLinRegIntForStream creates a Linear Regression Intercept Indicator (LinRegInt) for online usage with a source data stream
func NewDefaultLinRegIntForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegInt, err error) {
ind, err := NewDefaultLinRegInt()
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:linregint.go
示例20: NewDefaultRsiForStreamWithSrcLen
// NewDefaultRsiForStreamWithSrcLen creates a Relative Strength Indicator (Rsi) for offline usage with a source data stream
func NewDefaultRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Rsi, err error) {
ind, err := NewDefaultRsiWithSrcLen(sourceLength)
priceStream.AddTickSubscription(ind)
return ind, err
}
开发者ID:jmptrader,项目名称:gotrade,代码行数:6,代码来源:rsi.go
注:本文中的github.com/thetruetrade/gotrade.DOHLCVStreamSubscriber类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论