An Expert Advisor (EA) is different from every other download on this site — an indicator only plots or alerts, while an EA actually sends orders on your behalf. This free EA trades a single, transparent momentum strategy built entirely around the Accelerator Oscillator (AC), the fourth Bill Williams tool now covered on this site alongside the Alligator, the Awesome Oscillator, and Fractals. It enters the moment AC prints two consecutive same-colored bars, then manages Stop Loss, Take Profit, and position size automatically from the same risk tools taught elsewhere on this site.
How the Strategy Works
AC measures the acceleration or deceleration of the driving force behind price, which is itself the Awesome Oscillator. Where AO is calculated from two simple moving averages of the bar's midpoint (5-period minus 34-period), AC takes that AO reading and subtracts a further 5-period simple moving average of AO itself. The result tells you not whether momentum is positive or negative, but whether momentum is currently speeding up or slowing down relative to its own recent average — a subtly different question from what AO answers. Each AC bar is colored by comparing it to the bar before it: green when the current reading is higher than the previous one (acceleration increasing), red when it's lower (acceleration decreasing) — the same bar-to-bar coloring convention AO uses, applied one derivative further down the chain.
This EA is built around the classic Bill Williams "two-bar" trigger: two consecutive green bars signal that upward acceleration has been building for two bars in a row, and two consecutive red bars signal the mirrored downward case. Critically, this has nothing to do with where AC sits relative to its own zero line — a pair of green bars deep in negative territory still counts as a valid BUY trigger, because the signal is about the direction of change in acceleration, not the level of it. That's a meaningfully different question from the zero-line cross this site's Awesome Oscillator Momentum EA trades, and it's the reason this strategy tends to react a full step earlier — see "Why a Two-Bar Trigger Instead of a Zero-Line Cross" below for the full comparison.
Stop Loss, Take Profit, and Position Sizing
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), and Take Profit is then set at RiskRewardRatio × Stop Loss distance (default 2.0), so every trade this EA opens carries a fixed, known reward-to-risk proportion regardless of which pair or timeframe it's trading.
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 though the price distance to the stop changes trade to trade. A UseFixedLot input is available as an escape hatch for traders who'd rather trade a constant lot size regardless of risk percentage — useful for testing or for small accounts where percentage-based sizing rounds to the broker's minimum lot anyway.
Entry Conditions
- BUY — the Accelerator Oscillator prints two consecutive rising bars: the current bar's AC reading is higher than the previous bar's, and the previous bar's reading was in turn higher than the one before that (
acLast > acPrev > acTwoBack). Visually, this means two green bars in a row, regardless of whether either sits above or below AC's zero line. - SELL — the mirrored setup: two consecutive falling bars (
acLast < acPrev < acTwoBack), two red bars in a row.
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 two-bar pattern 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 (20260735) — so it never touches trades you open manually or trades placed by a different EA running 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
- ATRPeriod (default 14) — the lookback used to calculate ATR for Stop Loss sizing.
- ATRMultiplier (default 2.0) — Stop Loss distance = ATR × this multiplier.
- RiskRewardRatio (default 2.0) — Take Profit distance = Stop Loss distance × this ratio.
- UseFixedLot — switches position sizing from risk-based to a constant lot size.
- FixedLotSize (default 0.01) — the lot size used when
UseFixedLotis enabled. - RiskPercent (default 1.0) — percentage of account balance risked per trade, used to calculate lot size. Ignored if
UseFixedLotis enabled. - MaxSpreadPoints (default 30) — skips new entries while the spread is wider than this, to avoid opening trades at a bad price during illiquid conditions.
- MagicNumber (default 20260735) — tags every order this EA places so its position-management logic never touches trades opened by hand or by a different EA.
- EnableTrading — a master on/off switch, useful for pausing the EA without removing it from the chart.
Notice what's missing from that list: there is no AC period input anywhere, exactly like the Awesome Oscillator Momentum EA it sits alongside. That's not an oversight — it's a direct consequence of how the indicator is built. AC is derived entirely from AO's fixed 5-period and 34-period moving averages plus a further fixed 5-period average of AO itself, so there is nothing left to expose as a configurable setting. Every chart running this EA, on any account, is evaluating exactly the same calculation — one less variable to tune, and one less way to accidentally curve-fit a backtest by nudging a period value until the results look good.
Why a Two-Bar Trigger Instead of a Zero-Line Cross
It's worth comparing this EA directly to its sibling, the Awesome Oscillator Momentum EA, because both trade a Bill Williams momentum indicator with a fixed calculation and an ATR-based risk stack, yet they trigger on fundamentally different events. The AO Momentum EA waits for AO to cross its zero line — a relatively rare event that only happens when the fast average fully overtakes the slow one. This EA instead watches AC, which is one derivative removed from AO: it fires whenever AC's bar-to-bar change flips direction for two bars running, whether that happens near zero, deep in positive territory, or deep in negative territory.
That makes the two-bar AC trigger a step more responsive. Acceleration turning up or down is a leading signal relative to AO itself — momentum has to start accelerating before AO's underlying moving averages can eventually cross — so this EA typically enters earlier in a genuine move than a zero-line-cross strategy would, and it can also catch continuation moves that never bring AO anywhere near its zero line at all. The trade-off is exactly what you'd expect from a more sensitive trigger: it fires more often, and a larger share of those firings will be short-lived acceleration blips that reverse again within a bar or two, especially in a choppy, range-bound market where price has no sustained direction for acceleration to build on. A zero-line cross, by requiring a fuller shift in the underlying trend of momentum, filters out more of that noise at the cost of entering later. Neither approach is strictly better — a trader who wants earlier entries and can tolerate more false starts leans toward this EA, while one who wants fewer, higher-conviction signals leans toward the zero-line-cross EA. Pairing either one with a trend vs range read on current conditions, or a longer-term trend filter such as the Alligator, is the highest-leverage way to cut down on the false starts that a more responsive trigger like this one is naturally more exposed to.
Installation and Setup
EAs install into a different folder than indicators — this is the step people miss most often.
- Download the file below for your platform.
- Open MetaTrader → click
File→Open Data Folder. - Place the file in
MQL4/Experts(MetaTrader 4) orMQL5/Experts(MetaTrader 5) — not the Indicators folder. - Restart MetaTrader, then drag the EA from the Navigator window onto a chart.
- Enable AutoTrading (MT4) or Algo Trading (MT5) in the toolbar — the EA will not place any trades while this is off, even if it's attached to a chart.
- Review and adjust the input parameters in the EA's settings dialog before confirming.
A Word of Caution
Test on a demo account first, across different market conditions, before risking real money — past performance, in backtests or live, never guarantees future results. No strategy, automated or manual, wins every trade, and this EA can and will lose money on individual trades. Because the two-bar AC trigger is deliberately more responsive than a zero-line cross, it will generate more frequent signals than the site's other momentum EAs, and a meaningful share of those signals will be whipsaws in choppy, range-bound markets — consider pairing it with a trend filter such as the Alligator, or restricting it to conditions you've already identified as trending, rather than running it unfiltered on every pair and timeframe. Both files are source code — open and review them fully, and understand what every parameter does, before using it. This content is general education, not personalized investment advice.
Download the EA
How to Install — MetaTrader 4
- Download the
accelerator-oscillator-reversal-ea.mq4file below. - Open MetaTrader 4 → click
File→Open Data Folder. - Place the file in the
MQL4/Expertsfolder. - Restart MetaTrader 4, then drag the EA from the Navigator window onto the chart.
How to Install — MetaTrader 5
- Download the
accelerator-oscillator-reversal-ea.mq5file below. - Open MetaTrader 5 → click
File→Open Data Folder. - Place the file in the
MQL5/Expertsfolder. - Restart MetaTrader 5, then drag the EA from the Navigator window onto the chart.
Both files are source code — open and review the full code before using it, for your own safety.