Hi Guys,
Is it possible to use Zero Lag Exponential Bollinger in the code ?
As far I see I can’t use Zero Lag Exponential Bollinger Up or down bands even they are displayed live on chart together with price. Is it possible to use it somehow in the code ?
Thanks for any help,
Janneta
Hi janneta,
Yes it would be possible, but it needs to recode a complete bollinger bands indicator made of Zerolag EMA for that.
Here is the code I just wrote for this:
// parameters
// period = 20
// dev = 2.0
lag = ROUND((period-1)/2)
data = (close + (close-close[lag]))
ZLEMA = exponentialaverage[period](data)
BolUp = ZLEMA+STD[period]*dev
BolDn = ZLEMA-STD[period]*dev
RETURN ZLEMA as "ZeroLag EMA", BolUp as "Bollinger Up ZLEMA", BolDn as "Bollinger Down ZLEMA"
Please find attached the file and a screenshot.