RicardoSantos

[RS]Linear Regression Bands V0

experiment with linear regression , the purpose was to catch break outs early, but it creates to much visual noise
Remove from Favorite Scripts Add to Favorite Scripts
study(title="[RS]Linear Regression Bands V0", shorttitle="[RS]LRB.V0", overlay=true)
tf1 = input(0.125)
smooth = input(4)
prehh1 = nz(hh1[1], high)
prell1 = nz(ll1[1], low)

hh1 = close >= prehh1 ? high : prehh1 - sma(abs(change(high, 1)*tf1), smooth)
ll1 = close <= prell1 ? low : prell1 + sma(abs(change(low, 1)*tf1), smooth)
midline = avg(hh1, ll1)
plot(midline, style=cross, color=black, linewidth=1)
ph1 = plot(hh1, style=line, color=black, linewidth=1)
pl1 = plot(ll1, style=line, color=black, linewidth=1)
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本
한국
Home Stock Screener Forex Signal Finder 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 Account and Billing Sign Out