Im having a crazy issue with one of my custom indicators, The Exponential Deviation Band:
EXPONENTIAL WEIGHTED DEVIATION BANDS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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)
ifbarindex<Lookbackthen
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)
RETURNMIDas"EVWMA",UBas"+ESD",BBas"-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.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok