EA-15239 · Trend Following

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

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsSuperTrend, CCI, ATR
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-2.75%-2.39%6.77%7447.30%-0.57-0.417−$3.71Reliable
GBPUSD+2.41%+2.09%5.60%7642.70%0.450.436+$3.53Reliable
USDJPY-2.14%-1.86%8.02%6240.30%-0.39-0.279−$3.45Reliable
XAUUSD-39.89%-34.33%73.04%8445.80%-0.13-0.556−$45.07Reliable

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

MarketMonths with a gainBest monthWorst month
EURUSD54%+1.36% 2026-07-2.12% 2026-10
GBPUSD77%+3.32% 2026-01-2.23% 2026-10
USDJPY46%+3.97% 2026-09-3.67% 2026-03
XAUUSD38%+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

Code quality2.0
Strategy logic3.0
Risk management3.0
Robustness3.0
Innovation2.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
MM0.1Money management ratio controlling risk percentage per trade
MMModeLOTPosition sizing mode: free margin, balance, net free margin, net balance, or fixed lot
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage in points
BuyPosOpentrueAllow opening buy positions
SellPosOpentrueAllow opening sell positions
BuyPosClosetrueAllow closing buy positions on signal
SellPosClosetrueAllow closing sell positions on signal
InpInd_TimeframePERIOD_H1Timeframe for the SuperTrend indicator
CCIPeriod50CCI indicator period
ATRPeriod5ATR indicator period
Level0CCI level threshold for signal filtering
SignalBar1Bar 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.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.