OPEN-SOURCE SCRIPT

Quad CCI Containment

The Quad CCI is a trend identification indicator described by Mark Whistler in his book 'Volatility Illuminated'. The reason for using four separate CCI channels is so that we can:

  • Prevent ourselves from taking positions against momentum.
  • Time our trades with short-term 'wrist-rocket' thrust from the larger market momentum.
  • Clearly determine whether the trend is up, down, or sideways.


In his book, Whistler refers to four CCI channels as 'The Four Horsemen'. The 100 and 200 are like big burly swordsmen, which are hard to budge without significant force. The 50-period CCI is more like the guy who's fast on his feet, but still tough enough to take on the big dudes. And the 14-period is similar to the scout of the party. The fastest of the bunch, but also the first to turn-tail at any sign of danger.

Basically, this means that when we see the 100 and 200-CCI stay above the 0 line, we can infer there really isn't any reason for them to move out of their range. The 50-period CCI will sometimes venture over the 0-line, before the hefty battlers. However, the 14-period will often venture (quickly) way out into the yonder, and he will always return to tell his pals what he's found. Crossing back over the 100-line, traders can take 'rocket trend reentry' positions (usually on the median); however, we still want to keep an eye on the flighty 14-period CCI character. If he crosses back over the +100 or -100 level he was just scouting, it means the larger weighted CCI lines could soon to follow too, as the whole bunch runs from larger momentum on the way.

Traders seeking to take a position 'with the trend' can attempt to purchase pullbacks on the mean if:

  • Longer-term CCI (at least the 200 and 100) are above zero.
  • The 50-period CCI is not below -100.
  • The 14-period travels back up from underneath the -100 area.
Commodity Channel Index (CCI)Oscillatorswhistler

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer