emiliolb

Linear Regression Pendant

73 0 5
Script which calculates the linear regression pendant, giving an idea where enter or exit in a market position.
Please if anybody have suggestions, let me know.

Thanks
Emilio ((emiliolb@outlook.com))
Remove from Favorite Scripts Add to Favorite Scripts
// Created by emiliolb -- Version 1.0
// Contact emiliolb@outlook.com 
study(title="Linear Regression Pendant", shorttitle="LRP", overlay=true)

src = close[0]
len = input(defval=150, minval=1, title="Linear Regression Length")
selected_angle = input(defval=20, minval=0, title="Select the angle")
lrc = linreg(src, len, 0)
plot(lrc, color = red, title = "Linear Regression Curve", style = line, linewidth = 2)

lrprev = linreg(close[1], len, 0)
pendant = (lrc - lrprev)
data = (atan(pendant)) > 0

//Please if somebody have suggestions how show this better, let me know
codiff = pendant
plotarrow(codiff, colorup=teal, colordown=orange, transp=40)
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Priority Support Contact Support Ideas Published Followers Following Private Messages Chat Sign Out