LinearRegressionChannel
Linear Regression Channel — MetaTrader 5 indicator
Linear Regression Channel is a free MetaTrader 5 indicator that draws a linear regression line through price over a set number of bars, with an upper and a lower channel line. It shows the direction and slope of the current trend and the zones where price has moved furthest from it.
Lines
- Central line (BlueViolet): the linear regression (best-fit) line based on the selected price type
- Upper line (Lime): placed at the largest deviation above the regression line, acting as dynamic resistance
- Lower line (Red): placed at the largest deviation below the regression line, acting as dynamic support
Inputs
- Price Mode: Close uses closing prices; High-Low uses high and low prices
- Bars to Count: number of bars used for the regression (default 50)
Usage
The channel can support trend-following analysis, by following its slope, or mean-reversion analysis, by watching price reactions near the outer lines. Because the regression is recalculated on new bars, the channel position updates as new data arrives. The indicator does not open trades. Use it together with your own analysis and risk management.
Support
For product questions, please use the product comments or MQL5 private messages.
