The I-regr indicator also known as the Linear Regression Channel consists of two parallel lines, equidistant up and down from the line of linear regression trend. The distance between frame of the channel and regression line equals to the value of maximum close price deviation from the regression line.
If price is below the bottom line - BUY
If price is above the upper line - SELL
The middle line can be also used as the Take Profit area or Target Limit.
Linear Regression Slope. Should return the same values as the standard LinRegSlope. However, the standard version iterates on every update, making it especially inefficient for intrabar (tick) data. This version does not iterate on intrabar updates. Version 1.0.
If somebody could improove it to become a Trigger line. Only the Exponential moving average have to be plot with the linreg line. It could be done with Costume moving average, which has the option (Previous indicators data). But it would be better if it would be coloured trigger line like in Ninjatrader.
This indicator uses Linear Regression as main driver. It's based on a longer and shorter period LR used as a signal.
I find it most suitable for indicating when to add new contracts to already opened position or if you've missed trend break-out this can find you a nice entry.
Should you have market trending down, you enter when histogram reaches near 0 and you can either wait to change direction and go in the opposite direction or use some "fixed" near 0 detection method.
On the image you can see how nice have been identified places where to add to an existing position, or even enter market if not done so already.
Please check here for early trend change identification and how trading divergences possibilities.
Parameters:
- Adaptive period: you can select to use adaptive period proposed by John Ehlers for short period calculation
- Period multiplier: is to be used if you've selected adaptive period so from short period calculated will be derived long period value by multiplication
- Long LR period/Short LR period: are to be used as fixed values for Linear regression period
- Long/Short smoothing: is SMA smoothing applied to LinReg
Notes:
- Red/Green histograms are selected on Falling/Rising base respect to previous value.
- In debug mode you can see additional 2 lines plotted. Those are actual angle measure line for longer and shorter period LR.
Linear Regression Channel consists of two parallel lines, equidistant up and down from the line of linear regression trend. The distance between frame of the channel and regression line equals to the value of maximum close price deviation from the regression line.
This indicator can plot a liner regression, a parabolic regression (second-power), and a polynomial regression (third-power).
This Indicator is the Raff Regression Channel or RRC. Some credit needs to be given to FatTails as I used his regression channel that painted bars as a starting point. You can find his code here:
The Regression Channel already comes as a NinjaTrader default indicator. However, the NinjaTrader default indicator comes with a few limitations, which are adressed by this indicator:
- 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.
This version of the indicator has the two issues addressed:
- The regression channel is calculated from the last bar shown on the chart and will adapt its position accordingly when you scoll 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. All regression channels are retrofitted to the selected lookback period. The repainting can be easily observed with this indicator when scrolling horizontally. The indicator comes with an option to display the regression bands. The regression bands 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 upsloping regression line and -1 for a downsloping regression line.
Market Analyzer Columns: The indicator comes with three separately coded market analyer columns which allow for displaying normalized slope, normalized channel width and the regression trend on the market analyzer.
This indicator is an enhanced version of the NinjaTrader Regression Channel Indicator.
The indicator calculates the same values for the linear regression as the default NinjaTrader indicator does, but uses a modified Plot() method.
If you scroll the chart horizontally, this indicator will display the regression channel for the last bar painted on the chart, while the NinjaTrader indicator always displays the regression channel for the last bar of the data base.
To understand how it works, just put both indicators - the NinjaTrader default indicator and this indicator - on your chart and scroll horizontally, and you will notice the difference.
Update July 23, 2011: Indicator updated to work with non-equidistant bar spacing, as used by multi-series charts.
October 20th, 2014 08:11 PM Zephyr THANK YOU VERY MUCH!
September 10th, 2013 08:48 PM Scott305
September 18th, 2010 08:23 PM marin I downloaded into Ninja 7 beta21 and the indicator plotted somewhat OK initially in the standard default settings mode..
.
The HATEMA and TEMA lines do not seem to plot. Fill OB/OS works OK.
Not sure if the 2nd and 3rd power regressions plotted correctly...setting the degree to 2, 3 & 4 produced similar lookin
g results.
May 27th, 2010 12:56 PM theLonelyTrader Used with volume analysis and price action, my favorite market indicator by far, especially on leading instruments like
6E, CL and DAX.
November 1st, 2009 02:19 PM cclsys Excellent. I suspect this will end up being one of the only 2-3 indicators I intend to have up on a chart during trading
. Is dynamic, visually simple, and technically sophisticated. Thanks.
April 4th, 2019 12:40 PM Maxie very helpful, thanks
August 3rd, 2018 05:09 PM Zephyr I'm a HUGE believer in the Polynomial Regression Channel. If it's coded correctly, it's highly predictive for support a
nd resistance. I use 2 of them on my charts. One is longer term (150 - 200 bars for daytrading), and one is short-term
(50 bars). I only use upper and lower lines. I use one at full range for the multiple time frames of swing trading.
The only one I've ever seen coded perfectly and correctly is the one made by Robert Payne at www.funwiththinkscript.com
- made for Thinkorswim.
Thank you very much for this. I will test it shortly.
July 8th, 2018 06:09 AM Ratdog INstant money maker when applied correctly.
May 27th, 2017 01:55 AM romus I am keen to see live results from trading it (about to test on some strategies in NT7) - even though it repaints, but a
s long as highs and lows stay within extremes the results should be as per backtesting.
It certainly is difficult to follow visually.
I am not into NT8 yet - but glad to see this indi is already converted