EA-20000 · Candlestick Pattern

N Candles v6

This EA identifies and trades based on N consecutive bullish or bearish candles (candlestick streaks) as a momentum exhaustion or continuation signal. It enters positions when a configurable number of consecutive same-direction candles are detected, aiming to capitalize on short-term overextension or trend persistence. The strategy includes basic risk management with stop loss and take profit levels.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, M30, H1, H4
IndicatorsCandlestick Pattern, ATR
AuthorCopyright © 2018, Vladimir Karputov

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-7.52%-6.57%11.58%13740.90%-1.64-0.659−$5.49Reliable
GBPUSD-12.81%-11.23%13.67%14037.40%-2.08-0.946−$9.38Reliable
USDJPY-1.81%-1.57%4.77%14642.10%-0.36-0.386−$1.25Reliable
XAUUSD+62.07%+49.02%43.87%15046.30%1.371.426+$40.00Reliable

Profitable on 1 of 4 markets with reliable results.

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.

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD38%+2.17% 2026-10-3.31% 2026-04
GBPUSD31%+1.18% 2026-08-4.63% 2026-04
USDJPY31%+1.30% 2025-11-0.69% 2026-09
XAUUSD38%+41.96% 2026-01-21.46% 2026-07

From the backtest equity curve, sampled about every two days; only reliable results.

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 consecutive candle streak identification, treating N same-direction candles in a row as a trading signal. Entry conditions: the EA enters a short position when N consecutive bullish candles are detected (assuming momentum exhaustion) or a long position when N consecutive bearish candles are detected (assuming oversold bounce), with an option for trend-following entries instead. Exit conditions rely on fixed stop loss and take profit levels, potentially supplemented by candlestick pattern reversal exit logic. Position sizing uses either a fixed lot size or an equity percentage-based calculation. Money management is governed by the stop loss to take profit ratio which determines the risk-reward profile per trade, but the strategy lacks dynamic account-level risk control. The core assumption is that consecutive candles represent market extremes prone to reversal or breakout, but this assumption performs very differently across varying market conditions.

Strengths

  • Strategy logic is simple and intuitive, easy to understand and tune
  • Candle streak patterns have good identification capability in strong trending markets
  • Few parameters make backtesting and optimization relatively straightforward and efficient

Weaknesses

  • Consecutive candle patterns generate many false signals in ranging/choppy markets
  • Lacks market environment filtering mechanisms (volatility, trend strength, etc.)
  • Fixed SL/TP cannot adapt to varying market volatility — stops may be too wide in low volatility or take profit too close in high volatility

Possible improvements

  • Add ATR-based dynamic SL/TP to automatically adjust risk parameters based on market volatility
  • Add a trend filter (e.g., moving average direction or ADX) to only trade in favorable market conditions
  • Incorporate candle body size filtering to avoid entering on streaks of very small-bodied candles

Risk assessment

Overall risk: Medium

  • Fixed SL/TP provides insufficient risk control during sudden volatility changes
  • Lacks account-level risk monitoring, risking consecutive losses during extreme market conditions
  • No trading session filter increases slippage risk during low liquidity periods

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
N_Candles6Consecutive same-color candle count threshold
LotSize0.1Fixed trading lot size
StopLoss500Stop loss in points
TakeProfit1000Take profit in points
MagicNumber123456EA unique magic number identifier
TimeframeH1Trading timeframe
ReverseModetrueReverse entry: sell on consecutive bullish candles

Similar Candlestick Pattern 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.