커뮤니티
지표
2018-04-26 23:15:18
320
글번호 118510
트레이딩뷰 소스인데
이거 만들 수 있나요?
감사합니다.
study("CM_Williams_Vix_Fix", overlay=false)
pd = input(22, title="LookBack Period Standard Deviation High")
bbl = input(20, title="Bolinger Band Length")
mult = input(2.0 , minval=1, maxval=5, title="Bollinger Band Standard Devaition Up")
lb = input(50 , title="Look Back Period Percentile High")
ph = input(.85, title="Highest Percentile - 0.90=90%, 0.95=95%, 0.99=99%")
pl = input(1.01, title="Lowest Percentile - 1.10=90%, 1.05=95%, 1.01=99%")
hp = input(false, title="Show High Range - Based on Percentile and LookBack Period?")
sd = input(false, title="Show Standard Deviation Line?")
wvf = ((highest(close, pd)-low)/(highest(close, pd)))*100
sDev = mult * stdev(wvf, bbl)
midLine = sma(wvf, bbl)
lowerBand = midLine - sDev
upperBand = midLine + sDev
rangeHigh = (highest(wvf, lb)) * ph
rangeLow = (lowest(wvf, lb)) * pl
col = wvf >= upperBand or wvf >= rangeHigh ? lime : gray
plot(hp and rangeHigh ? rangeHigh : na, title="Range High Percentile", style=line, linewidth=4, color=orange)
plot(hp and rangeLow ? rangeLow : na, title="Range High Percentile", style=line, linewidth=4, color=orange)
plot(wvf, title="Williams Vix Fix", style=histogram, linewidth = 4, color=col)
plot(sd and upperBand ? upperBand : na, title="Upper Band", style=line, linewidth = 3, color=aqua)
답변 1
예스스탁 예스스탁 답변
2018-04-27 14:14:26
안녕하세요
예스스탁입니다.
#study("CM_Williams_Vix_Fix", overlay=false)
input : pd(22),bbl(20),mult(2.0),lb(50),ph(0.85),pl(1.01),hp(false),sd(false);
var : wvf(0),sdev(0),midLine(0),lowerBand(0),upperBand(0);
var : rangeHigh(0),rangeLow(0);
wvf = ((highest(close, pd)-low)/(highest(close, pd)))*100;
sDev = mult * std(wvf, bbl);
midLine = ma(wvf, bbl);
lowerBand = midLine - sDev;
upperBand = midLine + sDev;
rangeHigh = (highest(wvf, lb)) * ph;
rangeLow = (lowest(wvf, lb)) * pl;
plot1(rangeHigh);
plot2(rangeLow);
plot3(wvf);
plot4(upperBand);
plot5(lowerBand);
즐거운 하루되세요
> 째깍째깍 님이 쓴 글입니다.
> 제목 : 지표
> 트레이딩뷰 소스인데
이거 만들 수 있나요?
감사합니다.
study("CM_Williams_Vix_Fix", overlay=false)
pd = input(22, title="LookBack Period Standard Deviation High")
bbl = input(20, title="Bolinger Band Length")
mult = input(2.0 , minval=1, maxval=5, title="Bollinger Band Standard Devaition Up")
lb = input(50 , title="Look Back Period Percentile High")
ph = input(.85, title="Highest Percentile - 0.90=90%, 0.95=95%, 0.99=99%")
pl = input(1.01, title="Lowest Percentile - 1.10=90%, 1.05=95%, 1.01=99%")
hp = input(false, title="Show High Range - Based on Percentile and LookBack Period?")
sd = input(false, title="Show Standard Deviation Line?")
wvf = ((highest(close, pd)-low)/(highest(close, pd)))*100
sDev = mult * stdev(wvf, bbl)
midLine = sma(wvf, bbl)
lowerBand = midLine - sDev
upperBand = midLine + sDev
rangeHigh = (highest(wvf, lb)) * ph
rangeLow = (lowest(wvf, lb)) * pl
col = wvf >= upperBand or wvf >= rangeHigh ? lime : gray
plot(hp and rangeHigh ? rangeHigh : na, title="Range High Percentile", style=line, linewidth=4, color=orange)
plot(hp and rangeLow ? rangeLow : na, title="Range High Percentile", style=line, linewidth=4, color=orange)
plot(wvf, title="Williams Vix Fix", style=histogram, linewidth = 4, color=col)
plot(sd and upperBand ? upperBand : na, title="Upper Band", style=line, linewidth = 3, color=aqua)
다음글
이전글