Dual CCI Indicator Forex Trend Strategy

Feb 19, 2021

The Commodity Channel Index (CCI) is an underrated momentum indicator that is often overshadowed by the RSI and MACD.
I’ll show you how to build a simple trend following strategy using a pair of CCI indicators!
The complete strategy can be downloaded in the Free Strategies section.

The CCI indicator was invented by Donald Lambert in 1980 to detect cyclical turns in commodities, and has since become one of the most popular momentum indicators.

In essence, it measures the current price relative to an average price over a given lookback period. Unlike most indicators, the CCI uses typical price instead of closing price. Some feel that typical price (TP), calculated as (high+low+close)/3, is more representative of price action. 

The formula for a default 20-period CCI is:

The mean deviation is calculated as follows:

With the 20-period lookback, Lambert selected a 0.015 constant for the denominator such that the CCI would fall within the ±100 range 70-80% of the time.

Shorter lookbacks will produce a more volatile CCI, with the indicator often exceeding the ±100 range. Unlike the RSI and Stochastic oscillators, the CCI is unbound, meaning there is no minimum or maximum CCI value.

How Do Traders Use the CCI Indicator?

1. Detecting Overbought/Oversold Conditions

With shorter lookback periods, the CCI is most commonly used as an overbought/oversold indicator.

The CCI +100 level is usually used to indicate an overbought condition, while -100 indicates an oversold condition.

The chart below shows the 20-period CCI applied to the USDCAD, a mostly ranging market.

2. Trend Detection

When a longer lookback period is used, the CCI can be used to detect trends. Values above +100 indicate an uptrend, while values below -100 indicate a downtrend.

Lookback periods in the 60-100 range are generally good for trend detection. I do not recommend anything below 50 for the CCI since it is particularly reactive to price changes.

The chart below shows the 80-period CCI indicating an uptrend in the GBPJPY.

The Dual CCI Trend Strategy

We need a way to exploit both of the CCI’s uses above.

How about a trend following strategy that enters the market on a short-term pullback?

An 80-period CCI will be used for trend detection. We’ll throw in a 5-period CCI to detect short-term overbought/oversold conditions during pullbacks. In this context, the CCI is also being used as a pullback filter.

So a long signal will occur when the 80-period CCI is above +100, and the 5-period CCI is below -100. Rules are symmetrical for the short side.

Wait, what if the pullback eventually turns into a trend reversal? Don’t catch a falling knife!

Since we want to focus on trends that display signs of continuation, we will place buy stops at the previous bar’s high. Sell stops will be placed at the previous low.

The strategy’s pseudocode is as follows:

IF the 80-period CCI is above +100
AND the 5-period CCI is below -100,

THEN Place a buy stop at the previous bar’s high. Order is valid for 3 bars. 

Rules are symmetrical on the short side.

I try not to overthink trade management when it comes to trend following strategies. Most successful trend strategies do not use much management; they simply let the trend run till it reverses.

I’ll just use a 200-pip stop loss and trailing stop for trade management.

The CCI strategy was programmed in AlgoWizard as shown:

Dual CCI Trend Strategy Results

I did a 10-year backtest on my favourite trend following market, the GBPJPY.

Seems like the CCI was put to good use! Results are decent for a single-indicator strategy.

Out of curiosity, I decided to optimize the long-term CCI’s lookback period. The lookback period of the entry indicator usually has the largest impact on strategy performance.

I optimized the lookback period from 20 to 200, in steps of 1.

It is encouraging that all 181 optimizations are profitable, and that the average profit is over 9000 pips. This indicates that the strategy parameters are likely stable.

With net profit as the performance metric, the 80-period lookback seems to be in the middle of a high plateau.

This confluence with the optimization results gives me confidence that the strategy is logically sound. In other words, the 5 and 80-period CCIs are likely effective at detecting pullbacks in long-term trends.

Wrapping Up

The versatile CCI deserves a place in the trader’s toolbox. It can be used to detect both trends and pullbacks; all you need to do is vary its lookback period.

One downside of the CCI is its high reactivity to prices. It’s common to see the CCI move from -100 to +100 within a few bars. To combat this, you may choose to apply a smoothing function to the CCI. I have found success using a 5-period SMA of the CCI.

The completely strategy can be downloaded in the Free Strategies section.

Want to develop a portfolio of automated trading strategies?

Supercharge your strategy development with StrategyQuant

Access 14-day FREE trial here!

Get up to USD 300 discount!

Strategies need improvement?

Use QuantAnalyzer’s powerful analysis tools

Try the FREE version here!

Get 20% Discount here!

FXVM Forex VPS
Follow Us

Popular Posts

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

read more

What is Fixed Ratio Money Management?

Have you heard of fixed ratio money management? How does it compare to the popular fixed fractional approach? Here I’ll explain how fixed ratio works, and see how it stacks up against fixed fractional money management.

read more

Build a Diversified Portfolio With QuantAnalyzer

The ability to efficiently trade a diversified portfolio of strategies is one of the biggest advantages of algorithmic trading. Here we will use QuantAnalyzer’s Portfolio Master to build a portfolio consisting of high performing, uncorrelated strategies.

read more

What Is the QQE Indicator?

The QQE is a mysterious indicator that sometimes pops up in trading forums. Does it deserve a place alongside the more traditional momentum indicators like the RSI and CCI? Let’s add it to a trend following strategy to find out!

read more

Hey there, Wayne here! I’m on a mission to develop robust algorithmic trading strategies for the forex markets. Trading Tact is where I share my trading methods and insights.

Follow Us
Have a Question?

Comments

0 Comments

Submit a Comment

Your email address will not be published.

Want to develop a portfolio of automated trading strategies?

Supercharge your strategy development with StrategyQuant

Access 14-day FREE trial here!

Get up to USD 300 discount!

Strategies need improvement?

Use QuantAnalyzer’s powerful analysis tools

Try the FREE version here!

Get 20% Discount here!

FXVM Forex VPS

Recent Posts

Should You Use the Kelly Criterion for Forex Trading?

Should You Use the Kelly Criterion for Forex Trading?

The Kelly criterion is a famous mathematical formula that attempts to maximize your long-term capital growth. In this post, I’ll apply it to a EURUSD breakout strategy and explain some of its potential shortcomings when applied to forex trading.

read more
How to Find a Real Trading Guru

How to Find a Real Trading Guru

Every day I come across a trading guru offering educational content on the internet. Many of them speak of huge returns with minimal effort. Should these be trusted? Here’s some tips on how to separate the wheat from the chaff.

read more
How to Enjoy Stress-Free Trading

How to Enjoy Stress-Free Trading

Trading is a great way to make some additional income, but not if you’re constantly pulling your hair out. Here I offer 7 tips to help make your trading profitable and stress-free.

read more
How to Get a Realistic Backtest Spread

How to Get a Realistic Backtest Spread

Your choice of backtest spread can certainly make or break a strategy. This post will show you how to study the intraday spread variations of your market, and suggest several ways to avoid paying ridiculous spreads.

read more

Hey there, Wayne here! I’m on a mission to develop robust algorithmic trading strategies for the forex markets. Trading Tact is where I share my trading methods and insights.

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Pin It on Pinterest

Share This