当前位置: 首页>>代码示例>>Golang>>正文


Golang DOHLCVStreamSubscriber.AddTickSubscription方法代码示例

本文整理汇总了Golang中github.com/thetruetrade/gotrade.DOHLCVStreamSubscriber.AddTickSubscription方法的典型用法代码示例。如果您正苦于以下问题:Golang DOHLCVStreamSubscriber.AddTickSubscription方法的具体用法?Golang DOHLCVStreamSubscriber.AddTickSubscription怎么用?Golang DOHLCVStreamSubscriber.AddTickSubscription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/thetruetrade/gotrade.DOHLCVStreamSubscriber的用法示例。


在下文中一共展示了DOHLCVStreamSubscriber.AddTickSubscription方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的github.com/thetruetrade/gotrade.DOHLCVStreamSubscriber.AddTickSubscription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。