xelParticipant
Average
Good day folks!
Im having a crazy issue with one of my custom indicators, The Exponential Deviation Band:
// EXPONENTIAL WEIGHTED DEVIATION BANDS
PRICE = LOG(customclose)
// EWMA (EMA)
EWMA = ExponentialAverage[Lookback](PRICE)
// ELASTIC WEIGHTED STANDARD DEVIATION (ESD)
alpha = 2/(Lookback+1)
error = PRICE - EWMA
dev = SQUARE(error)
if barindex < Lookback then
var = dev
else
var = alpha * dev + (1-alpha) * var[1]
endif
ESD = SQRT(var)
// BANDS
UB = EXP(EWMA + (DEVIATIONS*ESD))
BB = EXP(EWMA - (DEVIATIONS*ESD))
MID = EXP(EWMA)
RETURN MID as "EVWMA", UB as "+ESD", BB as "-ESD"
When applying the former one to normal series price, EDBands plots quite well but if you try to apply it to some other indicators, in particular to the Internal ProRealTime (v10.3 – 1.8.0_45) “Historical Volatility” the bands just do not return any value at all.
Screenshot added.
Anything I am missing at coding..?
Cheers everyone!
I did not test this quick fix, but you can try embed the whole code into these lines:
if barindex>Lookback then
// add the indicator code
endif