// NewTsfForStreamWithSrcLen creates a Time Series Forecast Indicator (Tsf) for offline usage with a source data stream
352761
func NewTsfForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tsf, err error) {
	ind, err := NewTsfWithSrcLen(sourceLength, timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
304001
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
}
546172
func NewDefaultTsfWithSrcLen(sourceLength uint) (indicator *Tsf, err error) {
	ind, err := NewDefaultTsf()

	// 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
}
111378
func NewLinRegIntForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegInt, err error) {
	ind, err := NewLinRegIntWithSrcLen(sourceLength, timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
343540
func NewTrueRangeForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *TrueRange, err error) {
	ind, err := NewTrueRangeWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1133619
func NewDefaultStochRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochRsi, err error) {
	ind, err := NewDefaultStochRsiWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
853952
func NewDxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Dx, err error) {
	ind, err := NewDxWithSrcLen(sourceLength, timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1012365
func NewDefaultPlusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *PlusDm, err error) {
	ind, err := NewDefaultPlusDmWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
373687
func NewTsfWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Tsf, err error) {
	ind, err := NewTsf(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
}
502714
func NewDefaultAroonForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Aroon, err error) {
	ind, err := NewDefaultAroonWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1113805
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
}
213142
func NewTypPriceWithSrcLen(sourceLength uint) (indicator *TypPrice, err error) {
	ind, err := NewTypPrice()

	// 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
}
858177
func NewDefaultMfiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mfi, err error) {
	ind, err := NewDefaultMfiWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
312523
func NewDefaultBollingerBandsForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *BollingerBands, err error) {
	ind, err := NewDefaultBollingerBandsWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
118357
func NewAtrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Atr, err error) {
	ind, err := NewAtrWithSrcLen(sourceLength, timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1242153
func NewMinusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDm, err error) {
	ind, err := NewMinusDmWithSrcLen(sourceLength, timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1264492
func NewDefaultSmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sma, err error) {
	ind, err := NewDefaultSmaWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}