EA-20672 · Momentum

AO_Lightning

This EA trades based on the Awesome Oscillator (AO) indicator, which is calculated as the difference between a fast SMA (period 34) and a slow SMA (period 5) of median prices. It opens buy positions when AO rises and sell positions when AO falls, while simultaneously closing opposite positions. The EA allows up to 10 simultaneous orders in each direction with fixed or percentage-based lot sizing.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMomentum
RiskCaution
Blow-up riskElevated
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsSMA, Awesome Oscillator
AuthorEvgeny Kravchenko

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+6.38%+5.52%3.90%14354.20%1.321.646+$4.73Reliable
GBPUSD+4.90%+4.24%4.93%14350.70%0.850.997+$3.62Reliable
USDJPY+1.69%+1.47%6.44%27551.50%0.370.268+$0.62Reliable
XAUUSD+204.44%+150.89%32.49%14850.70%1.956.296+$138.14Reliable

Profitable on 4 of 4 markets with reliable results.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Against the other Momentum EAs with a reliable result on the same market: EURUSD: better than 94% of 68 · GBPUSD: better than 91% of 66 · USDJPY: better than 74% of 68 · XAUUSD: better than 100% of 75

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD69%+3.34% 2026-02-1.79% 2026-07
GBPUSD62%+2.86% 2026-02-2.00% 2026-07
USDJPY38%+3.50% 2026-09-2.33% 2026-08
XAUUSD54%+85.95% 2026-02-6.51% 2026-11

From the backtest equity curve, sampled about every two days; only reliable results.

Blow-up risk: Elevated

  • Has no stop loss or trailing stop
  • Can hold up to 10 positions at once

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

The strategy concept is based on Bill Williams' Awesome Oscillator (AO) momentum indicator, calculated as the difference between a 5-period SMA and a 34-period SMA of median prices ((High+Low)/2) to determine market momentum direction. Entry conditions: a buy position is opened when AO[0]>AO[1] (momentum rising), and a sell position is opened when AO[0]<AO[1] (momentum falling), making this a trend-following momentum strategy. Exit conditions: all opposite-direction positions are closed when momentum reverses direction — buy positions are closed when AO declines, sell positions are closed when AO rises. Position management allows up to the 'Orders' parameter number of positions per direction (default 10), adding to positions on each new signal rather than going all-in. Money management supports two modes: fixed lot size (LotFixed) and dynamic lot sizing based on a percentage of free margin (LotFromPercent), with a pre-trade margin check via OrderCalcMargin. The strategy has no stop-loss or take-profit, relying entirely on momentum reversal signals for exits, creating significant risk exposure.

Strengths

  • Clear and concise strategy logic based on the classic Awesome Oscillator momentum indicator, easy to understand and verify
  • Supports both fixed lot and percentage-based dynamic lot sizing, offering good flexibility
  • Pre-trade margin check prevents opening positions when insufficient funds are available
  • New bar detection mechanism (time_bar) avoids duplicate entries on the same bar, reducing overtrading

Weaknesses

  • No stop-loss or take-profit configured, relying entirely on momentum reversal for exits, which can cause massive losses during volatile markets
  • Close functions use while loops iterating over positions, which can cause infinite loops or index errors when PositionsTotal changes during iteration
  • Sell order margin check incorrectly uses ORDER_TYPE_BUY instead of ORDER_TYPE_SELL, potentially giving inaccurate margin calculations
  • AO parameter names are counterintuitive: Period_sma_slow=5 is actually the fast SMA, Period_sma_fast=34 is the slow SMA
  • MessageBox in CheckMoneyForTrade blocks EA execution, which is inappropriate for automated live trading

Possible improvements

  • Add stop-loss and take-profit parameters to protect capital during extreme market volatility
  • Fix the ORDER_TYPE_BUY bug in sell order margin check — should use ORDER_TYPE_SELL
  • Use reverse iteration or collect tickets first then close in batch, avoiding index corruption during position traversal
  • Replace MessageBox with Print or logging to prevent blocking automated EA execution
  • Fix SMA period parameter naming to match their actual purpose (fast vs slow)

Risk assessment

Overall risk: Caution

  • No stop-loss or take-profit can lead to massive floating losses during sustained adverse momentum
  • While loop in close functions poses potential infinite loop risk during position traversal
  • Incorrect order type in sell margin check may produce inaccurate margin calculations
  • Up to 10 positions in the same direction can accumulate significant risk during unfavorable moves

Evaluation scores

Code quality2.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall2.0

Parameters

ParameterDefaultDescription
LotFixed0.01Fixed lot size
LotFromPercent0Dynamic lot from margin percentage, 0=fixed lot
Period_sma_slow5AOindicatorslowSMA period
Period_sma_fast34AOindicatorfastSMA period
Orders10Maximum open positions per direction
Magic5632EA magic number for position identification

Similar Momentum EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.