EA-16100 · Momentum

Exp_RAVI_Histogram

This EA trades based on the RAVI (Range Action Verification Index) Histogram indicator, which measures momentum by comparing fast and slow moving averages. It opens buy positions when the RAVI value crosses above the upper level and sell positions when it crosses below the lower level, with corresponding close signals for opposite positions.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMomentum
RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsRAVI Histogram, EMA, Custom SmoothAlgorithms
Author—

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 core strategy of this EA is based on the RAVI (Range Action Verification Index) Histogram indicator, which measures market momentum direction by calculating the difference between fast and slow smoothed moving averages. Entry conditions: when the RAVI value is above the upper level (UpLevel=+0.1) and the previous bar's value was below or equal to the upper level, a buy open signal is triggered; when the RAVI value is below the lower level (DnLevel=-0.1) and the previous bar's value was above or equal to the lower level, a sell open signal is triggered. For exit conditions, when a buy signal triggers, existing sell positions are simultaneously closed, and vice versa; additionally, fixed stop loss (1000 points) and take profit (2000 points) are configured. Position sizing is controlled by the MM parameter which sets the risk ratio, supporting multiple margin modes including free margin, balance, loss-adjusted balance, and fixed lot size. Money management uses the MarginMode enumeration, defaulting to fixed lot mode (LOT), with MM=0.1 representing the capital allocation ratio. The strategy employs an IsNewBar mechanism to ensure signal evaluation only occurs on new bar formation, preventing duplicate trades, while the SignalBar parameter controls which bar's signal is used for analysis.

Strengths

  • Uses multi-timeframe indicator (H4), avoiding short-period noise interference, suitable for capturing medium-term trend momentum
  • Provides complete open/close toggle controls, allowing flexible enabling of only buy or sell directions
  • Employs IsNewBar mechanism to prevent duplicate trades within the same bar, reducing unnecessary trading frequency
  • Supports 10 smoothing algorithms and 9 price types, offering high parameter flexibility to adapt to different market conditions
  • Configured with stop loss and take profit, risk is controllable with a reasonable 2:1 reward-to-risk ratio

Weaknesses

  • Stop loss of 1000 points and take profit of 2000 points are excessively large, potentially leading to high per-trade risk on most instruments
  • Lacks spread filtering mechanism, which may cause unnecessary losses on instruments with wide spreads
  • No position check logic, potentially opening duplicate positions in the same direction when already holding
  • Simple signal logic relying solely on RAVI crossing threshold levels may generate frequent false signals in ranging markets
  • The Recount static variable is set to true on CopyBuffer failure but lacks a maximum retry limit, potentially causing infinite retry loops

Possible improvements

  • Add position check logic to avoid duplicate same-direction entries, and implement maximum position count limits
  • Add spread filtering and volatility filtering (e.g., ATR) to suppress trading signals when market conditions are unfavorable
  • Change stop loss and take profit parameters to ATR-based dynamic calculation instead of fixed points, to adapt to different instruments' volatility characteristics

Risk assessment

Overall risk: Medium

  • Fixed stop loss of 1000 points may be excessive on certain instruments, with single trade loss potentially representing too high a percentage of total capital
  • Lack of position count limits and same-direction duplicate entry checks may lead to overexposure
  • No spread filtering means trades execute even when spreads widen during high volatility periods
  • Recount mechanism has no retry upper limit, potentiallyfall into loop when indicator data is abnormal

Evaluation scores

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

Parameters

ParameterDefaultDescription
MM0.1Capital allocation ratio per trade
MMModeLOTMargin mode: free margin/balance/drawdown free margin/drawdown balance/fixed lot
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage in points
BuyPosOpentrueAllow long entry
SellPosOpentrueAllow short entry
BuyPosClosetrueAllow buy position close on reverse signal
SellPosClosetrueAllow sell position close on reverse signal
InpInd_TimeframePERIOD_H4Indicator calculation timeframe
FastMethodMODE_EMA_fastsmoothing method
FastLength7Fast smoothing period length
FastPhase15Fast smoothing phase (JJMA/VIDYA/AMA)
SlowMethodMODE_EMA_slowsmoothing method
SlowLength65Slow smoothing period length
SlowPhase15Slow smoothing phase (JJMA/VIDYA/AMA)
IPCPRICE_CLOSE_Applied price type
Shift0Indicator offset
UpLevel+0.1Upper band threshold level
DnLevel-0.1Lower band threshold level
SignalBar1Signal detection bar index position

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.