Price Rollback
Price Rollback is a mean reversion EA that identifies overextended price movements and enters trades anticipating a rollback or reversion to the mean. It monitors price deviation from a moving average or range and opens positions when price has moved too far too fast, expecting a corrective pullback.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
Why this EA never traded: no entry rule survived the conversion.
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 mean reversion principles, assuming that when price deviates significantly from its statistical mean, a rollback is expected. Entry conditions typically involve price moving a certain ATR multiple or percentage away from a moving average followed by a reversal candlestick pattern, or price touching the outer Bollinger Band then closing back inside. Exit conditions include take-profit when price returns near the mean line, fixed pip take-profit, and ATR-based dynamic stop-loss. Position sizing generally uses fixed lots or risk-percentage-based calculation, dynamically adjusted according to stop-loss distance. Money management carries potential risk as mean reversion strategies can suffer consecutive losses during trending markets, which is dangerous without maximum position limits or consecutive loss protection mechanisms.
Strengths
- Mean reversion logic performs well in ranging markets with relatively high win rate
- Uses ATR to dynamically measure price deviation, adapting to different instrument volatility characteristics
- High parameter adjustability allows users to optimize for different market conditions
Weaknesses
- Mean reversion strategy can suffer continuous counter-trend losses during strong trending markets
- Lack of trend filter may lead to frequent entries and stop-outs during trending markets
- Faces risk of significant single-trade loss if rollback does not materialize
Possible improvements
- Add a trend filter (e.g., ADX or large-period MA direction) to pause trading or reverse strategy during trending markets
- Add consecutive loss protection mechanism to pause trading or reduce position size after N consecutive losses
- Add spread filter to avoid entering during high spread periods
Risk assessment
Overall risk: Medium
- Mean reversion can incur consecutive losses during trending markets without trend filter protection
- Improper stop-loss placement may lead to excessive single-trade losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Rollback_Distance | 50 | Rollback distance threshold in points |
MA_Period | 200 | MA period |
ATR_Period | 14 | ATR period |
ATR_Multiplier | 2.0 | ATR multiplier for deviation assessment |
StopLoss_Pips | 30 | Stop loss in points |
TakeProfit_Pips | 40 | Take profit in points |
LotSize | 0.1 | Fixed lot size |
MagicNumber | 12345 | EA magic number for order identification |
MaxPositions | 1 | Maximum positions |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.