N Candles v5
This EA trades based on N consecutive candlestick patterns, detecting streaks of consecutive bullish or bearish candles to generate entry signals. It opens positions when a configurable number of consecutive same-direction candles are detected, expecting either trend continuation or reversal depending on settings. The EA includes customizable parameters for candle count, lot sizing, stop loss, and take profit.
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 | -0.96% | -0.83% | 5.83% | 125 | 51.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-17147, EA-17641, EA-19981, EA-20166, EA-20670. 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 core strategy concept is based on consecutive candlestick pattern recognition, treating N successive same-direction candles as a trading signal. Entry conditions trigger when the EA detects a user-configured number of consecutive bullish or bearish candles, with options for trend-following or reversal mode. Exit conditions rely on fixed stop loss and take profit settings, and may include trailing stop functionality. Position sizing uses either fixed lot sizes or balance-based percentage calculation. Money management provides stop loss and take profit parameters for per-trade risk control, but lacks overall account risk management and maximum drawdown protection. The strategy assumes that consecutive candle sequences carry statistically significant directional bias, though it is prone to frequent false signals in ranging markets.
Strengths
- Strategy logic is simple and intuitive, easy to understand and optimize
- Based on price action rather than lagging indicators, providing faster response
- Flexible parameters adaptable to different markets and timeframes
- Switchable between trend-following and reversal modes, offering strategic diversity
- Consecutive candle patterns have market psychology foundation
Weaknesses
- Prone to frequent false signals in ranging/choppy markets
- Lacks overall account risk management and maximum drawdown protection
- Stop loss and take profit are fixed values without dynamic ATR-based adjustment
- Consecutive candle detection does not consider candle body size or wick ratio
- No market state filter to distinguish trending from ranging conditions
Possible improvements
- Add ATR-based dynamic stop loss and take profit for automatic risk parameter adjustment based on market volatility
- Add market state filter (e.g., ADX or volatility threshold) to reduce trading frequency in ranging conditions
- Introduce candle body size and wick ratio filtering conditions to improve signal quality
Risk assessment
Overall risk: Medium
- Fixed stop loss/take profit cannot adapt to varying volatility environments—stop too wide in low volatility, take profit too small in high volatility
- Lacks account-level risk controls such as maximum open positions, maximum drawdown limit, and daily loss limit
- Consecutive candle signals may trigger frequently in ranging markets leading to consecutive losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
N_Candles | 3 | Consecutive same-direction candle threshold |
LotSize | 0.01 | Base lot size per leg |
StopLoss | 0 | Stop loss in points, 0 means no stop loss |
TakeProfit | 0 | Fixed take profit points (20 pts) |
TrailingStop | 0 | Trailing stop points; 0 to disable |
MagicNumber | 12345 | EA unique identifier number |
TradeDirection | Both | Trade direction: long only / short only / both |
ReversalMode | false | Enable reversal mode (counter-trend trading) |
Similar Candlestick Pattern EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.