NUp1Down
This EA trades based on a consecutive candle counting pattern — it enters a position when N consecutive up candles are followed by a down candle (or vice versa), anticipating either a reversal or continuation. It is a systematic candlestick pattern strategy that opens trades on signal detection without manual intervention.
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.74% | -0.64% | 4.81% | 124 | 50.40% | — | — | — | — | Same as other EAs |
| GBPUSD | -0.67% | -0.58% | 6.45% | 125 | 48.40% | — | — | — | — | Same as other EAs |
| USDJPY | -1.85% | -1.61% | 6.64% | 126 | 49.60% | — | — | — | — | Same as other EAs |
| XAUUSD | +62.03% | +49.00% | 37.53% | 123 | 50.80% | — | — | — | — | Same as other EAs |
On every market this backtest is identical to EA-18942. 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 a consecutive candle counting pattern: when N consecutive directional candles (e.g., N up candles) appear followed by 1 opposite candle, it is interpreted as a trend exhaustion signal and a reversal trade is entered. Entry conditions: after N consecutive bullish candles followed by a bearish candle, a sell (or buy reversal) is placed; after N consecutive bearish candles followed by a bullish candle, a buy (or sell reversal) is placed, with N being a configurable parameter. Exit conditions rely on fixed take-profit and stop-loss levels, with some versions potentially including a trailing stop. Position sizing typically uses fixed lots or a percentage-based calculation relative to account equity. Money management is generally simple with a fixed risk ratio, lacking dynamic adjustment mechanisms. The overall strategy logic is simple and intuitive, representing a typical candlestick pattern reversal trading system, but it may suffer frequent counter-trend losses in strong trending markets.
Strengths
- Strategy logic is simple and intuitive, easy to understand and verify
- Configurable parameters allow N-value optimization for different markets and timeframes
- Candlestick pattern reversal approach performs well in ranging markets
Weaknesses
- Frequent counter-trend trades in strong trending markets lead to consecutive losses
- Lacks trend filter to distinguish between ranging and trending markets
- Position sizing is overly simplistic without dynamic risk adjustment mechanism
Possible improvements
- Add a trend filter (e.g., MA or ADX) to pause reversal trades or switch to trend-following in trending markets
- Implement a dynamic money management module that adjusts position size based on consecutive losses
- Add time and volatility filters to avoid trading during low-liquidity or high-volatility sessions
Risk assessment
Overall risk: Medium
- Lack of trend filter leads to counter-trend losses in strong trends
- Fixed stop-loss may not adapt to current market volatility — too wide in low volatility, too narrow in high volatility
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
N | 3 | Consecutive same-direction bars for signal trigger |
Lots | 0.1 | Fixed lot size per trade |
StopLoss | 50 | Stop loss in points, limits max loss per trade |
TakeProfit | 100 | Take profit in points, locks profit target per trade |
TrailingStop | 0 | Trailing stop in points, 0 to disable |
MagicNumber | 12345 | Magic number for closing, 0 for all positions |
Timeframe | 0 | RSI timeframe, 0 for current chart period |
Similar Candlestick Pattern EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.