// NewEmaForStream creates an Exponential Moving Average (Ema) for online usage with a source data stream
496574
func NewEmaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Ema, err error) {
	ind, err := NewEma(timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
534442
func NewRequestStream(streams ...RequestStream) RequestStream {
	switch len(streams) {
	case 0:
		return nil
	case 1:
		return streams[0]
	default:
	}

	linkRequest(streams[0], streams[1])

	return struct {
		RequestConsumer
		RequestProducer
	}{
		streams[0],
		NewRequestStream(streams[1:]...),
	}
}
668302
func NewMfiForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Mfi, err error) {
	ind, err := NewMfiWithSrcLen(sourceLength, timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
110949
func NewVarForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Var, err error) {
	ind, err := NewVar(timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
901876
func NewSmaForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Sma, err error) {
	ind, err := NewSmaWithSrcLen(sourceLength, timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
685689
func newImageStreams(c *ImageClient, namespace string) *imageStreams {
	return &imageStreams{
		client: c.RESTClient(),
		ns:     namespace,
	}
}
876050
func NewDefaultLlvBarsForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *LlvBars, err error) {
	ind, err := NewDefaultLlvBars()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
607366
func NewAroonForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *Aroon, err error) {
	ind, err := NewAroonWithSrcLen(sourceLength, timePeriod)
	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
}
1327171
func NewDefaultMomForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Mom, err error) {
	ind, err := NewDefaultMom()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
222068
func (a *AccountService) NewEAB(accMsg acme.Account, kid string, hmacEncoded string) (acme.ExtendedAccount, error) {
	hmac, err := base64.RawURLEncoding.DecodeString(hmacEncoded)
	if err != nil {
		return acme.ExtendedAccount{}, fmt.Errorf("acme: could not decode hmac key: %v", err)
	}

	eabJWS, err := a.core.signEABContent(a.core.GetDirectory().NewAccountURL, kid, hmac)
	if err != nil {
		return acme.ExtendedAccount{}, fmt.Errorf("acme: error signing eab content: %v", err)
	}
	accMsg.ExternalAccountBinding = eabJWS

	return a.New(accMsg)
}
327310
func NewChannelStream() *ChannelStream {
	cs := ChannelStream{
		Data:  make(chan interface{}),
		Error: make(chan error),
	}
	return &cs
}
119348
func NewPlusDmForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *PlusDm, err error) {
	ind, err := NewPlusDmWithSrcLen(sourceLength, timePeriod)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
343862
func NewDefaultStdDevForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *StdDev, err error) {
	ind, err := NewDefaultStdDev()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
509704
func NewAvgPriceForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AvgPrice, err error) {
	ind, err := NewAvgPrice()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1041865
func NewDemaForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Dema, err error) {
	newDema, err := NewDema(timePeriod, selectData)
	priceStream.AddTickSubscription(newDema)
	return newDema, err
}
535076
func NewDefaultAroonOscForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *AroonOsc, err error) {
	ind, err := NewDefaultAroonOsc()
	priceStream.AddTickSubscription(ind)
	return ind, err
}