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 Awesome Oscillator (AO): it enters the moment AO crosses its zero line, 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 Awesome Oscillator's zero-line cross — the same signal explained in the site's Awesome Oscillator lesson, applied here with no secondary pattern or filter. AO is calculated from the bar's midpoint price, (High + Low) / 2, rather than the closing price: a fast 5-period simple moving average of that midpoint minus a slow 34-period simple moving average of the same midpoint. When the fast average is above the slow average, AO reads positive, meaning recent momentum is stronger than the longer-term average; when the fast average is below the slow average, AO reads negative. The zero line is the exact point where the two averages are equal, so a cross through it marks the moment the fast average overtakes (or is overtaken by) the slow one — a genuine shift in which timeframe of momentum is currently in control, not just a wiggle in the histogram's height. Because AO only compares two moving averages of price, without any secondary smoothing or signal line, the zero-line cross is the most literal, least-processed momentum signal AO can produce, which is exactly why this EA is built around it rather than a more elaborate pattern like the twin peaks setup covered in the indicator lesson.
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 Awesome Oscillator crosses from negative (or zero) to positive on consecutive completed bars, meaning the previous bar's AO reading was at or below zero and the current bar's reading is above zero.
- SELL — the Awesome Oscillator crosses from positive (or zero) to negative — 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 (20260727) — 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 20260727) — 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 AO period input anywhere. That's not an oversight — it's a direct consequence of how the indicator is built. Unlike RSI or CCI, which take a configurable lookback period, the Awesome Oscillator's 5-period and 34-period moving averages are fixed by the indicator's original definition, so there's nothing to expose as a 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 Raw Zero-Line Cross, and How It Compares to MACD
This EA trades every AO zero-line cross exactly as it happens, with no twin-peaks confirmation, no trend filter, and no minimum histogram size required before a cross counts. That's a deliberate design choice, and it's worth comparing to the site's other zero-line-cross EA, the MACD momentum EA, because the two strategies look similar on paper but behave differently underneath. MACD's signal comes from exponential moving averages of the closing price crossing a further smoothed signal line, which gives it a small amount of built-in lag and noise-filtering. AO's zero-line cross comes from simple moving averages of the bar's midpoint with no signal line at all — there's one less layer of smoothing between raw price action and the trade decision, so AO tends to react a touch faster to a genuine momentum shift, but for the same reason it's also a touch more exposed to single-bar noise flipping the reading back and forth.
That trade-off matters most in a quiet, range-bound market. When price drifts sideways with no real direction, the 5-period and 34-period midpoint averages sit close together, and AO's histogram bars shrink toward zero and shuffle across it repeatedly — each shuffle is a technically valid cross by this EA's rule, but collectively that's a whipsaw pattern that loses small amounts to spread and slippage on every false entry. This EA therefore tends to perform best in markets that are trending or just breaking out of a range, where a zero-line cross reliably marks the start of a real move, and worst in tight, directionless conditions, where a trend filter would have kept it out of the market entirely. Checking trend vs range conditions before running this EA on a given pair is the single highest-leverage thing a trader can do to improve its results, even though the EA makes no attempt to detect that condition automatically — it trades the cross wherever and whenever it happens.
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; trading every AO zero-line cross with no trend filter means it will take more false signals in a choppy, range-bound market than a filtered strategy would. 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
awesome-oscillator-momentum-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
awesome-oscillator-momentum-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.