TwoBarsComparison
This EA trades based on a two-bar comparison pattern, comparing the current and previous candlestick bars to detect bullish or bearish reversal/continuation signals. It opens positions when specific bar relationships are identified, typically looking at open/close relationships across two consecutive bars. The strategy is a simple price-action system without complex indicators.
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 strategy concept is based on comparing two consecutive bars, analyzing the relationship between open, close, high, and low prices of the current and previous bar to determine market direction. Entry conditions trigger when the two bars form specific engulfing, piercing, or reversal patterns, entering long or short at the next bar's open. Exit conditions typically use fixed take-profit and stop-loss levels or close positions when an opposite signal appears. Position sizing uses fixed lots without dynamic adjustment based on account equity or risk percentage. Money management lacks a comprehensive risk control framework, with no trailing stop or break-even functionality. The overall strategy logic is simple and straightforward, suitable for beginners to understand, but may underperform in complex or choppy market conditions.
Strengths
- Simple and clear strategy logic, easy to understand and verify
- Based on price action without relying on lagging indicators
- Direct signal generation with fast execution and no delay
- Clean code structure, convenient for secondary development and modification
Weaknesses
- Relies solely on two-bar comparison, resulting in low signal reliability
- Lacks trend filter, prone to frequent false signals in ranging markets
- Fixed lot sizing without dynamic position management provides insufficient risk control
- Does not account for market volatility and spread impact on trading
- Lacks multi-timeframe confirmation, easily disturbed by market noise
Possible improvements
- Add a trend filter (e.g., moving average direction) to avoid counter-trend trades
- Implement ATR-based dynamic take-profit and stop-loss to adapt to varying market volatility
- Add multi-timeframe confirmation mechanism to improve signal quality
Risk assessment
Overall risk: Medium
- Fixed lot trading cannot dynamically adjust risk exposure based on account equity
- Two-bar signals are susceptible to market noise causing incorrect entries
- Lack of trailing stop mechanism may cause winning trades to turn into losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Lots | 0.1 | Fixed trading lot size |
StopLoss | 50 | Stop loss in points |
TakeProfit | 100 | Take profit in points |
MagicNumber | 12345 | EA magic number for identifying orders |
Similar Candlestick Pattern EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.