Regression Channel

NinjaTrader 8 comes with a standard version of the Regression Channel. The library version includes the option of calculating the last bar plotted on the chart, display of regression bands, trend definition and normalized values for the channel slope and width.

Indicator Description

Common Limitations of the Linear Regression Channel:

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

  • The default indicator calculates the regression channel 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.

Regression Channel Improvements:

This LizardTrader Linear Regression version addresses the issues as follows:

  • The regression channel is calculated from the last bar shown on the chart and 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.

Repainting behavior:

All regression channels – whether linear or polynomial – belong to the class of repainting indicators. Specifically, regression channels are retrofitted to the selected lookback period. The repainting can be easily observed with this indicator when scrolling horizontally. This indicator comes with an option to show the trace that the regression channel has painted on the chart without repainting any prior bars.

Public DataSeries:

The indicator comes with four additional public DataSeries that can be accessed via the strategy builder.

  • Normalized slope: This is an output which returns the slope in synthetic degrees. The slope has been normalized by dividing it by the square root of the average true range and then applying the arctangent.
  • NormalizedChannelWidth – This series returns the normalized channel width around the regression line and may be used as a measure of non-directional volatility.
  • RegressionTrend – The regression trend holds the value + 1 for an up-sloping regression line and -1 for a down-sloping regression line.
  • Market Analyzer Columns: The indicator comes with three separately coded market analyzer columns which allow for displaying normalized slope, normalized channel width and the regression trend on the market analyzer.

The indicator is available for NinjaTrader 8.