EA-59303 · Momentum

RSI EA

This EA trades RSI crossover signals at overbought/oversold thresholds, entering long when RSI crosses above the lower threshold and short when it crosses below the upper threshold. It supports both fixed and ATR-based dynamic stop-loss/take-profit, risk-based or fixed lot sizing, session filtering, and partial scale-out. Exit conditions mirror entries, closing positions on opposite RSI threshold crossovers.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMomentum
RiskHigh risk
Blow-up riskHigh
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsRSI, ATR
AuthorCopyright 2025

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+1.35%+1.17%5.23%660.00%————Too few trades
GBPUSD+1.43%+1.24%5.52%742.90%————Too few trades
USDJPY+9.68%+8.36%4.05%1180.00%1.612.391+$94.96Reliable
XAUUSD-100.00%-100.00%100.00%250.00%-2.01-1.001−$5,880.31Account stopped out

Profitable on 1 of 2 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 Momentum EAs with a reliable result on the same market: USDJPY: better than 99% of 68 · XAUUSD: better than 0% of 75

Month by month

MarketMonths with a gainBest monthWorst month
USDJPY69%+3.46% 2026-07-1.47% 2026-09
XAUUSD33%+2.67% 2025-11-100.00% 2026-01

From the backtest equity curve, sampled about every two days; only reliable results.

Blow-up risk: High

  • Has no stop loss or trailing stop
  • Hit a stop-out in our backtest (equity below 10%) on XAUUSD

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 RSI momentum indicator crossover signals at overbought/oversold thresholds, representing a hybrid momentum-reversal approach. Entry conditions trigger a long position when RSI crosses above the LowerThreshold (default 20) and a short position when RSI crosses below the UpperThreshold (default 80), meaning the signal line crosses the threshold level rather than a simple overbought/oversold determination. Exit conditions are symmetric to entries, closing positions when the opposite RSI threshold crossover occurs, e.g., long positions close when RSI crosses below the upper threshold. Position sizing supports both fixed lot size and risk-based auto-calculation modes, where the auto mode calculates lot size based on a percentage of account balance/equity/free margin relative to the stop-loss distance. Stop-loss and take-profit support both fixed point values and ATR-volatility-based dynamic calculation, with the dynamic mode using ATR values multiplied by configured factors. Additionally, the EA provides session time filtering and partial scale-out functionality, where scale-out reduces the position by a configured percentage when price profit exceeds an ATR-based threshold.

Strengths

  • Supports both fixed and ATR-based dynamic stop-loss/take-profit, adapting to different market volatility environments
  • Risk-based auto position sizing provides solid money management capabilities
  • Session filtering and partial scale-out features add strategy flexibility
  • New bar detection mechanism prevents duplicate entries on the same bar
  • Position close retry mechanism (up to 10 attempts) improves order execution reliability

Weaknesses

  • AccountBalance/AccountEquity/AccountFreeMargin functions return bool instead of double, causing critical type errors that will corrupt position size calculations
  • Default stop-loss and take-profit are both 0, trading without stop-loss poses extreme risk
  • MinimumStopLoss and MaximumStopLoss parameters are defined but never used in stop-loss calculation, making them dead code
  • MaxSpreadAllowed parameter is defined but never checked before entry, rendering it completely ineffective
  • Inconsistent CopyBuffer start indices between ATR (start=0) and RSI (start=1) in LoadIndicatorData may cause data alignment issues

Possible improvements

  • Fix AccountBalance/AccountEquity/AccountFreeMargin return types to double, otherwise risk-based position sizing will be completely wrong
  • Add MaxSpreadAllowed spread check in entry conditions to make the existing parameter functional
  • Actually use MinimumStopLoss/MaximumStopLoss/MinimumTakeProfit/MaximumTakeProfit parameters for range validation in CalculateStopLoss and CalculateTakeProfit
  • Unify CopyBuffer start indices in LoadIndicatorData to ensure ATR and RSI data are temporally aligned
  • Release indicator handles via IndicatorRelease in OnDeinit to prevent resource leaks

Risk assessment

Overall risk: High risk

  • AccountBalance etc. return bool type causing completely wrong auto position sizing, potentially resulting in 0-lot or extreme lot sizes
  • Default stop-loss and take-profit are both 0, users who don't modify parameters will trade without any stop-loss
  • MaxSpreadAllowed parameter is not enforced, potentially opening positions during extremely wide spreads in high volatility
  • MinimumStopLoss/MaximumStopLoss are not actually constraining stop-loss range, potentially allowing too small or too large stops

Evaluation scores

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

Parameters

ParameterDefaultDescription
MomentumPeriod14RSI indicator period
UpperThreshold80RSI overbought threshold (short signal line)
LowerThreshold20RSI oversold threshold (long signal line)
PriceModePRICE_CLOSERSI applied price type
EnableSessionFilterfalseEnable trading session filter
SessionStartHourh07Trading session start time
SessionEndHourh19Trading session end time
VolatilityPeriod100ATR volatility indicator period
VolatilityTimeframePERIOD_CURRENTATR volatility timeframe
VolatilityFactorSL2Dynamic stop loss ATR multiplier
VolatilityFactorTP3Dynamic take profit ATR multiplier
PositionSizeModeRISK_DEFAULT_FIXEDPosition sizing: fixed lots or risk-based auto calculation
FixedLotSize0.1Fixed lot size
RiskCalculationBaseRISK_BASE_BALANCERisk calculation base: balance/equity/free margin
RiskPercentage2Risk percentage
MinimumLotSize0.01Minimum allowedlot size
MaximumLotSize100Maximum allowed lot size
MaxOpenPositions1Maximum simultaneous positions
StopLossTypeSL_FIXEDStop loss type: fixed or ATR dynamic
FixedStopLoss0Fixed stop loss in pips (0 = no SL)
MinimumStopLoss0Minimum stop losspoints
MaximumStopLoss5000Maximum stop losspoints
TakeProfitTypeTP_FIXEDTake profit type: fixed or ATR dynamic
FixedTakeProfit0Fixed take profit in pips (0 = no TP)
MinimumTakeProfit0Minimum take profitpoints
MaximumTakeProfit5000Maximum take profitpoints
EnableScaleOutfalseEnable partial position reduction
ScaleOutPercent50Scale-out percentage
VolatilityFactorSO1Scale-out trigger ATR multiplier
IdentificationNumber0EA identification number (Magic Number)
TradeCommentTrade comment
SlippageTolerance5Slippage tolerance
MaxSpreadAllowed50Maximum allowed spread

Similar Momentum 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.