jeetbeez

Linear Regression Trend Channel

jeetbeez Обновлено   
The "Linear Regression Trend Channel" is a technical indicator designed to illustrate price trends and their volatility using linear regression. This indicator calculates the main linear regression line based on the user-defined period length and computes the standard deviation to form a trend channel.

Key Features:

- Linear Regression Calculation: Computes the linear regression line based on the selected price data source and the defined period length.
- Slope and Intercept Calculation: Calculates the slope and intercept of the linear regression line using the calcSlopeIntercept function.
- Deviation Channels: Adds standard deviation channels to the linear regression line to highlight potential support and resistance areas.

Settings

- Linear Regression Length: Specifies the length of the period for the linear regression calculation (default: 100).
- Linear Regression Source: Defines the data source for the linear regression calculation, such as close price, open price, etc. (default: close).
- Linear Regression Color: Sets the color of the linear regression line (default: gray).
- Show Price Labels: Option to display price labels on the horizontal lines (default: true).

How to Use

- Set the Linear Regression Length to define the period for regression calculation.
- Choose the Linear Regression Source to specify the price data (e.g., close, open).
- Enable or disable Show Price Labels based on whether you want to see price labels on the horizontal lines.

This Indicator helps identify dynamic support and resistance levels and potential market turning points.
Информация о релизе:
The "Linear Regression Trend Channel" is a technical indicator designed to illustrate price trends and their volatility using linear regression. This indicator calculates the main linear regression line based on the user-defined period length and computes the standard deviation to form a trend channel.

Key Features:

- Linear Regression Calculation: Computes the linear regression line based on the selected price data source and the defined period length.
- Slope and Intercept Calculation: Calculates the slope and intercept of the linear regression line using the calcSlopeIntercept function.
- Deviation Channels: Adds standard deviation channels to the linear regression line to highlight potential support and resistance areas.

Settings

- Linear Regression Length: Specifies the length of the period for the linear regression calculation (default: 100).
- Linear Regression Source: Defines the data source for the linear regression calculation, such as close price, open price, etc. (default: close).
- Linear Regression Color: Sets the color of the linear regression line (default: gray).
- Show Price Labels: Option to display price labels on the horizontal lines (default: true).

How to Use

- Set the Linear Regression Length to define the period for regression calculation.
- Choose the Linear Regression Source to specify the price data (e.g., close, open).
- Enable or disable Show Price Labels based on whether you want to see price labels on the horizontal lines.

Add Customization:

- Linear Regression Color: Sets the color of the linear regression line.
- Label Price Color: Sets the color of the displayed price labels.
- Show Price: Option to display or hide the price labels.
- Show Horizontal Line: Option to display or hide horizontal lines.

This Indicator helps identify dynamic support and resistance levels and potential market turning points.
Информация о релизе:
Add Customization:

- Linear Regression Color: Sets the color of the linear regression line.
- Label Price Color: Sets the color of the displayed price labels.
- Show Horizontal Line: Option to display or hide horizontal lines.
- Show Price: Option to display or hide the price labels.
Информация о релизе:
Updates:
High/Low Timeframe Addition:

The High/Low lines mark the highest and lowest prices over a chosen timeframe (e.g., daily, weekly). These levels often act as support and resistance.

- Added an input parameter to select the timeframe (e.g., daily, weekly) for displaying High and Low levels.
- Added an input to choose the color of the High/Low lines.
- Added an option to show or hide the High/Low lines on the chart.

The High/Low lines make it easier to see key price points on the chart, set price targets, and identify trends, improving readability.
Информация о релизе:
- Added Timeframe Options: Expanded the available timeframes for high/low calculations to include daily, weekly, monthly, 3-month, 6-month, and yearly intervals.
- Extended High/Low Lines: Enhanced the high/low lines to extend both forward and backward, providing a clearer historical and future reference.
- General Improvements: Minor code optimizations for better performance and accuracy.
Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?