// NewDefaultAtrWithSrcLen creates an Average True Range (Atr) for offline usage with default parameters
333378
func NewDefaultAtrWithSrcLen(sourceLength uint) (indicator *Atr, err error) {
	ind, err := NewDefaultAtr()

	// 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
}
1133619
func NewDefaultStochRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochRsi, err error) {
	ind, err := NewDefaultStochRsiWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
840
func NewDefaultTrimaWithSrcLen(sourceLength uint) (indicator *Trima, err error) {
	ind, err := NewDefaultTrima()

	// 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
}
686413
func NewDefaultAdxrWithSrcLen(sourceLength uint) (indicator *Adxr, err error) {
	ind, err := NewDefaultAdxr()

	// 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
}
383070
func NewDefaultKamaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Kama, err error) {
	ind, err := NewDefaultKamaWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1100061
func NewDefaultAdxrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Adxr, err error) {
	ind, err := NewDefaultAdxrWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
761972
func NewDefaultTemaWithSrcLen(sourceLength uint) (indicator *Tema, err error) {
	ind, err := NewDefaultTema()

	// 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
}
627639
func NewDefaultLinRegAngForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegAng, err error) {
	ind, err := NewDefaultLinRegAngWithSrcLen(sourceLength)
	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
}
858177
func NewDefaultMfiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mfi, err error) {
	ind, err := NewDefaultMfiWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
712846
func NewDefaultLinRegForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinReg, err error) {
	ind, err := NewDefaultLinRegWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
229694
func NewDefaultMacdWithSrcLen(sourceLength uint) (indicator *Macd, err error) {
	ind, err := NewDefaultMacd()

	// only initialise the storage if there is enough source data to require it
	if sourceLength-uint(ind.GetLookbackPeriod()) > 1 {

		ind.Macd = make([]float64, 0, sourceLength-uint(ind.GetLookbackPeriod()))
		ind.Signal = make([]float64, 0, sourceLength-uint(ind.GetLookbackPeriod()))
		ind.Histogram = make([]float64, 0, sourceLength-uint(ind.GetLookbackPeriod()))
	}

	return ind, err
}
1274731
func NewDefaultMfiWithSrcLen(sourceLength uint) (indicator *Mfi, err error) {
	ind, err := NewDefaultMfi()

	// 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
}
916440
func NewDefaultTrimaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Trima, err error) {
	ind, err := NewDefaultTrimaWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1284367
func NewDefaultEmaWithSrcLen(sourceLength uint) (indicator *Ema, err error) {
	ind, err := NewDefaultEma()

	// 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
}
541896
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
}
736069
func NewDefaultRocForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Roc, err error) {
	ind, err := NewDefaultRocWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}