EA-1129 · Trend Following

Exp_MaRsi-Trigger

This EA uses a dual RSI and dual MA crossover system to identify trend direction changes and generate trading signals. It compares a short-period RSI against a long-period RSI and a short-period MA against a long-period MA, combining both signals to confirm trend shifts. Trades are opened only on trend reversals where both indicator pairs agree on the new direction.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsEMA, RSI
AuthorCopyright © 2012, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.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 strategy concept is based on a dual-indicator-confirmed trend following system that determines trend direction by comparing the relative positions of short-period vs long-period RSI and short-period vs long-period MA. Entry conditions: on the signal bar, if the short MA is above the long MA and the short RSI is above the long RSI, the Trend score is positive (max +2); if the previous trend was negative, a buy entry is triggered. Conversely, when Trend is negative and the previous trend was positive, a sell entry is triggered. Exit conditions rely on reversal signals: long positions are closed when the trend turns bearish, and short positions are closed when the trend turns bullish, with fixed stop loss and take profit in points. Position sizing is controlled by the MM parameter, where negative values represent fixed lot sizes and positive values represent a share of the deposit. Money management uses percentage or fixed lot mode with a 1000-point stop loss and 2000-point take profit, yielding a risk-reward ratio of 1:2. The strategy also uses the IsNewBar mechanism to ensure signals are only calculated on new bars, preventing repeated trades within the same bar.

Strengths

  • Dual-indicator confirmation reduces false signals by requiring both RSI and MA to agree on direction
  • Independent buy/sell open and close permission controls provide good flexibility
  • IsNewBar mechanism prevents repeated trades within the same bar, ensuring logical rigor
  • Fixed stop loss and take profit with 1:2 risk-reward ratio is reasonable
  • Clean code structure with external trading algorithm library reuse

Weaknesses

  • Short RSI period of only 3 is extremely noisy and prone to frequent false crossover signals
  • Fixed 1000-point SL and 2000-point TP on H4 do not adapt to market volatility changes
  • Lacks spread filter and slippage protection, potentially incurring extra costs in low-liquidity markets
  • The trend search loop through historical bars may cause signal delays or frequent recalculations during high volatility
  • No position check before opening, risking duplicate positions on the same direction

Possible improvements

  • Add ATR-based dynamic stop loss and take profit to adapt stop distances to market volatility
  • Add position check logic before opening trades to avoid duplicate positions in the same direction
  • Introduce spread filter and trading session restrictions to reduce costs during low-liquidity periods

Risk assessment

Overall risk: Medium

  • Fixed stop loss ignores volatility, potentially too close or too far during extreme market conditions
  • Lack of position check may lead to duplicate openings in the same direction, amplifying risk exposure
  • Short RSI=3 is noisy and may frequently trigger incorrect signals in ranging markets

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
MM-0.1Money management ratio parameter
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum slippage in points
BuyPosOpentrueAllow buy position opening
SellPosOpentrueAllow sell position opening
BuyPosClosetrueAllow buy-side close (close sell on reverse signal)
SellPosClosetrueAllow sell-side close (close buy on reverse signal)
InpInd_TimeframePERIOD_H4Indicator timeframe
nPeriodRsi3Short-term RSI period
nRSIPricePRICE_WEIGHTEDShort-term RSI applied price
nPeriodRsiLong13Long-term RSI period
nRSIPriceLongPRICE_MEDIANLong-term RSI applied price
nPeriodMa5Short-term MA period
nMATypeMODE_EMAShort-term MA type
nMAPricePRICE_CLOSEShort-term MA applied price
nPeriodMaLong10Long-term MA period
nMATypeLongMODE_EMALong-term MA type
nMAPriceLongPRICE_CLOSELong-term MA applied price
SignalBar1Bar index for entry signal

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.