OPEN-SOURCE SCRIPT
Updated

Function - Forecast Linear

4 274
Function to calculate a forecast using a linear regression approach, this is the same function used on excel and other data sheet programs.

reference:
- support.microsoft.com/en-us/office/forecast-and-forecast-linear-functions-50ca49c9-7b40-4892-94e4-7ad38bbeda99?ui=en-us&rs=en-us&ad=us
- stackoverflow.com/questions/39373328/forecast-formula-from-excel-in-javascript
Release Notes
updated description and added extra example

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.