25
This tool was created in an attempt to forecast the price range of the next BTCUSD candle
based upon the volatility of the current candle.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
study(title="Volatility Tamer",shorttitle="VolT",overlay=true,precision=0)
//This tool was created in an attempt to forecast the price range of the next BTCUSD candle
//based upon the volatility of the preceeding candle. This is not a moving 
//average. Displays the followinginformation : last price, low, high, 
//a maximum and average price range based upon preceeding candle, 
//and price ranges based upon the historical median(4.5%) and average(7%) daily volatility 
//at Bitstamp.  (Disclaimer: My calculations for these and all other values are subject to being wrong. 
//Furthermore, several months have passed since I calculated the Bitstamp values. )
//Usage notes: To view predictions for the next candle, select VvHa and VvLa in the style configuration tab.
//Predictions are not set in stone until the next candle begins. 

Last=close
C=close
H=high
L=low
C1=close[1]
H1=high[1]
L1=low[1]
HA=93
HM=95.5
X1=(L1*100)/H1
Y1=(100-X1)/2
Z1=X1+Y1
X2=(L*100)/H
Y2=(100-X2)/2
Z2=X2+Y2
NHML=(C1*HM)/100
NHMH=(C1*100)/HM
NHAL=(C1*HA)/100
NHAH=(C1*100)/HA
NMH=(C1*100)/Z1
NML=(C1*Z1)/100
NH=(C1*100)/X1
NL=(C1*X1)/100
vvH=(C*100)/X2
vvL=(C*X2)/100
vvHa=(C*100)/Z2
vvLa=(C*Z2)/100
plot(high,color=#E56717,title="High")
plot(low,color=#E56717,title="Low")
plot(Last,color=#57E964,title="Last")
p1=plot(NMH,color=yellow,title="Avg Hi",style=cross,offset=0)
p2=plot(NML,color=yellow,title="Avg Low",style=cross,offset=0)
p3=plot(NL,color=green,title="Max Low",style=cross,offset=0)
p4=plot(NH,color=green, title="Max Hi",style=cross,offset=0)
p5=plot(NHMH,color=orange,title="Median Hi",style=cross,offset=0)
p6=plot(NHML,color=orange,title="Median Low",style=cross,offset=0)
fill(p2,p3,color=#1569C7,transp=50)
fill(p1,p4,color=#1569C7,transp=50)
fill(p4,p5,color=#0000A0,transp=75)
fill(p3,p6,color=#0000A0,transp=75)
plot(NHAH,color=red,title="Avg Hi(H)",style=cross,offset=0)
plot(NHAL,color=red,title="Avg Low(H)",style=cross,offset=0)
plot(vvH,color=#00FF00,title="vvH",style=cross,offset=1)
plot(vvL,color=#00FF00,title="vvL",style=cross,offset=1)
plot(vvHa,color=#FF00FF,title="vvHa",style=cross,offset=1)
plot(vvLa,color=#FF00FF,title="vvLa",style=cross,offset=1)