LRCChannelParams

Calculates Linear Regression Channel parameters.

Syntax

LRCChannelParams(
    shift: number,
    period: number,
    priceType: TPriceType
): { StartValue: number; EndValue: number; Height: number; Top: number; Bottom: number }

Parameters

Parameter
Type
Description

shift

number

Starting bar index for calculation

period

number

Number of bars to calculate over

priceType

Type of price to use (Open, High, Low, Close, etc.)

Return Value

Returns an object with the following properties:

  • StartValue: number - Starting value of the regression line

  • EndValue: number - Ending value of the regression line

  • Height: number - Channel height (maximum deviation from regression line)

  • Top: number - Upper channel line value

  • Bottom: number - Lower channel line value

Description

The LRCChannelParams method calculates parameters for a Linear Regression Channel. This includes:

  1. The regression line (middle line)

  2. Channel height based on maximum deviation

  3. Upper and lower channel lines

The Linear Regression Channel is a technical analysis tool that combines linear regression with channel lines to show the trend direction and potential support/resistance levels.

Available Price Types can be found in the TPriceType section.

Example

Last updated