// NewDefaultTrimaWithSrcLen creates a Triangular Moving Average Indicator (Trima) for offline usage with default parameters
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
}
506170
func NewDefaultVarForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Var, err error) {
	ind, err := NewDefaultVarWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
260374
func NewDefaultTrimaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Trima, err error) {
	ind, err := NewDefaultTrima()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1214384
func NewDefaultLinRegIntForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LinRegInt, err error) {
	ind, err := NewDefaultLinRegIntWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
432705
func NewDefaultHhvWithSrcLen(sourceLength uint) (indicator *Hhv, err error) {
	ind, err := NewDefaultHhv()

	// 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
}
480681
func NewDefaultLlvForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Llv, err error) {
	ind, err := NewDefaultLlvWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
552649
func NewVarWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Var, err error) {
	ind, err := NewVar(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
}
335584
func NewDefaultHhvBarsWithSrcLen(sourceLength uint) (indicator *HhvBars, err error) {
	ind, err := NewDefaultHhvBars()

	// 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
}
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
}
1133619
func NewDefaultStochRsiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StochRsi, err error) {
	ind, err := NewDefaultStochRsiWithSrcLen(sourceLength)
	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
}
951682
func NewLinRegIntWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LinRegInt, err error) {
	ind, err := NewLinRegInt(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
}
552704
func NewDefaultStdDevForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StdDev, err error) {
	ind, err := NewDefaultStdDevWithSrcLen(sourceLength)
	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
}
1367334
func NewDefaultMinusDmWithSrcLen(sourceLength uint) (indicator *MinusDm, err error) {
	ind, err := NewDefaultMinusDm()

	// 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
}
1164446
func NewDefaultDxForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Dx, err error) {
	ind, err := NewDefaultDxWithSrcLen(sourceLength)
	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
}