Skip to content
All library documents

Linear Regression Trend Indicator with ATR Channels

Article ProRealCode

Summary

This indicator uses a rolling linear regression of closing prices to identify directional trend changes. It plots a blue line during a positive regime and a red line during a negative regime. The described settings use a 100-bar regression window and a deviation multiplier of 2. The indicator also adds upper and lower grey bands based on twice an average true range measure; these are presented as possible trailing-stop references or places where price might revert toward the mean.

The document supplies a ProRealTime implementation adapted from a Pine Script indicator and explains the intended visual interpretation. It offers no chart examples, backtest, market-by-market evaluation, or rules for position sizing and execution. The trend state and channel touches are therefore indicator signals, not evidence of a profitable strategy. The implementation’s fixed parameters may behave differently across instruments and timeframes, and the proposed stop or rebound uses should be evaluated for lag, whipsaws, and risk before trading.

Key ideas

  • The indicator uses a rolling linear regression of closing prices to track direction.
  • A blue line marks a positive trend regime, while a red line marks a negative regime.
  • Grey bands are spaced using twice an average true range measure and may inform stops or mean-reversion observations.
  • The example uses a 100-bar regression window and a deviation multiplier of 2.
  • The document gives implementation logic but no backtest or evidence of trading performance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.