// NewWmaForStream creates a Weighted Moving Average Indicator (Wma) for online usage with a source data stream
489410
func NewWmaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Wma, err error) {
	ind, err := NewWma(timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1170040
func NewDefaultAtrForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Atr, err error) {
	ind, err := NewDefaultAtr()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1233483
func NewLlvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *LlvBars, err error) {
	ind, err := NewLlvBars(timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
551884
func NewDefaultMinusDiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *MinusDi, err error) {
	ind, err := NewDefaultMinusDiWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
314823
func NewMacdForStream(priceStream gotrade.DOHLCVStreamSubscriber, fastTimePeriod int, slowTimePeriod int, signalTimePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Macd, err error) {
	ind, err := NewMacd(fastTimePeriod, slowTimePeriod, signalTimePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
769950
func NewCciForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Cci, err error) {
	ind, err := NewCci(timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1119240
func NewDefaultWma() (indicator *Wma, err error) {
	timePeriod := 10
	return NewWma(timePeriod, gotrade.UseClosePrice)
}
680558
func NewAtrForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Atr, err error) {
	ind, err := NewAtr(timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
518452
func NewWma(timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Wma, err error) {
	if selectData == nil {
		return nil, ErrDOHLCVDataSelectFuncIsNil
	}

	ind := Wma{
		selectData: selectData,
	}

	ind.WmaWithoutStorage, err = NewWmaWithoutStorage(timePeriod,
		func(dataItem float64, streamBarIndex int) {
			ind.Data = append(ind.Data, dataItem)
		})
	return &ind, err
}
570027
func NewDefaultSmaForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Sma, err error) {
	ind, err := NewDefaultSma()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
712124
func NewRocR100ForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error) {
	ind, err := NewRocR100(timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1140210
func NewDefaultCciForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Cci, err error) {
	ind, err := NewDefaultCci()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1244735
func NewDemaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Dema, err error) {
	ind, err := NewDemaWithSrcLen(sourceLength, timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1241472
func NewAroonForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Aroon, err error) {
	ind, err := NewAroon(timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1127882
func NewRequestDataStream(REQ_MESSAGE_RATE uint16, TARGET_SYSTEM uint8, TARGET_COMPONENT uint8, REQ_STREAM_ID uint8, START_STOP uint8) *RequestDataStream {
	m := RequestDataStream{}
	m.REQ_MESSAGE_RATE = REQ_MESSAGE_RATE
	m.TARGET_SYSTEM = TARGET_SYSTEM
	m.TARGET_COMPONENT = TARGET_COMPONENT
	m.REQ_STREAM_ID = REQ_STREAM_ID
	m.START_STOP = START_STOP
	return &m
}
1116633
func NewSmaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Sma, err error) {
	ind, err := NewSma(timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
142386
func NewMinusDiForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *MinusDi, err error) {
	ind, err := NewMinusDi(timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}