yuryla86 1 posts msg #121858 - Ignore yuryla86 |
10/30/2014 6:39:40 PM
Does any of you guys familiar with Pine language translating it to SF.
I there any way i can get variable for the middle line? I would be really, really glad to see reply to this post... Thank you
study("DEnvelope [LazyBear]", shorttitle="deNV", overlay=true)
lb=input(20, title="DEnvelope lookback length")
de=input(2, title="DEnvelope band deviation")
alp=2/(lb+1)
src=hlc3
mt=alp*src+(1-alp)*nz(mt[1])
ut=alp*mt+(1-alp)*nz(ut[1])
dt=((2-alp)*mt-ut)/(1-alp)
mt2=alp*abs(src-dt)+(1-alp)*nz(mt2[1])
ut2=alp*mt2+(1-alp)*nz(ut2[1])
dt2=((2-alp)*mt2-ut2)/(1-alp)
but=dt+de*dt2
blt=dt-de*dt2
plot(but, color=red, linewidth=2)
plot(dt, color=gray)
plot(blt, color=green, linewidth=2)
|