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).
Remove from Favorite Scripts Add to Favorite Scripts
//@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)
Looks great!
I'll try it on AUDCAD, range trader's paradise.
Reply
Alphaoptions
a year ago
Another excellent job!
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out