EA-450 · Trend Following

Exp_TEMA

This is a multi-currency Expert Advisor that trades up to 12 currency pairs simultaneously using the TEMA (Triple Exponential Moving Average) indicator. It generates buy signals when the TEMA slope changes from negative to positive and sell signals when it changes from positive to negative, closing positions on opposite slope signals. Each currency pair operates independently with its own configurable parameters for period, stop loss, take profit, and lot size.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, M30, H1
IndicatorsTEMA
AuthorCopyright © 2010, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Conversion problem
GBPUSD0.00%0.00%0.00%0—————Conversion problem
USDJPY0.00%0.00%0.00%0—————Conversion problem
XAUUSD0.00%0.00%0.00%0—————Conversion problem

Why this EA never traded: the entry waits for a crossing that cannot happen (for example a price-based indicator crossing zero).

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

This EA uses the Triple Exponential Moving Average (TEMA) as its core trend-following indicator. Entry conditions are: a sell signal (DnSignal) is triggered when the TEMA slope changes from positive to negative, and a buy signal (UpSignal) is triggered when the slope changes from negative to positive, determined by comparing the TEMA differences of adjacent bars (dtema1 and dtema2). Exit conditions are: an UpStop signal is triggered when the TEMA slope is positive (closing longs), and a DnStop signal is triggered when the slope is negative (closing shorts), with fixed stop loss and take profit levels also set on each position. Position sizing uses fixed lots (default 0.1) per currency pair with no dynamic position adjustment or money management logic. The EA calculates signals only on new bar formation (IsNewBar check), preventing repeated trades on every tick. It supports up to 12 currency pairs running simultaneously, each with its own indicator handle and state arrays. However, the strategy lacks considerations for market volatility, spread filtering, and trading session filters, and uses fixed point-based stop loss/take profit rather than dynamic adjustments based on ATR or similar measures.

Strengths

  • Simultaneous multi-currency operation diversifies single-pair risk and increases trading opportunities
  • TEMA indicator responds faster and has less lag than regular EMA, better suited for trend following
  • Signal calculation only on new bar formation avoids redundant per-tick trading, with clear logic
  • Independent configurable parameters per currency pair provide good flexibility
  • Stop loss and take profit protection with minimum stop level (stoplevel) validation

Weaknesses

  • Fixed lot sizing with no money management, unable to dynamically adjust position size based on account balance
  • Fixed point-based stop loss/take profit rather than dynamic calculation (e.g., ATR), ignoring volatility differences across pairs
  • No spread filter, high-spread periods may lead to unfavorable fills during volatile or low-liquidity sessions
  • Uses ORDER_FILLING_FOK fill mode which some brokers don't support, potentially causing order rejection
  • Highly repetitive code with 12 currency pairs manually copied for parameters and calls, poor maintainability
  • PositionSelect by symbol only may fail on hedging accounts where multiple positions per symbol exist

Possible improvements

  • Introduce dynamic money management module to calculate position size based on account balance and risk percentage
  • Use ATR or volatility indicators for dynamic stop loss/take profit instead of fixed points, adapting to each pair's volatility characteristics
  • Add spread filter and trading session filter to avoid trading during high-spread or low-liquidity periods
  • Refactor repetitive currency pair parameters into a struct array with loop processing, greatly improving code maintainability
  • Support multiple order filling modes (IOC/Return) with auto-detection of broker-supported fill types

Risk assessment

Overall risk: Medium

  • Fixed stop loss/take profit ignores volatility differences across pairs, potentially causing frequent stops or overly distant targets
  • No spread filter may lead to unfavorable entries during high volatility or poor liquidity periods
  • Hardcoded ORDER_FILLING_FOK may cause order rejections at some brokers
  • PositionSelect by symbol risks selecting wrong position on hedging accounts with multiple positions per symbol
  • No trading session filter may generate signals during market close or low-liquidity periods

Evaluation scores

Code quality2.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall2.0

Parameters

ParameterDefaultDescription
Symb0-Symb11EURUSD,USDCHF,USDJPY,USDCAD,AUDUSD,AUDNZD,AUDCAD,AUDCHF,AUDJPY,GBPUSD,GBPJPY,EURJPYNames of 12 currency pairs
Trade0-Trade11trueEnable trading for each currency pair
Per0-Per1115TEMA indicator period
ApPrice0-ApPrice11PRICE_CLOSETEMA applied price type
StLoss0-StLoss111000Stop loss in points
TkProfit0-TkProfit112000Take profit in points
Lots0-Lots110.1Trading lot size
Slippage0-Slippage1130Allowed slippage

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.