Exp_Stalin
This EA trades based on the custom 'Stalin' indicator, which combines fast/slow moving averages with RSI to generate momentum signals. It opens buy positions on upward momentum signals and sell positions on downward momentum signals, with optional position closing on opposite signals. The EA uses the TradeAlgorithms library for position management and supports multiple money management modes.
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 is based on the custom Stalin indicator, which integrates three technical analysis tools: a fast moving average (Fast=14), a slow moving average (Slow=21), and RSI (period 17) to form composite momentum signals. Entry conditions: when indicator buffer 1 (UpValue) produces a non-zero non-empty value, a buy signal is triggered; when buffer 0 (DnValue) produces a non-zero non-empty value, a sell signal is triggered. Exit conditions come in two forms: fixed stop loss (1000 points) and take profit (2000 points) exits, and opposite signal-based exits where the EA looks back through historical bars to confirm the presence of a contrary signal before closing positions. Position sizing supports five modes: free margin percentage, balance percentage, loss-adjusted free margin, loss-adjusted balance, and fixed lot size. Money management is controlled via the MM parameter with a default risk exposure of 0.1. The strategy also includes Confirm and Flat parameters for signal confirmation and flat market filtering, though both default to 0 (disabled).
Strengths
- Clear strategy logic combining moving averages and RSI for multi-dimensional momentum judgment, reducing single-indicator false signals
- Five money management modes providing flexibility for different risk preferences and account sizes
- Independent buy/sell open and close controls allow flexible configuration from open-only to full reverse-signal closing mode
- IsNewBar mechanism prevents repeated trades within the same bar, reducing overtrading risk
- Explicit stop loss and take profit with a default 2:1 reward-to-risk ratio (1000:2000) aligning with positive expectancy trading
Weaknesses
- Depends on external custom indicator Stalin and TradeAlgorithms library, lacking independence and portability
- Reverse signal closing logic has flaws: when both buy/sell open and close are enabled, reverse closing requires iterating through historical bars for signals, potentially causing delayed or confused exits
- No spread filter or trading session filter, which may result in unfavorable fills during high-spread or low-liquidity periods
- Confirm and Flat parameters default to 0 effectively disabling signal confirmation and flat market filtering mechanisms
- Extensive garbled comments (encoding issues) severely impact code readability and maintainability
Possible improvements
- Add a spread filter to pause trading when the current spread exceeds a threshold, avoiding high-cost fills
- Enable the Confirm parameter with a reasonable default value (1-3 bars) to add signal confirmation and reduce false signals
- Add trading session filtering to avoid trading during low-liquidity periods
- Optimize the reverse closing logic by avoiding historical bar iteration for confirming opposite signals, instead using the most recent signal state directly
- Fix source code encoding issues by replacing garbled comments with proper UTF-8 encoded or English comments
Risk assessment
Overall risk: Medium
- No spread filter, potential slippage losses in high-spread environments
- Reverse signal closing logic requires iterating historical bars, Recount=true may be frequently triggered when data is insufficient, affecting execution efficiency
- No existing position check, potentially opening duplicate positions in the same direction
- Dependency on external library and custom indicator, runtime failures possible if dependencies are missing or updated
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio or lot size, meaning per MMMode |
MMMode | LOT | Position sizing (free margin/balance/fixed lot, etc.) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow buy to open |
SellPosOpen | true | Allow sell to open |
BuyPosClose | true | Allow closing buy positions on reverse signal |
SellPosClose | true | Allow closing sell positions on reverse signal |
InpInd_Timeframe | PERIOD_H1 | NRTR_extr indicator timeframe |
MAMethod | MODE_EMA | MA calculation method |
MAShift | 0 | MA offset |
Fast | 14 | Fast MA period |
Slow | 21 | Slow MA period |
RSI | 17 | RSI indicator period |
Confirm | 0 | Signal confirmation bars |
Flat | 0 | Flat/filter range bars |
SignalBar | 1 | Signal reference bar index |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.