YTG ADX v1
This EA uses the ADX Wilder indicator to generate trading signals. It opens a buy position when the +DI line crosses above a configurable level and a sell position when the -DI line crosses above its level. Only one position per symbol is allowed at a time, controlled by magic number filtering.
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 the ADX Wilder indicator's DI lines crossing above configurable threshold levels. Entry conditions: a buy signal (+1) is generated when the +DI line crosses above the level_p threshold from below at the specified shift bars ago; a sell signal (-1) is generated when the -DI line crosses above the level_m threshold from below. Exit conditions rely solely on fixed stop loss and take profit values (SL and TP in points), with no trailing stop or partial closing mechanism. Position sizing uses a fixed lot size (Lots parameter) without any dynamic adjustment based on account balance or risk percentage. In terms of money management, the EA checks for existing positions with the same magic number via the ExtPos function to prevent duplicate entries, but only allows one position at a time per symbol regardless of direction. The overall strategy logic is simple and straightforward, representing a typical trend-following EA that relies on DI line breakouts above threshold levels to identify trend initiation.
Strengths
- Clear and concise strategy logic based on ADX DI line breakout signals, easy to understand and verify
- Magic number filtering prevents position conflicts with other EAs
- ExtPos function checks existing positions to prevent duplicate entries
- Configurable stop loss and take profit parameters provide a basic risk control framework
Weaknesses
- Fixed lot sizing ignores account equity changes and lacks dynamic position management
- No new bar check mechanism, signal is calculated every tick which may cause redundant triggers
- SL/TP calculation using Point() may be inaccurate on non-5-digit broker platforms
- No trailing stop mechanism, profitable positions may turn into losses during pullbacks
- DI line crossing a low threshold level (5) can generate many false signals
- Position check prevents opposite direction entry, missing trend reversal opportunities
Possible improvements
- Add new bar check mechanism to avoid recalculating signals and redundant orders on every tick
- Implement dynamic position sizing based on account balance and risk percentage
- Add trailing stop functionality to protect profits and trail gains during trend continuation
- Use SymbolInfoDouble for point value in SL/TP calculation to improve compatibility across different quote precision brokers
- Add ADX main line filter to only enter trades when trend strength is sufficient, reducing false signals
Risk assessment
Overall risk: Medium
- No new bar check, signal evaluation runs every tick which may attempt multiple entries on the same bar
- DI line crossing low threshold levels (level_p=5, level_m=5) easily produces false signals leading to frequent losses
- Fixed lot size does not adjust with account equity changes, potentially leading to excessive risk exposure after losses
- Using ORDER_FILLING_FOK fill type may not be supported by some brokers, causing order rejection
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Copyright | "Yuriy Tokman" | Copyright information string |
WritingExpertAdvisors | "Indicators_Scripts" | Description string |
e_mail | "yuriytokman@gmail.com" | Author email |
Skype | "yuriy.g.t" | Author Skype |
TimeFrames | 0 (PERIOD_CURRENT) | Trading timeframe |
shift | 1 | Signal bar shift offset |
adx_period | 28 | ADX indicator period |
MAGIC | 2899 | Magic number for identifying EA positions |
Lots | 0.1 | Fixed trade lot size |
SL | 500 | Stop loss in points |
TP | 500 | Take profit in points |
dev | 30 | Slippage tolerance |
level_p | 5 | +DI line breakthrough level threshold |
level_m | 5 | -DI line breakthrough level threshold |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.