EA-1640 · Candlestick Pattern

Exp_CandleTrend

This EA generates trading signals based on a simple candlestick trend pattern: it opens a buy position when a configurable number of consecutive bullish candles appear, and a sell position when the same number of consecutive bearish candles appear. It includes stop loss, take profit, and multiple money management modes via the TradeAlgorithms.mqh library.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsCandlestick Pattern
AuthorCopyright © 2013, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.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 trend confirmation via consecutive same-direction candles, assuming that N consecutive bullish candles indicate strong upward momentum and N consecutive bearish candles indicate strong downward momentum. Entry conditions: buy when all candles in the lookback window (CandleTrendTotal, default 3) are bullish (close > open), sell when all are bearish (close < open). Exit conditions rely on fixed stop loss (1000 points) and take profit (2000 points), with optional position closing on reverse signals enabled by BuyPosClose/SellPosClose parameters. Position sizing offers five modes: free margin share, balance share, loss-based free margin share, loss-based balance share, and fixed lot size. Money management uses the MM parameter (default 0.1) to control position proportion, combined with MMMode to select the calculation method. Signal detection occurs only on new bars of the specified timeframe, preventing redundant calculations, though setting SignalBar=0 triggers recalculation on every tick.

Strengths

  • Simple and clear strategy logic, easy to understand and verify
  • Multiple money management modes providing good flexibility
  • Includes stop loss and take profit settings for basic risk control
  • Uses IsNewBar mechanism to avoid duplicate signals and reduce unnecessary trades
  • Supports independent buy/sell open and close permission controls for flexibility

Weaknesses

  • Strategy is overly simplistic; consecutive bullish/bearish candles don't necessarily indicate trend continuation, leading to frequent false signals
  • Lacks a trend filter (e.g., MA, ADX), making it prone to frequent open/close cycles in ranging markets
  • Stop loss and take profit use fixed points without considering market volatility (ATR), resulting in inconsistent performance across different market conditions
  • Does not check for existing positions in the same direction, potentially causing duplicate entries
  • No spread filter, which can lead to losses in low-liquidity markets where spreads are wide

Possible improvements

  • Add a trend filter (e.g., MA direction or ADX threshold) to avoid frequent trading in ranging markets
  • Replace fixed stop loss/take profit with ATR-based dynamic levels to adapt to varying market volatility
  • Add position existence checks to prevent duplicate entries in the same direction

Risk assessment

Overall risk: Medium

  • No check for existing same-direction positions, potentially causing duplicate entries and overexposure
  • Fixed stop loss/take profit may be inappropriate across different volatility environments; stops may be too tight in high volatility
  • Consecutive candle pattern signals trigger frequently in ranging markets, potentially leading to consecutive losses

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management3.0
Robustness2.0
Innovation1.0
Documentation2.0
Overall2.2

Parameters

ParameterDefaultDescription
MM0.1Trading share ratio
MMModeLOTLot calculation method (free margin/balance/loss share/fixed lot)
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Max allowed slippage in points
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions by indicator signal
SellPosClosetrueAllow closing short positions by indicator signal
InpInd_TimeframePERIOD_H4Indicator timeframe
CandleTrendTotal3Number of same-direction candles
SignalBar1Bar index for entry signal

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.