RicardoSantos

[RS]Volatility Bands V0

EXPERIMENTAL:
Displays Volatility Cycles and forecasts maximum volatility expectancy for a predetermined time frame.
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
study(title='[RS]Volatility Bands V0', overlay=true)
src = input(close)
max_change_0 = na(max_change_0[1]) ? 0 : max(change(src, 1), max_change_0[1])
max_change_1 = na(max_change_1[1]) ? 0 : max(change(src, 2), max_change_1[1])
max_change_2 = na(max_change_2[1]) ? 0 : max(change(src, 3), max_change_2[1])
max_change_3 = na(max_change_3[1]) ? 0 : max(change(src, 4), max_change_3[1])
max_change_4 = na(max_change_4[1]) ? 0 : max(change(src, 5), max_change_4[1])
max_change_5 = na(max_change_5[1]) ? 0 : max(change(src, 6), max_change_5[1])
max_change_10 = na(max_change_10[1]) ? 0 : max(change(src, 11), max_change_10[1])
max_change_100 = na(max_change_100[1]) ? 0 : max(change(src, 101), max_change_100[1])

plot(close+max_change_0-change(src, 1), style=circles, color=red, offset=0)
plot(close+max_change_1-change(src, 2), style=line, color=red, offset=1)
plot(close+max_change_2-change(src, 3), style=circles, color=red, offset=2)
plot(close+max_change_3-change(src, 4), style=circles, color=red, offset=3)
plot(close+max_change_4-change(src, 5), style=circles, color=red, offset=4)
plot(close+max_change_5-change(src, 6), style=circles, color=red, offset=5)
plot(close+max_change_10-change(src, 11), style=line, color=red, offset=10)
plot(close+max_change_100-change(src, 101), style=line, color=red, offset=100)

plot(close-max_change_0+change(src, 1), style=circles, color=lime, offset=0)
plot(close-max_change_1+change(src, 2), style=line, color=lime, offset=1)
plot(close-max_change_2+change(src, 3), style=circles, color=lime, offset=2)
plot(close-max_change_3+change(src, 4), style=circles, color=lime, offset=3)
plot(close-max_change_4+change(src, 5), style=circles, color=lime, offset=4)
plot(close-max_change_5+change(src, 6), style=circles, color=lime, offset=5)
plot(close-max_change_10+change(src, 11), style=line, color=lime, offset=10)
plot(close-max_change_100+change(src, 101), style=line, color=lime, offset=100)