10pipsOnceADayOppositeLastNHourTrend
This EA opens one trade per day against the trend of the last N hours, targeting a small 10-pip profit. It identifies the prevailing trend over a configurable lookback period and enters a contrarian position, aiming to capture a quick retracement. The strategy is a classic once-a-day scalping mean-reversion system.
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 mean reversion, trading against the prevailing trend of the last N hours. Entry conditions: the EA evaluates the price movement over the last N hours to determine the dominant trend direction, then opens a contrarian position — selling if the trend is up, buying if the trend is down — with a strict one-trade-per-day limit. Exit conditions: positions are closed upon reaching a 10-pip take profit target, with a stop loss in place for capital protection. Position sizing typically uses fixed lots, though some versions may support percentage-based sizing. Money management is relatively simplistic without dynamic adjustment mechanisms. The daily trade limit prevents overtrading, but the strategy relies on the assumption that short-term retracements follow trending moves, which can fail in strong trending markets leading to consecutive losses.
Strengths
- One trade per day limit effectively prevents overtrading and emotional decision-making
- Contrarian approach performs well in ranging markets and during trend reversals, capturing short-term retracements
- Simple and clear strategy logic with few parameters, easy to understand and optimize
Weaknesses
- Counter-trend trading is prone to consecutive stop losses in strong trending markets, posing significant risk
- 10-pip take profit target is very small and can be easily eroded by spread and slippage
- Lacks dynamic position sizing and risk management mechanisms, unable to adapt to changing market volatility
Possible improvements
- Add a trend strength filter to pause trading or reduce position size during strong trending conditions
- Implement dynamic take profit and stop loss based on ATR or volatility for adaptive targets
- Add a spread filter to avoid opening positions when spreads are too wide, protecting thin profit margins
Risk assessment
Overall risk: Caution
- Counter-trend entries can result in consecutive stop losses during strong directional markets
- Small 10-pip target makes the strategy highly sensitive to spread and slippage costs
- Daily trade limit reduces frequency but does not prevent large single-trade losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
N_Hours | 24 | Lookback hours for trend direction |
TakePips | 10 | Take profit in pips, default 10 |
StopLoss | 20 | Stop loss in points |
Lots | 0.1 | Fixed lot size per trade |
MagicNumber | 12345 | Magic number; 0 to manage all orders |
MaxSlippage | 3 | Maximum allowed slippage |
TradeOnceADay | true | Trade once per day switch |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.