RicardoSantos

Function - Linear Regression

Description:
A Function that returns a linear regression channel using (X,Y) vector points.

Inputs:
_X: Array containing x data points.¹
_Y: Array containing y data points.¹

Note:
¹: _X and _Y size must match.

Outputs:
_predictions: Array with adjusted _Y values at _X.
_max_dev: Max deviation from the mean.
_min_dev: Min deviation from the mean.
_stdev/_sizeX: Average deviation from the mean.

Resources:
https://www.statisticshowto.com/probabil...
https://en.wikipedia.org/wiki/Linear_reg...
Release Notes: added color, and extend options, removed some test inputs, optimized array creation process slightly.
Remove from Favorite Scripts Add to Favorite Scripts

Comments

What’s exactly the function of the extended lines feature? R,b,l,n
Reply
Many thanks for your incredible generosity and brilliant work. I've learned a tremendous amount from your scripts.
Reply
Hi Ricardo, i'm not sure what to modify in the script so I can change the STDEV of the dashed aqua line. Can you please help me?
Reply
@Deadca7, in case you haven't found it yet, check ll. 73, 78 & 79
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out