Trading Strategy, Cryptocurrency, Fmz Quant, Time Series Data, Threshold.
=> mean = 0.0 dev = 0.0 mean := na(mean[1]) ? src : (1 - alpha) * mean[1] + alpha * src dev := na(dev [1]) ? 0 : (1 - alpha) * dev [1] + alpha * abs(src - mean) [mean, dev] src = input(close) a = er (src ) [mean, dev] = pine_ema(src, a) dev_lower = mean - dev dev_upper = mean + dev //