Loading…

CCI Extreme Fade EA

Fading CCI the instant it first crosses +100 or -100 means fighting the move at its strongest point - CCI can, and often does, keep climbing for a long stretch after that first crossing, and a naive fade gets run over repeatedly in a trending market. This implementation waits one step longer: CCI has to breach the threshold and then cross back inside it before the EA takes a position. That later entry trades the confirmed reversal instead of guessing the top or bottom of an extending move. Stop loss and take profit are fixed pip distances, converted to points per symbol from the broker's own digit count. Position sizing can run as a fixed lot or, with InpUseRiskSizing on, as a percentage of equity risked to the stop distance, using MODE_TICKVALUE and MODE_TICKSIZE rather than a hardcoded contract size so it prices correctly on gold, indices and JPY crosses as well as plain FX pairs. Notes and limitations - Waiting for CCI to re-enter the band cuts down on fading a still-extending trend, but does not eliminate the risk - a market can push to a new extreme, fold back briefly, and resume the same direction. - Signals are evaluated once per closed bar, not on every tick. - One position at a time, tracked by InpMagicNumber. It will not manage or interfere with trades opened manually or by another EA - except on an MQL5 netting account, where a same-symbol position from something else can merge with this EA's own, see MQL4 VERSUS MQL5 DIFFERENCES above. - Requires AutoTrading enabled; if trading is disabled the EA logs it and skips the entry (MQL4: IsTradeAllowed(); MQL5: the AutoTrading button, account and Expert Advisor permission checks combined).

Expert advisor · MT4 · v1.0 · Free

About CCI Extreme Fade EA

CCI Extreme Fade EA is an expert advisor (trading robot) for MetaTrader 4 based on CCI. It can size trades from your balance and risk percent. It has 11 settings, such as Cci period, Cci threshold and Stop loss pips. MQL source code included.

Files in the download: CciFadeEa.ex4, CciFadeEa.mq4, CciFadeEa.txt.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Cci period14CCI period
Cci threshold100.0Extreme level that must be breached and re-entered
Stop loss pips40Stop loss distance, in pips
Take profit pips60Take profit distance, in pips (0 = none)
Use risk sizingfalseSize by percent risk instead of a fixed lot
Risk percent1.0Percent of equity risked per trade, when risk sizing is on
Fixed lots0.10Lot size when risk sizing is off, or as a fallback
Magic number20260701Magic number for orders opened by this EA
Slippage pips3Slippage tolerance, in pips
Max retries5Attempts per trade action before giving up
Retry wait ms500Pause between attempts, milliseconds

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: CCI · Channels & Envelopes · Trend · Risk & Lot Size · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria