Exp_SuperTrend
This EA trades based on the SuperTrend indicator, which combines CCI and ATR to determine trend direction. It opens buy positions when the SuperTrend signals an uptrend and sell positions when it signals a downtrend, with configurable position closing on signal reversals. The EA supports multiple money management modes and includes fixed stop-loss and take-profit levels.
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 | -2.75% | -2.39% | 6.77% | 74 | 47.30% | -0.57 | -0.41 | 7 | −$3.71 | Reliable |
| GBPUSD | +2.41% | +2.09% | 5.60% | 76 | 42.70% | 0.45 | 0.43 | 6 | +$3.53 | Reliable |
| USDJPY | -2.14% | -1.86% | 8.02% | 62 | 40.30% | -0.39 | -0.27 | 9 | −$3.45 | Reliable |
| XAUUSD | -39.89% | -34.33% | 73.04% | 84 | 45.80% | -0.13 | -0.55 | 6 | −$45.07 | Reliable |
Profitable on 1 of 4 markets with reliable results.
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.
Against the other Trend Following EAs with a reliable result on the same market: EURUSD: better than 28% of 95 · GBPUSD: better than 66% of 95 · USDJPY: better than 31% of 95 · XAUUSD: better than 26% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 54% | +1.36% 2026-07 | -2.12% 2026-10 |
| GBPUSD | 77% | +3.32% 2026-01 | -2.23% 2026-10 |
| USDJPY | 46% | +3.97% 2026-09 | -3.67% 2026-03 |
| XAUUSD | 38% | +22.93% 2026-09 | -24.40% 2026-10 |
From the backtest equity curve, sampled about every two days; only reliable results.
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
This EA uses the SuperTrend indicator as its core strategy, which combines CCI (Commodity Channel Index) and ATR (Average True Range) to identify trend direction. Entry conditions are: when the SuperTrend upper signal line (buffer 2) has a valid value on the specified signal bar, it opens a buy position and closes any sell position; when the lower signal line (buffer 3) has a valid value, it opens a sell position and closes any buy position. Exit conditions include two methods: first, reverse signal triggers position closure (e.g., sell positions close when an uptrend signal appears), and second, fixed stop-loss and take-profit in points. Additionally, the EA checks the indicator's main lines (buffers 0 and 1) to confirm close signals, adding an extra exit filter. Position sizing supports five modes: based on free margin, balance, free margin minus loss, balance minus loss, and fixed lot size. Money management is controlled by the MM parameter with a default risk ratio of 0.1. The EA uses the IsNewBar mechanism to ensure signals are calculated only once per bar, preventing duplicate trades. Signal delay is controlled by the SignalBar parameter, defaulting to 1 which uses the last completed bar.
Strengths
- Clear trend-following logic; SuperTrend combining CCI and ATR effectively captures medium-term trends
- Multiple money management modes offer flexibility to choose appropriate position sizing based on account conditions
- IsNewBar mechanism prevents duplicate trades within the same bar and signals are only calculated on new bars, reducing overtrading
- Entry and exit signals are independently configurable, allowing separate enable/disable of buy/sell opening and closing
- Configurable stop-loss and take-profit parameters provide basic risk control
Weaknesses
- Fixed stop-loss and take-profit in points rather than ATR-based, which may not adapt well across different volatility environments
- No spread filter mechanism, potentially leading to unfavorable entry prices on high-spread instruments
- Indicator handle creation failure only prints a log without robust error recovery
- Code comments are garbled due to encoding issues, severely hurting readability and maintainability
- No drawdown control or maximum position limit, risk exposure could become excessive during extreme market conditions
Possible improvements
- Replace fixed stop-loss/take-profit with ATR-based dynamic levels to adapt to varying market volatility
- Add spread filtering to prohibit entries when spread exceeds a threshold, avoiding unfavorable slippage
- Add drawdown control and maximum concurrent position limits to reduce risk exposure in extreme conditions
- Fix source file encoding issues, restore garbled comments to readable Chinese or replace with English
Risk assessment
Overall risk: Medium
- Fixed SL/TP may be too wide on low-volatility instruments and too narrow on high-volatility ones
- No spread filter means high-spread environments can cause entry prices to deviate significantly from expectations
- No maximum drawdown limit means consecutive losses could severely erode account equity
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio controlling risk percentage per trade |
MMMode | LOT | Position sizing mode: free margin, balance, net free margin, net balance, or fixed lot |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage in points |
BuyPosOpen | true | Allow opening buy positions |
SellPosOpen | true | Allow opening sell positions |
BuyPosClose | true | Allow closing buy positions on signal |
SellPosClose | true | Allow closing sell positions on signal |
InpInd_Timeframe | PERIOD_H1 | Timeframe for the SuperTrend indicator |
CCIPeriod | 50 | CCI indicator period |
ATRPeriod | 5 | ATR indicator period |
Level | 0 | CCI level threshold for signal filtering |
SignalBar | 1 | Bar index for signal evaluation, 1 means last completed bar |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.