Exp_AFL_WinnerSign
This EA trades based on signals from the custom AFL_WinnerSign indicator, which identifies momentum-based buy and sell signals. It opens buy positions on upward signals and sell positions on downward signals, with configurable stop loss, take profit, and money management options. The EA includes both entry and exit logic driven by the same indicator, supporting position reversal or independent close signals.
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 | — | — | — | — | — | Run error |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Run error |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Run error |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Run error |
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 uses the AFL_WinnerSign indicator to identify momentum direction and trade with the trend. Entry conditions: when indicator buffer 1 (UpValue) produces a non-zero, non-EMPTY_VALUE signal on the specified signal bar, a buy position is opened and sell positions are closed; when buffer 0 (DnValue) produces a valid signal, a sell position is opened and buy positions are closed. Exit conditions come in two types: first, reverse-signal exits where the indicator issues an opposite signal triggering closure; second, stop loss/take profit exits with default SL=1000 points and TP=2000 points. Position sizing leverages TradeAlgorithms.mqh with five money management modes including fixed lot, balance percentage, free margin percentage, loss-based balance, and loss-based free margin. The strategy also includes a lookback logic: when both open and close flags are enabled but no close signal appears on the current bar, the EA scans forward through historical bars to find the nearest reverse signal for closure decisions. The EA defaults to H6 timeframe and supports configurable smoothing algorithms (SMA/EMA/JJMA etc.) with multiple applied price types.
Strengths
- Supports multiple money management modes (fixed lot, balance percentage, etc.) for flexible risk preference adaptation
- Buy/sell open and close can be independently toggled, allowing one-direction-only trading or signal-only mode
- Defaults to SignalBar=1 (closed bar), preventing repeated false signals from unclosed bars
- Includes NewBar detection mechanism to prevent duplicate entries within the same bar
- Configurable SL/TP with default TP>SL (2:1 reward-risk ratio), aligning with positive expectancy trading principles
Weaknesses
- Depends on custom AFL_WinnerSign indicator - if the indicator file is missing the EA fails, and indicator logic is opaque
- Lookback close logic iterates all historical bars without upper bound optimization, potentially causing performance issues on long history data
- No spread filter mechanism, which may cause excessive slippage or invalid fills on high-spread instruments
- No position existence check before opening, potentially leading to duplicate positions across signal periods
- Stop loss of 1000 points is large and may result in significant floating losses on certain instruments
Possible improvements
- Add position existence check before opening to prevent duplicate entries in the same direction
- Add a maximum lookback bar limit to the closure scanning loop to prevent excessive historical data traversal
- Add spread filter and trading session filter to avoid trading during high-spread or low-liquidity periods
Risk assessment
Overall risk: Medium
- Lookback close loop has no upper bound, potentially traversing massive historical bars causing delays in extreme cases
- No spread filter may result in unfavorable fills in high-spread environments
- Depends on external custom indicator file - EA initialization fails outright if indicator is missing
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Lot sizing: negative=fixed lots, positive=deposit percentage |
MMMode | LOT | Lot sizing mode (fixed lot/balance %/free margin etc.) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum slippage in points |
BuyPosOpen | true | Allow buy position opening |
SellPosOpen | true | Allow sell position opening |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H6 | Indicator timeframe |
iAverage | 5 | Signal averaging period |
iPeriod | 10 | Main calculation period |
iMA_Method | MODE_SMA | Smoothing algorithm type |
iLength | 5 | Smoothing length |
iPhase | 15 | Smoothing phase parameter |
IPC | PRICE_WEIGHTED | Applied price type |
VolumeType | VOLUME_TICK | Volume type |
SignalBar | 1 | Signal bar index (0=current bar, 1=previous closed bar) |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.