// NewRocR100ForStreamWithSrcLen creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for offline usage with a source data stream
403
func NewRocR100ForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error) {
	ind, err := NewRocR100WithSrcLen(sourceLength, timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
159244
func NewDefaultRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Rsi, err error) {
	ind, err := NewDefaultRsiWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
229036
func NewDefaultRocPForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocP, err error) {
	ind, err := NewDefaultRocP()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
169763
func NewDefaultRocR100WithSrcLen(sourceLength uint) (indicator *RocR100, err error) {
	ind, err := NewDefaultRocR100()

	// only initialise the storage if there is enough source data to require it
	if sourceLength-uint(ind.GetLookbackPeriod()) > 1 {
		ind.Data = make([]float64, 0, sourceLength-uint(ind.GetLookbackPeriod()))
	}

	return ind, err
}
1112400
func NewRsiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Rsi, err error) {
	ind, err := NewRsi(timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
496261
func NewPlusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDi, err error) {
	ind, err := NewPlusDiWithSrcLen(sourceLength, timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
345753
func NewAdxrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Adxr, err error) {
	ind, err := NewAdxrWithSrcLen(sourceLength, timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
280611
func NewRocPForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocP, err error) {
	ind, err := NewRocPWithSrcLen(sourceLength, timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
506170
func NewDefaultVarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Var, err error) {
	ind, err := NewDefaultVarWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
943275
func NewRocRWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR, err error) {
	ind, err := NewRocR(timePeriod, selectData)

	// only initialise the storage if there is enough source data to require it
	if sourceLength-uint(ind.GetLookbackPeriod()) > 1 {
		ind.Data = make([]float64, 0, sourceLength-uint(ind.GetLookbackPeriod()))
	}

	return ind, err
}
826739
func NewLinRegForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinReg, err error) {
	ind, err := NewLinRegWithSrcLen(sourceLength, timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1087932
func NewAvgPriceForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AvgPrice, err error) {
	ind, err := NewAvgPriceWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
480681
func NewDefaultLlvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Llv, err error) {
	ind, err := NewDefaultLlvWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
465801
func NewRocR100(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error) {
	if selectData == nil {
		return nil, ErrDOHLCVDataSelectFuncIsNil
	}

	newRocR100 := RocR100{
		selectData: selectData,
	}

	newRocR100.RocR100WithoutStorage, err = NewRocR100WithoutStorage(timePeriod,
		func(dataItem float64, streamBarIndex int) {
			newRocR100.Data = append(newRocR100.Data, dataItem)
		})

	return &newRocR100, err
}
628
func NewAroonOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *AroonOsc, err error) {
	ind, err := NewAroonOsc(timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
627501
func NewDefaultAroonOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AroonOsc, err error) {
	ind, err := NewDefaultAroonOscWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
623277
func NewDefaultLlvBarsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LlvBars, err error) {
	ind, err := NewDefaultLlvBarsWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}