Regression Channel REVISITED – with Bloodhound Tutorial

Regression Channel for NT8

In this post, we revisit the Regression Channel indicator, showing how to apply it with price action patterns in a Bloodhound template. The tutorial starts with a quick re-cap of the indicator and the differences between the standard and the daily Regression Channels. We then discuss how to locate the trend bias and where to identify setups based on price vs. the regression channel bands location. Finally, we look at how to identify exit scenarios, specifically, price vs. regression channel bands crossovers.

To learn more about the Regression Channel, check out our tutorial video, or continue reading below:

Linear Regression Channel Calculation:

The Regression Channel indicator consists of three parts: The Linear Regression Channel mid-, upper- and lower lines. One may calculate the Linear Regression Channel midline using “the least squares method”. It represents the best fit, minimizing the sum of squared distances from the data in lookback period. You may then use the linear regression analysis for two purposes:

  • To check the stochastic dependence of two variables (i.e. trading prices and time)
  • To forecast future price development

As you may see below, the upper and lower channels lines run parallel to the mid-line, determined by a standard deviation calculation. When prices deviate above or below the mid-line, traders may expect prices to revert back towards the Linear Regression Channel mid line.

Regression Channel for NinjaTrader 8
Regression Channel Calculation: Least Squares Method

Linear Regression Channel Setups:

During uptrends, when prices dip below the Linear Regression Line, one may consider long setups. For example, you may consider bullish reversal setups that occur towards the lower channel line. A possible exit scenario materialize when prices approach the upper area of the channel.

In an downtrend you’ll look for short setups around the upper levels of the channel – and buy to cover at the lower end. For example, you may consider bearish reversal setups that occur towards the upper channel line and exit when prices approach the lower area of the channel.

Repainting Lines vs. Regression Bands

The indicator calculates the regression line for a window of N bars. When the current bar closes, it recalculates and the channel lines adjust accordingly (repainting behavior). You should therefore not misinterpret the position of the lines. Price action may retroactively appear to bounce off Regression Channel support resistance lines that at the time of the calculation were placed differently. Specifically, that means that you cannot easily use the Regression Channel lines with other indicators or apply them in trading systems.

In the below example, we see a bearish reversal pattern that appear to meet resistance at the upper Regression Channel line. However, by observing the regression bands, we see that at the time of calculation, the channel was indicating an uptrend.

Linear Regression Channel with Regression Bands
Trading Systems Compatible: Regression Bands

Specifically, the regression bands represent the end points of the regression channel at the time of calculation (current price N bars ago). You may therefore use the mid, upper and lower values in trading systems as their position cannot bemisinterpreted.

Common Limitations:

The default NinjaTrader Linear Regression Channel indicator comes with the following limitations:

  • The default indicator calculates from the last bar loaded by OnBarUpdate(). When the chart scrolled back horizontally, the regression channel remains in its future position, until it drops out of the chart.
  • The default indicator does not allow for calculating the linear regression channel a few bars ago and then project the channel lines forward until the current bar.

Our Improvements:

The LizardIndicators Linear Regression Channel version addresses the issues as follows:

  • The regression channel is calculated from the last bar shown on the chart. It will adapt its position accordingly when you scroll back the chart horizontally.
  • You may enter an offset and calculate the regression channel a few bars ago. The regression channel will then be extended until the last bar shown on the chart.
  • Regression bands that trace the regression channel at the time of calculation (current price N bars ago). You may apply these values (middle, upper, lower) with automated trading strategies.

Indicator Dataseries:

In addition, this indicator comes with the following dataseries:

  • Intercept
  • Slope
  • StdDeviation
  • NormalizedSlope
  • NormalizedChannelWidth
  • RegressionTrend

The Intercept, Slope and Standard Deviation are needed to draw the Regression Channel. In particular, the SlopeSeries and StdDeviationSeries are relevant for trading strategies.

SlopeSeries: indicates the current slope of the regression line (rise over run) and measuring the trend strength.

StdDeviationSeries: indicates the current residual standard deviation, which is a measure of the quality of the trend (width of the channel)

NormalizedSlope: The slope does not provide meaningful values ​​unless it is related to volatility. For example, on a daily chart the slope can frequently be 100 times the size of that in minute chart. Therefore, our Regression Channel indicator also comes with a normalized slope, determining comparable values ​​for the trend strength across all chart types and time frames. That in turn can be applied as filter for trading systems. For example, only enter positions if the trend is recognizable, but not too far advanced.

RegressionTrend: Finally, there is the DataSeries Regression Trend. This contains either the value + 1 (positive channel slope) or -1 (negative channel slope).

The Daily Regression Channel

A Daily Regression Channel indicator is also available from the library. Unlike the standard Regression Channel, which is based on data from a fixed lookback period, the Daily version is anchored at the start of the session. In other words it is a session indicator with similar properties to the Current Day VWAP.  The calculation is based on the bars in the defined session (ETH, RTH or custom), continuously increasing until the end of the session. Therefore, the daily channel stabilizes towards the end of the session.

Regression Channel for NT8
Daily Regression Channel vs. Standard Regression Channel

Other Channel Indicators available from our NinjaTrader indicators library include the Donchian Channel, Raff Channel, Projection Bands, Multiple Bollinger Bands and Keltner Channel.

More information on the standard Library Regression Channel for NinjaTrader 8 is available via link below:

Tutorials and Templates 

We respect your email privacy

Regression Channel REVISITED – with Bloodhound Tutorial