Double CCI With SMA Indicator: Fast Against Slow

Written by Dominic Walsh · Published · Last updated

The double cci with sma indicator runs the same index twice at different speeds. `InpFastPeriod` reacts within half a day and `InpSlowPeriod` describes a much longer stretch. A crossing between them counts only when it happens beyond `InpBuyLevel` or `InpSellLevel`.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Separate window (levels 100 / 0 / -100)
Plots 4: CCI Fast, CCI Slow, Buy, Sell
Alerts popup
Inputs 6

What the file declares

CCI Fast is the dodger blue line at `InpFastPeriod` bars.

CCI Slow is the orange line at `InpSlowPeriod` bars.

Buy places a lime arrow twenty points below the crossing value.

Sell places a red arrow twenty points above it.

  • CCI Fast: line, dodger blue, width 2
  • CCI Slow: line, orange, width 2
  • Buy: arrow, lime, width 2, arrow code 233
  • Sell: arrow, red, width 2, arrow code 234
Double CCI with SMA indicator on EURUSD H1 with fast and slow readings crossing
Double CCI with SMA indicator on EURUSD H1 with fast and slow readings crossing

How it all fits together

Two speeds of the same index

iCCI supplies both readings on typical price, at `InpFastPeriod` `14` and `InpSlowPeriod` `50`. Running one index at two lengths gives a fast line and a slow one that share a scale exactly.

Testing the crossing

crossUp needs the fast reading at or below the slow one on the previous bar and above it now. crossDown mirrors that. Both bars come from completed data.

Filtering by location

A buy also needs the fast reading below `InpBuyLevel` `-50.0`. A sell needs it above `InpSellLevel` `50.0`. That rule removes the crossings that happen while both lines hover near zero.

How to read it

Both lines share one scale, so their distance apart is meaningful.

A crossing far from zero says more than one near it.

The slow line at fifty bars moves slowly, which makes crossings rarer.

Marks sit twenty points off the crossing value, so they trace the fast line.

Alert channels in this build: popup, one message per closed bar.

`InpEnableAlerts` ships on and raises a terminal popup on a closed-bar crossing. This build carries no push, email or sound channel. The guard permits one message per closed bar, so a crossing cannot repeat.

Every Double CCI With SMA Indicator input

Core settings

Setting What it does Default
InpFastPeriod Fast CCI period. Length of the quick reading, default `14`. 14
InpSlowPeriod Slow CCI period. Length of the slow reading, default `50`. 50
InpSmaPeriod SMA reference period. Reference average length, default `14`. 14
InpBuyLevel CCI must be below this for BUY cross. A buy crossing must sit below this, default `-50.0`. -50.0
InpSellLevel CCI must be above this for SELL cross. A sell crossing must sit above this, default `50.0`. 50.0

Alert settings

Setting What it does Default
InpEnableAlerts Enable alerts on closed bar. Popup on a closed-bar crossing, default `true`. on
Double CCI with SMA indicator inputs: InpFastPeriod, InpSlowPeriod, InpBuyLevel, InpSellLevel
Double CCI with SMA indicator inputs: InpFastPeriod, InpSlowPeriod, InpBuyLevel, InpSellLevel

Matching chart to settings

Two speeds of one index need a chart with enough bars for the slow line to matter. EURUSD H1 is the reference chart, where `InpSlowPeriod` at `50` covers two days. On M5 the slow line still reacts within hours. On H4 it describes over a week.

What it cannot do

Both lines read the same prices, so they are not independent views.

The index has no bounds, which leaves a crossing far out with nothing to work against.

Fifty bars of lag means the slow line turns long after price does.

Copy the compiled Double CCI With SMA Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the Double CCI With SMA Indicator for MT4 and MT5

The zip holds the compiled Double CCI With SMA Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Why run InpFastPeriod and InpSlowPeriod together?

Because two lengths of one index share a scale exactly, which two different indicators never do. The distance between the blue and orange lines is therefore meaningful, and a crossing is a clean comparison.

What does InpBuyLevel at -50.0 block?

Every crossing that happens while the fast reading sits above minus 50. Those are the crossings near the middle of the range, where the two lines tangle. The rule keeps marks to places where the index had already moved.

How far are the Buy marks from the crossing?

Twenty index points below the fast reading at that bar. So the marks trace the blue line rather than sitting at a fixed pane height. That makes a sequence of them easy to follow.

Does InpSlowPeriod at 50 lag badly?

It lags heavily, and that is the point of having it. A fifty-bar index describes two days on EURUSD H1. The fast line supplies the timing while the slow line supplies the context.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Double CCI With SMA Indicator as one input. Always backtest before trading live.

Category: this is part of our Oscillators collection. Also, truly, browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment