CCI Filter Levels Indicator: Six Levels, Two Triggers

Written by Dominic Walsh · Published · Last updated

The cci filter levels indicator gives you six adjustable reference levels instead of the usual two. Inner, mid and outer pairs frame the reading. Only the pair named by `UpperFilter` and `LowerFilter` produces a mark, so the rest are there to help you judge how far a move has run.

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
Plots 3: CCI, Buy, Sell
Alerts popup
Inputs 11

What renders

CCI is the dodger blue line in the pane below price.

Buy places a lime arrow drawn at the `LowerFilter` height.

Sell places a red arrow at the `UpperFilter` height.

Six adjustable levels frame the reading at 50, 150 and 200 either side.

  • CCI: line, dodger blue, width 2
  • Buy: arrow, lime, width 2, arrow code 233
  • Sell: arrow, red, width 2, arrow code 234
CCI filter levels indicator on EURUSD H1 with six reference levels and filter triggers
CCI filter levels indicator on EURUSD H1 with six reference levels and filter triggers

How the CCI Filter Levels Indicator does its maths

Reading the index

iCCI supplies the value at `CciPeriod` `14` using `PriceMode`, which defaults to typical price. The code also fetches the previous bar, so the trigger tests a crossing rather than a state.

Where the triggers sit

A buy needs the reading to cross up through `LowerFilter` `-100.0`. A sell needs it to cross down through `UpperFilter` `100.0`. Both mark a return from an extreme rather than the arrival at one.

Why the arrows sit at fixed heights

The buy buffer writes the `LowerFilter` value itself, not the reading. So marks line up neatly along the filter level instead of scattering across the pane. It makes a run of signals much easier to count.

Using it on a chart

The inner pair at 50 shows when the reading has barely left the middle.

The outer pair at 200 marks a genuinely stretched move.

Marks only ever appear at the filter levels, whatever the other four say.

Widen `UpperFilter` toward 150 for fewer and later triggers.

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

`EnableAlerts` ships on and raises a terminal popup on a closed-bar trigger. This build has no push, email or sound channel. The guard permits one message per closed bar, so a reading hovering on the filter cannot repeat.

Every CCI Filter Levels Indicator input

Core settings

Setting What it does Default
CciPeriod CCI period. Length of the index, default `14`. 14
PriceMode Applied price (typical default). Applied price, default typical price. PRICE_TYPICAL
UpperFilter Upper filter (cross down => SELL). Sell trigger level, default `100.0`. 100.0
LowerFilter Lower filter (cross up => BUY). Buy trigger level, default `-100.0`. -100.0
Level50Pos Inner positive level. Inner positive reference, default `50.0`. 50.0
Level50Neg Inner negative level. Inner negative reference, default `-50.0`. -50.0
Level150Pos Mid positive level. Mid positive reference, default `150.0`. 150.0
Level150Neg Mid negative level. Mid negative reference, default `-150.0`. -150.0
Level200Pos Outer positive level. Outer positive reference, default `200.0`. 200.0
Level200Neg Outer negative level. Outer negative reference, default `-200.0`. -200.0

Alert settings

Setting What it does Default
EnableAlerts One alert per closed bar. Popup on a closed-bar trigger, default `true`. on
CCI filter levels indicator inputs: CciPeriod, PriceMode, UpperFilter, LowerFilter
CCI filter levels indicator inputs: CciPeriod, PriceMode, UpperFilter, LowerFilter

Suitable markets

The index scales itself by mean deviation, so it travels between instruments. EURUSD H1 is the reference chart, where `CciPeriod` at `14` covers a little over half a day. On M5 the reading crosses the filter pair several times a session. On daily charts it does so a few times a year.

What it misses

A crossing back inside the filter can happen mid-trend and lead nowhere.

Six levels on one pane is a lot to read, and four of them carry no logic.

The index has no bounds, so a reading past 200 has no ceiling to work against.

Copy the compiled CCI Filter Levels 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.

Background reading on the method behind the CCI Filter Levels Indicator: Aroon Oscillator at StockCharts ChartSchool, Double top and double bottom on Wikipedia.

Download the CCI Filter Levels Indicator for MT4 and MT5

The zip holds the compiled CCI Filter Levels 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 do only UpperFilter and LowerFilter trigger?

Because the other four levels exist for context. `UpperFilter` `100.0` and `LowerFilter` `-100.0` carry the crossing test. The inner and outer pairs simply frame how far the reading has travelled, which helps you judge a trigger when it arrives.

What does PriceMode default to?

Typical price, which averages high, low and close. That is the original definition and takes the whole bar into account. Switching to close-only makes the line slightly jumpier and shifts crossings by a bar here and there.

Why does the Buy arrow sit on the level?

The buffer writes the `LowerFilter` value rather than the reading, so every mark lands at the same height. That makes a run of them easy to count. It also keeps the arrows clear of the line they refer to.

Can I move Level200Pos and Level200Neg?

Yes, all six are inputs. They are named for their defaults rather than fixed to them. Traders on fast charts often pull the outer pair in, since a reading past 200 is common on M5 and rare on daily.

Are results guaranteed?

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

Category: this is part of our Oscillators collection. Also, 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