# Functions
BOOL2 is bollinger indicator the data flow:
priceSource ->
-> calculate SMA -> calculate stdDev -> calculate bandWidth -> get latest SMA -> upBand, downBand.
Cross creates the CrossStream object:
cross := Cross(fastEWMA, slowEWMA).
KLines creates a KLine stream that pushes the klines to the subscribers.
Stochastic Oscillator.
Subtract creates the SubtractStream object subtract := Subtract(longEWMA, shortEWMA).
# Structs
CrossStream subscribes 2 upstreams, and calculate the cross signal.
go:generate callbackgen -type KLineStream.
go:generate callbackgen -type StochStream.
SubtractStream subscribes 2 upstream data, and then subtract these 2 values.
This TRStream calculates the ATR first.