Staying on the Right Side of the Trend: LinReg and CCI
In this article we are going to explore the hidden power of two “classic” indicators, Linear Regression (LinReg) and Commodity Channel Index (CCI). Each indicator is / was widely popular, and the methods for trading either vary widely. The concepts we present here will be surprisingly simple, but yet possibly more effective than the conventional thought leadership on either indicator. At the bottom of this article, we have included a video that goes over the same information we present in this article, as well as, two chart templates (one for NinjaTrader 7 and the other for NinjaTrader 8).
The indicators required to build the chart are below and we will explore each on their own and then look at them all combined:
- Linear Regression (LinReg) Moving Average
- Moving Average Crossover
- Commodity Channel Index (CCI) Oscillator
1 + 2. Linear Regression and Moving Average Crossover
The power of The Framework allows us to look at the LinReg in three different views:
- 8 period LinReg
- 8 period step LinReg
- 8 period LinReg normalized as an oscillator
The above chart looks dull and boring, but we can fix that easily by using the functions built into each of our indicators, along with adding a MA Crossover indicator. The below chart colors both LinReg based on Rising / Falling and the Oscillator based on whether or not it is above / below 80 / 20:
3. Commodity Channel Index (CCI)
The LinReg combination does great on it’s own, but the CCI adds two things:
- Confirmation of the longer term trend
- Identification of potential areas that are over bought / sold
The CCI is based on a period of 14 and will be colored based on whether or not it is above 0. Also, the background will be colored yellow when the CCI is greater than or less than 200 or -200. Not only that, we overlay the CCI on top of the LinReg oscillator to conserve chart space and focus on price (the CCI and LinReg are small parts of the setup):
Final Piece
The final piece is to switch to our favorite time-frame on the ES, which is a 6 range chart (but you can use whichever chart is your favorite), and explain the setups:
- If you are looking for a long, wait for the CCI to be greater than 0, or if you are looking for a short, wait for the CCI to be less than 0
- If the CCI ever exceeds 200 when you are looking for a long, or -200 when you are looking for a short, wait for a change in direction
- When there is a change in direction, wait for the LinReg oscillator to exceed 80 (for longs), or 20 (for shorts)
- A change in direction is defined when the the first of the following occurs:
- The MA Cross changes color
- The LinReg Step changes color
- When the bar colors are in the direction of your bias, this should give us more confidence to hold for a larger profit target
Below are a couple examples of setups:
Video on Developing Charts and Going Over Setups
Chart Templates for NinjaTrader
- NinjaTrader 7: Click Here.
- NinjaTrader 8: Click Here.
Leave a Reply