CCI EMA Indicator: A Signal Line On The Index Itself

Written by Dominic Walsh · Published · Last updated

The cci ema indicator gives the index a signal line, then adds a location rule. A crossing on its own means little in the middle of the range. So this build marks one only beyond `UpperThreshold` or below `LowerThreshold`.

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 -50 / 0 / 50)
Plots 4: CCI, EMA(CCI), BUY, SELL
Alerts popup, push notification, email
Inputs 8

What the Cci Ema Indicator draws on the chart

CCI is the dodger blue line and EMA(CCI) is the orange smoothing over it.

BUY places a lime arrow at a crossing up below the lower threshold.

SELL places a red arrow at a crossing down above the upper threshold.

Reference lines mark 50, 0 and minus 50.

  • CCI: line, dodger blue, width 2
  • EMA(CCI): line, orange, width 2
  • BUY: arrow, lime, width 2, arrow code 233
  • SELL: arrow, red, width 2, arrow code 234
CCI EMA indicator on EURUSD H1 with the index, its smoothing and filtered crossings
CCI EMA indicator on EURUSD H1 with the index, its smoothing and filtered crossings

How the Cci Ema Indicator calculates its values

Smoothing the index itself

iCCI fills CciBuf at `CciPeriod` `14` on typical price. iMAOnArray then runs an exponential average at `EmaPeriod` `9` over that buffer. The orange line therefore smooths the reading, not price.

Testing the crossing

cross_up needs the index at or below its average on the previous bar and above it now. cross_down mirrors that. Both comparisons read stored buffer values rather than recomputing anything.

Adding the location rule

A buy also needs the crossing to happen below `LowerThreshold` `-50.0`. A sell needs it above `UpperThreshold` `50.0`. That rule removes the crossings that happen while the index hovers around zero.

How to read the signals

The orange line lags the blue one, so a crossing confirms a shift late.

Marks sit `ArrowOffsetCci` `12.0` units from the reading in pane terms.

A crossing between the two thresholds produces nothing at all.

Widen both thresholds for fewer and later marks.

Alert channels in this build: popup, push notification and email, one message per closed bar.

`EnableAlerts` ships on and covers the signal. `EnablePush` and `EnableEmail` add mobile and mail delivery, both starting false. Those three are the whole set here. The crossing test reads completed bars, one message per closed bar.

Every Cci Ema Indicator input

Core settings

Setting What it does Default
CciPeriod CCI period. Length of the index, default `14`. 14
EmaPeriod EMA period (applied to CCI). Smoothing applied over the index, default `9`. 9
UpperThreshold SELL when CCI crosses DOWN through EMA ABOVE this. A sell crossing must sit above this, default `50.0`. 50.0
LowerThreshold BUY when CCI crosses UP through EMA BELOW this. A buy crossing must sit below this, default `-50.0`. -50.0

Display settings

Setting What it does Default
ArrowOffsetCci Arrow vertical offset (subwindow CCI units). Mark distance from the reading in pane units, default `12.0`. 12.0

Alert settings

Setting What it does Default
EnableAlerts Send alert on signal. Sends an alert on a signal, default `true`. on
EnablePush Send push notification. Phone push on a signal, default `false`. off
EnableEmail Send email. Mail delivery on a signal, default `false`. off
CCI EMA indicator inputs: CciPeriod, EmaPeriod, UpperThreshold, LowerThreshold
CCI EMA indicator inputs: CciPeriod, EmaPeriod, UpperThreshold, LowerThreshold

Settings that fit your chart

Smoothing an index and filtering by location suits mid timeframes. EURUSD H1 is the reference chart, where `CciPeriod` at `14` covers over half a day. On M5 the two lines cross constantly and the thresholds do the work. On H4 marks turn scarce.

When the Cci Ema Indicator fails

Two layers of smoothing sit between price and the mark, so it arrives late.

The thresholds at 50 and minus 50 are narrow, so plenty still gets through.

The index has no bounds. A crossing far out has no ceiling to work against.

Copy the compiled Cci Ema 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 Cci Ema Indicator for MT4 and MT5

The zip holds the compiled Cci Ema 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

What does EmaPeriod smooth, price or the index?

The index. iMAOnArray runs over CciBuf rather than over price. So the orange line is an average of the reading itself. Crossings between the two are a statement about the index, not about price.

Why add UpperThreshold and LowerThreshold?

Because a crossing near zero happens constantly and says very little. Requiring a sell crossing to sit above `UpperThreshold` `50.0` keeps marks to places where the reading had already moved somewhere.

What units does ArrowOffsetCci use?

Pane units, not price. At `12.0` a mark sits twelve index points from the reading it belongs to. That keeps it clear of the two lines without floating to the top or bottom of the pane.

Which channels does EnableAlerts cover?

Three. `EnableAlerts` handles the terminal message. `EnablePush` adds a phone notification. `EnableEmail` adds mail. Those are the only routes this build carries, so watch the alerts tab if you need more.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Cci Ema 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