Heiken Ashi Engulf EA
This EA trades bullish and bearish engulfing candlestick patterns using Heiken Ashi smoothed candles as the primary signal generator. It opens buy positions on bullish engulfing patterns and sell positions on bearish engulfing patterns, with configurable lot sizing, stop loss, and take profit levels. The strategy operates as a pair of separate EAs — one for buy signals and one for sell signals — each focusing on a single direction of engulfing pattern detection.
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 core strategy of this EA is based on engulfing pattern recognition using Heiken Ashi candles. For entry conditions, the buy EA detects bullish engulfing patterns where the current Heiken Ashi bullish candle body completely envelops the previous bearish candle body, while the sell EA detects bearish engulfing patterns where the current bearish candle body completely envelops the previous bullish candle body. Exit conditions rely on fixed stop loss and take profit settings, with users configuring SL and TP in points. Position sizing uses a fixed lot approach where the user sets the trade volume via a parameter, with no dynamic position sizing or equity-based lot calculation. Money management lacks risk percentage controls, with no maximum drawdown limit or account equity protection mechanisms. The strategy benefits from Heiken Ashi smoothing which reduces false signals compared to standard candles, but the absence of additional trend filters may lead to frequent false engulfing signals during ranging markets.
Strengths
- Heiken Ashi smoothed candles effectively reduce market noise and false signals, improving engulfing pattern reliability
- Simple and clear strategy logic that is easy to understand and adjust parameters, suitable for beginners
- Separate buy and sell EAs allow flexible directional trading, enabling traders to only take signals in one direction
Weaknesses
- Lacks trend filter, prone to generating numerous false engulfing signals in ranging markets leading to consecutive losses
- Fixed lot sizing without dynamic position management cannot adjust trade size based on account equity and risk ratio
- No new bar check mechanism may cause duplicate entries on the same candle; no spread filter leads to high entry costs in wide spread environments
- Missing trailing stop or breakeven functionality means profitable positions may retrace significantly before hitting take profit
Possible improvements
- Add a trend filter (e.g., higher timeframe EMA or ADX) to only accept engulfing signals aligned with the trend direction, significantly reducing false signals in ranging markets
- Implement equity-based dynamic position sizing that automatically calculates lot size based on risk percentage, and add maximum drawdown limits for capital protection
- Add new bar check and spread filter mechanisms to prevent duplicate entries and avoid entering during wide spread conditions
- Add trailing stop and breakeven functionality to lock in profits and reduce drawdown risk on winning positions
Risk assessment
Overall risk: Medium
- Lack of trend filter leads to frequent false signals in ranging markets causing consecutive losses
- No new bar check may cause duplicate position openings on the same candle amplifying risk
- Fixed lot size does not adjust based on account equity, potentially over-leveraging small accounts
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
LotSize | 0.1 | Fixed lot size per trade |
StopLoss | 500 | Stop loss in points |
TakeProfit | 1000 | Take profit in points |
MagicNumber | 123456 | EA magic number for identifying this EA's orders |
Timeframe | H1 | Trading timeframe |
Similar Candlestick Pattern EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.