RicardoSantos

[RS]Adaptive Range Channel V0

EXPERIMENTAL:
center is based on the mean of price on X bars lookback window, channel width is determined buy maximum volatility from the mean outwards(to the extremes).
開源腳本

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

免責聲明

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

想在圖表上使用此腳本?
//@version=2
study(title='[RS]Adaptive Range Channel V0', shorttitle='ARC', overlay=true)
window = input(title='Lookback Window:', type=integer, defval=100)
src = input(title='Source Data:', type=source, defval=close)
//Alternative Version:
//m = na(m[1]) ? close : (percentile_linear_interpolation(close , 100, 50)+m[1])*0.5
m = na(m[1]) ? close : percentile_linear_interpolation(src , window, 50)
t = na(t[1]) ? 0 : max(t[1], high-m)
b = na(b[1]) ? 0 : min(b[1], low-m)

plot(title='+1.000', series=m+t, color=black, linewidth=2)
plot(title='+0.764', series=m+t*0.764, color=maroon, linewidth=1)
plot(title='+0.618', series=m+t*0.618, color=red, linewidth=1)
plot(title='+0.500', series=m+t*0.500, color=orange, linewidth=1)
plot(title='+0.382', series=m+t*0.382, color=gray, linewidth=1)
plot(title='+0.236', series=m+t*0.236, color=silver, linewidth=1)
plot(title='0.000', series=m, color=black, linewidth=2)
plot(title='-0.236', series=m+b*0.236, color=silver, linewidth=1)
plot(title='-0.382', series=m+b*0.382, color=gray, linewidth=1)
plot(title='-0.500', series=m+b*0.500, color=olive, linewidth=1)
plot(title='-0.618', series=m+b*0.618, color=lime, linewidth=1)
plot(title='-0.764', series=m+b*0.764, color=green, linewidth=1)
plot(title='-1.000', series=m+b, color=black, linewidth=2)