LearnForexHub
EA

EA: Force Index Cross Expert Advisor

Written by , Founder & EditorLast updated How we write and review lessons

Everything else you can download on this site just draws or alerts — an Expert Advisor is different, because it submits orders on your behalf. This free EA trades a single, transparent strategy built around the Force Index crossing its zero line: it enters the moment volume-weighted force flips from one side of the market to the other, then manages Stop Loss, Take Profit, and position size automatically from the same risk tools taught elsewhere on this site.

How the Strategy Works

The entry signal is the zero-line cross of Elder's Force Index — the same signal explained in the Force Index lesson. The Force Index multiplies each bar's price change by its volume, then smooths the result with a 13-period EMA, so its sign tells you which side of the market has control and its distance from zero tells you how forcefully. When the smoothed line crosses from below zero to above, buyers have just taken over on rising participation; the mirror applies when it crosses down.

What makes this different from a pure price crossover — like a Moving Average cross — is the volume term baked into the signal. A zero cross backed by heavy volume reflects broad participation in the new direction, which is exactly the kind of move Elder designed the indicator to catch. The trade-off is that the volume weighting also makes the raw reading spiky, so the EA works off the 13-period smoothed line and evaluates the cross only on completed bars, never intrabar, to avoid reacting to a single noisy tick.

Stop Loss, Take Profit, and Position Sizing

PriceTake Profit (TP)Stop Loss (SL)BUY0Force Index (volume-weighted, oscillates around a zero line)
Entry conditions: BUY when Force Index crosses back above zero — SELL on the mirrored cross back below zero — SL and TP are placed automatically from ATR

Both Stop Loss and Take Profit are sized from ATR rather than a fixed pip distance — a volatile pair or session gets a wider stop automatically, and a calm one gets a tighter stop, so the stop always reflects what the market is actually doing right now rather than an arbitrary number chosen once and left unchanged. Stop Loss distance is ATRMultiplier × ATR (default multiplier 2.0, with ATR calculated over ATRPeriod = 14 bars), and Take Profit is then set at RiskRewardRatio × Stop Loss distance (default 2.0), so every trade carries a fixed, known reward-to-risk proportion regardless of pair or timeframe.

Position size is calculated from RiskPercent (default 1.0%) against your account balance and the Stop Loss distance — the exact worked-example method from Risk Management Basics: risk amount ÷ Stop Loss distance = lot size. A wider ATR-based stop on a volatile pair automatically produces a smaller lot, and a tighter stop on a calm pair produces a larger lot, so the dollar risk per trade stays roughly constant even as the price distance to the stop changes from trade to trade. A UseFixedLot input is available as an escape hatch for traders who'd rather trade a constant lot size — useful for testing, or for small accounts where percentage-based sizing rounds to the broker's minimum lot anyway.

Entry Conditions

  • BUY — Force Index crosses from at-or-below zero to above zero on consecutive completed bars: the previous bar's reading was zero or lower, and the current bar's reading is above zero.
  • SELL — Force Index crosses from at-or-above zero to below zero — the mirrored setup.

Beyond the signal itself, three safety mechanics govern every trade: the EA only evaluates these conditions once per new bar (not on every tick, so a single crossover can't fire multiple trades within the same candle), only opens one position at a time (a new signal is ignored while a position from this EA is already open), and only manages positions tagged with its own magic number (20260801) — so it never touches trades you open manually or trades placed by a different EA on the same account. A spread filter also sits in front of every entry: if the current spread is wider than MaxSpreadPoints, the EA skips that bar entirely rather than opening a trade at a bad price during illiquid conditions.

Parameters

  • ForcePeriod (default 13) — the EMA smoothing period for the Force Index; Elder's classic trend setting.
  • MAMethod (default EMA) — the moving-average type used to smooth the raw Force Index.
  • AppliedPrice (MT4) / AppliedVolume (MT5) — MT4's iForce reads an applied price, while MT5's reads an applied-volume type (tick or real); each platform's file exposes the input its function actually takes.

What's left — position sizing, stop and target geometry, and the safety checks — follows the site-wide risk engine, documented on the EAs overview. Trades opened by this EA carry magic number 20260801.

Why a Volume-Weighted Cross, and Where It Struggles

This EA trades every zero-line cross exactly as it happens, with no minimum distance from zero required and no trend filter layered on top. Compared to the site's other zero-line-cross EAs — the OsMA cross EA, the Awesome Oscillator momentum EA, and the Momentum cross EA — the distinguishing feature here is the volume term. A price-only oscillator flips sign purely on price movement, whereas the Force Index needs both a price change and the volume to weight it, which is meant to filter out listless moves that drift across the level on almost no participation.

That design helps in trending, actively traded conditions and hurts in two specific situations. The first is a quiet, range-bound market, where price and volume are both flat: the smoothed line hovers near zero and crosses it repeatedly on noise, bleeding small losses on each false entry — the same whipsaw problem every zero-line oscillator has, and the reason checking trend vs range conditions first is the highest-leverage thing you can do before running this EA. The second is a volume spike around a news release or session open, where a single unusually heavy bar can shove the Force Index across zero out of proportion to the actual price move, then reverse once volume normalizes. Adding a moving-average or ADX-based trend filter, or an economic calendar news filter, is a natural next customization for anyone comfortable editing the source.

A Word of Caution

Give it an extended demo period in varied conditions before going live — historical performance, simulated or real, is not a promise of future results. Every strategy — automated or manual — takes losing trades, and this one will too. The Force Index zero cross has no built-in filter for choppy conditions or for volume spikes around news: expect runs of false crosses in quiet markets and the occasional outsized signal around a release. Remember too that MetaTrader's "volume" in forex is tick volume, a proxy for real traded volume, not the real thing. Consider pairing this EA with a trend or news filter, or only running it on pairs and timeframes you've confirmed are trending, rather than leaving it on every chart in every condition. Everything is distributed as source code: review it line by line, and don't run anything whose parameters you can't explain. Treat everything here as general education rather than personalized investment advice.

Download force-index-cross-ea.mq4

For MetaTrader 4 — this is source code (.mq4), open and review it fully before using it.

Download File

Download force-index-cross-ea.mq5

For MetaTrader 5 — this is source code (.mq5), open and review it fully before using it.

Download File

How to install

An EA installs into the Experts folder, not Indicators — this is the step people miss most often.

MetaTrader 4

  1. Download force-index-cross-ea.mq4 above.
  2. Open MetaTrader 4FileOpen Data Folder.
  3. Place the file in the MQL4/Experts folder.
  4. Restart MetaTrader 4, then drag it from the Navigator window onto a chart.
  5. Enable AutoTrading (MT4) or Algo Trading (MT5) in the toolbar — the EA places no trades while this is off, even when attached to a chart.
  6. Review and adjust the input parameters in the settings dialog before confirming.

MetaTrader 5

  1. Download force-index-cross-ea.mq5 above.
  2. Open MetaTrader 5FileOpen Data Folder.
  3. Place the file in the MQL5/Experts folder.
  4. Restart MetaTrader 5, then drag it from the Navigator window onto a chart.
  5. Enable AutoTrading (MT4) or Algo Trading (MT5) in the toolbar — the EA places no trades while this is off, even when attached to a chart.
  6. Review and adjust the input parameters in the settings dialog before confirming.

Both files are source code. Open and read them in MetaEditor before running them on any account.