Rapid Doji EA
This EA identifies Doji candlestick patterns on the daily chart and places two opposing pending stop orders around the Doji bar's high and low. It uses ATR for stop loss placement and manages risk with a fixed trailing stop. When one pending order fills, the other is automatically deleted.
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 breakout trading from Doji candlestick patterns, where a Doji signals market indecision and the subsequent breakout direction may determine the trend. Entry conditions trigger when a Doji appears on the daily chart (body size is 3% or less of the total bar range), placing a Buy Stop at the Doji high and a Sell Stop at the Doji low, creating a dual-direction breakout setup. Stop loss is set at the Doji low minus 1.75x ATR for buys or the Doji high plus 1.75x ATR for sells, providing wide stops to accommodate market noise. Exit conditions rely on a fixed trailing stop of 2700 points, where the stop loss follows the previous day's close once the position is profitable beyond the spread, but the stop never moves when the position is unprofitable. Position sizing uses a fixed lot size of 0.10 with no dynamic calculation based on account equity or risk percentage. Money management includes margin checking and lot normalization but lacks maximum position limits, equity drawdown controls, or daily loss limits.
Strengths
- Dual pending order breakout logic is clear and captures directional moves after Doji indecision
- Stop loss based on ATR adapts to market volatility dynamically
- OnTradeTransaction automatically deletes the unfilled pending order when the other fills, preventing extra exposure
- Includes stops level checking and margin verification following MQL5 best practices
Weaknesses
- Fixed 0.10 lot size with no dynamic position sizing fails to adapt to account size and risk tolerance
- Trailing stop uses fixed points instead of ATR-based calculation, performing inconsistently across instruments with different volatility
- No take profit (TP) is set, relying entirely on trailing stop for exit which may give back substantial profits
- SelectPosition uses PositionSelect instead of iterating all positions, which can fail in multi-position scenarios
- Lacks equity drawdown limits, maximum position controls, or daily loss limits for capital protection
Possible improvements
- Replace fixed-point trailing stop with ATR-based trailing to adapt to varying volatility environments
- Add dynamic position sizing based on account risk percentage instead of fixed lot size
- Add take profit logic or indicator-based exit signals to avoid relying solely on trailing stop
- Add maximum drawdown protection and daily loss limit mechanisms
Risk assessment
Overall risk: Medium
- Dual pending orders can both fill on extreme moves like gaps, creating double exposure
- No take profit means winning trades may give back significant profits on reversals
- Fixed lot size doesn't scale with account, under-risking large accounts and over-risking small ones
- 1.75x ATR stop loss distance is wide, making individual trade losses potentially significant
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
SL_ATR_FACTOR | 1.75 | ATR multiplier for determining stop loss distance |
AR_FIXED_TRAILING_PTS | 2700 | Fixed trailing stop points, maximum distance between stop and price |
InpAtrPeriod | 14 | ATR indicator period |
Similar Candlestick Pattern EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.