xel_arjona

GEOMETRIC STANDARD DEVIATION BANDS v1 by @XeL_Arjona

GEOMETRIC STANDARD DEVIATION BANDS
Ver.1 By Ricardo M Arjona @XeL_Arjona

DISCLAIMER:

The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.

The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.


WHAT'S THIS?

This IS NOT the wheel "Re-Invention"... This is exactly what the name says: A pair of Envelope Bands to measure "volatility", constructed at statistical relation from within price series and their Rolling back MEAN (Simple Moving Average). YES, What Mr. Bollinger did and put it's name to this simple, cleaver and popular formula.

This time, I took the time to make another simple mod, but seems to me to be quite functional in REAL VOLATILE assets like in the example chart: TO USE THEIR GEOMETRIC MODE!!

Cheers!
Any feedback or public modification(s) are quite welcome to the community....!

@XeL_Arjona
Apr 28 2016

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
//@version=2
study("GEOMETRIC STANDARD DEVIATION BANDS v1 by @XeL_Arjona", shorttitle="gSDB", overlay=true)
src = input(title="Candle Source:",type=source,defval=close)
p   = input(title="Rollback Mean:",defval=21)
s   = input(title="Deviation Envelope:",defval=2)
et  = input(title="EnvTYPE: [1]Cl | [3]Avg | [3]HiLo:",defval=2,minval=1,maxval=3)
// VARIABLES
cl = log(src)
hi = iff(et==1, log(src), iff(et==2,log(high), log(avg(src,high))))
lo = iff(et==1, log(src), iff(et==2,log(low), log(avg(src,low))))
// FUNCTIONS
// Standard Deviation from Custom Mid Point (Custom Bollinger)
cStdDev(array,mid,lb,mult,dir) =>
    std = stdev(array,lb)
    d = dir ? 1 : -1
    band = mid + d * mult * std
mean    = exp(sma(cl,p))
up      = exp(cStdDev(hi,sma(hi,p),p,s,true))
dn      = exp(cStdDev(lo,sma(lo,p),p,s,false))
// PLOT DIRECTIVES
plot(mean,color=blue,transp=0)
uband = plot(up,color=blue,transp=55)
dband = plot(dn,color=blue,transp=55)
fill(uband,dband,color=navy,transp=96)