EA-21929 · Mean Reversion

Flat Trend EA

Flat Trend EA is a mean reversion expert advisor that identifies flat/ranging market conditions using a flat trend indicator and enters trades when price deviates from its range equilibrium. It aims to capitalize on price returning to the mean during sideways markets by detecting overbought and oversold conditions within a defined channel.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, M30, H1
IndicatorsFlat Trend, Moving Average, ATR
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-5.16%-4.50%6.07%11647.80%————Same as other EAs
GBPUSD-1.90%-1.65%4.87%11845.30%————Same as other EAs
USDJPY-5.55%-4.84%8.83%11546.50%————Same as other EAs
XAUUSD+12.05%+9.86%52.68%11249.50%————Same as other EAs

On every market this backtest is identical to EA-20304. The automatic conversion almost certainly lost what makes this EA different (a custom indicator, a filter or the money management), so these results are not ranked or counted.

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.

Blow-up risk: No blow-up pattern found

None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

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 identifying flat/ranging market states and executing mean reversion trades when price touches the upper or lower boundaries of a channel. Entry conditions: go short when the Flat Trend indicator shows a sideways market and price touches the upper channel band; go long when price touches the lower channel band. Exit conditions include: closing positions when price returns to the channel midline, reaching take-profit targets, or stop-loss being triggered. Position sizing uses a fixed lot approach with no dynamic lot adjustment mechanism detected. Money management lacks risk-proportional calculation and does not dynamically adjust position size based on account balance. The overall strategy logic is simple and straightforward but lacks a mechanism to distinguish between trending and ranging markets, which could lead to consecutive losses during trending periods.

Strengths

  • Strategy logic is simple and clear, easy to understand and tune
  • Performs well in ranging markets, effectively captures mean reversion opportunities
  • Few parameters reduce the risk of overfitting

Weaknesses

  • Lacks a trend filter, may suffer consecutive losses in trending markets
  • Fixed lot position sizing is inflexible, does not consider account risk ratio
  • Flat detection indicator may produce lagging signals, leading to poor entry timing
  • Lacks new bar check mechanism, may open multiple positions on the same bar

Possible improvements

  • Add a trend filter (e.g., ADX or moving average slope) to pause trading during trending markets
  • Implement dynamic position sizing based on account risk ratio
  • Add new bar check and time filter functionality to avoid duplicate entries and trading during inactive sessions

Risk assessment

Overall risk: Medium

  • Lack of trend filter may cause sustained counter-trend trading in trending markets
  • Fixed lot size does not account for account risk tolerance
  • May lack new bar check leading to duplicate position openings on the same bar

Evaluation scores

Code quality2.0
Strategy logic2.0
Risk management2.0
Robustness2.0
Innovation1.0
Documentation1.0
Overall1.7

Parameters

ParameterDefaultDescription
Lots0.1Fixed trading lot size
TakeProfit50Take profit in points
StopLoss30Stop loss in points
FlatPeriod14Flat market detection period
FlatLevel0.5Flat market determination threshold
MagicNumber12345EA magic number

Similar Mean Reversion 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.