// NewDefaultRocPWithSrcLen creates a Rate of Change Percentage Indicator (RocP) for offline usage with default parameters
338205
func NewDefaultRocPWithSrcLen(sourceLength uint) (indicator *RocP, err error) {
	ind, err := NewDefaultRocP()

	// 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
}
229036
func NewDefaultRocPForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *RocP, err error) {
	ind, err := NewDefaultRocP()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
850099
func NewDefaultLinRegSlpWithSrcLen(sourceLength uint) (indicator *LinRegSlp, err error) {
	ind, err := NewDefaultLinRegSlp()

	// 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
}
553941
func NewDefaultPlusDiWithSrcLen(sourceLength uint) (indicator *PlusDi, err error) {
	ind, err := NewDefaultPlusDi()

	// 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
}
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
}
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
}
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
}
1069529
func NewDefaultChaikinOscForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *ChaikinOsc, err error) {
	ind, err := NewDefaultChaikinOscWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
528178
func NewDefaultChaikinOscWithSrcLen(sourceLength uint) (indicator *ChaikinOsc, err error) {
	ind, err := NewDefaultChaikinOsc()

	// 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
}
741864
func NewDefaultAdxWithSrcLen(sourceLength uint) (indicator *Adx, err error) {
	ind, err := NewDefaultAdx()

	// 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
}
900786
func NewDefaultWillRWithSrcLen(sourceLength uint) (indicator *WillR, err error) {
	ind, err := NewDefaultWillR()

	// 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
}
1206420
func NewDefaultHhvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Hhv, err error) {
	ind, err := NewDefaultHhvWithSrcLen(sourceLength)
	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
}
672711
func NewDefaultStochOscWithSrcLen(sourceLength uint) (indicator *StochOsc, err error) {
	ind, err := NewDefaultStochOsc()

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

	return ind, err
}
1070386
func NewDefaultSarWithSrcLen(sourceLength uint) (indicator *Sar, err error) {
	ind, err := NewDefaultSar()

	// 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
}
364245
func NewDefaultLlvBarsWithSrcLen(sourceLength uint) (indicator *LlvBars, err error) {
	ind, err := NewDefaultLlvBars()

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

	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
}