Linear Regression Forecast (LRF) (2024)

Table of Contents
Configuration Options Formula

Charts

Linear regression is a statistical tool usedto help predict future values from past values. It is commonly usedas a quantitative way to determine the underlying trend and whenprices are overextended. A linear regression trendline uses theleast squares method to plot a straight line through prices so asto minimize the distances between the prices and the resulting trendline.This linear regression indicator plots the trendline value for eachdata point.

Linear Regression Forecast (LRF) (1)

Configuration Options

Linear Regression Forecast (LRF) (2)

  • Period: Number of bars to use in the calculations.
  • Field: Price or combination of prices to use as the base for average calculations. Possible values include:
    • Open
    • High
    • Low
    • Close
    • Adjusted Close
    • HL/2 \( \left ( \frac{High + Low}{2} \right ) \)
    • HLC/3 \( \left ( \frac{High + Low + Close}{3} \right ) \)
    • HLCC/4 \( \left ( \frac{High + Low + Close + Close}{4} \right ) \)
    • OHLC/4 \( \left ( \frac{Open + High + Low + Close}{4} \right ) \)
  • Color Selectors: Colors to use for graph elements.
  • Display Axis Label: Whether to display the most recent value on the Y axis.

Formula

The best fit line associated with the n points(x1, y1), (x2, y2), . . . , (xn, yn) has theform y = mx + b

\[slope\;=\;m\;=\;\frac{\sum_{i=1}^{n}(x_{i} - \bar{x})(y_{i} - \bar{y})}{\sum_{i=1}^{n}(x_{i} - \bar{x})^{2}}\]

\[intercept\;=\;b\;=\;\bar{y} - m\bar{x}\]

Linear Regression Forecast (LRF) (2024)
Top Articles
Latest Posts
Article information

Author: Corie Satterfield

Last Updated:

Views: 5891

Rating: 4.1 / 5 (42 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Corie Satterfield

Birthday: 1992-08-19

Address: 850 Benjamin Bridge, Dickinsonchester, CO 68572-0542

Phone: +26813599986666

Job: Sales Manager

Hobby: Table tennis, Soapmaking, Flower arranging, amateur radio, Rock climbing, scrapbook, Horseback riding

Introduction: My name is Corie Satterfield, I am a fancy, perfect, spotless, quaint, fantastic, funny, lucky person who loves writing and wants to share my knowledge and understanding with you.