Editors' picks
OPEN-SOURCE SCRIPT
Updated

Linear Regression (All Data)

41567
The tool plots a linear regression line using the entire history of an instrument on chart. There are may be issues on intraday timeframes less then 1h. On daily, weekly and monthly charts it works without problem.

If an instrument has a lot of data points, you may not see the line (this is TV feature):
snapshot

To fix that you need to scroll your chart to the left and find the starting point of the line:
snapshot

And then do an auto-scroll to the last bar:
snapshot
Release Notes
  • Add fix for intraday resolutions
Release Notes
  • Fix index
Release Notes
  • Add license

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.