AI RVI Momentum Trader
- Experts
- Version: 1.0
Overview
AI RVI Momentum Trader is a fully automated Expert Advisor built around the Relative Vigor Index (RVI), a momentum oscillator that measures the conviction behind price moves by comparing closing prices to the trading range. The EA trades RVI/Signal-line crossovers filtered by an AI-inspired confidence score and ADX trend strength, aiming to catch the early stages of fresh momentum shifts while avoiding weak, indecisive markets.
How It Works
- Calculates the Relative Vigor Index and its signal line on every new completed bar (no repainting, no tick-by-tick re-evaluation).
- Enters when the RVI line crosses its signal line - a bullish cross for buy setups, a bearish cross for sell setups.
- Confirms trend strength using ADX - trades are only allowed when ADX is above a configurable minimum threshold.
- An internal AI confidence score (0-100) blends the strength of the RVI/signal crossover against its recent history with ADX strength; trades below the minimum confidence level are skipped.
- Optional EMA 200 filter can be enabled to align entries with the dominant long-term trend direction.
- Stop Loss and Take Profit are calculated dynamically from current ATR, keeping exits adapted to real-time volatility instead of fixed pip values.
- An ATR-based trailing stop locks in profit as the trade moves favorably, with built-in safety checks near the broker's minimum stop and freeze levels.
Risk Management
- Margin is verified against free account margin (with a safety buffer) before every trade is sent.
- Maximum spread filter prevents entries during abnormal spread widening.
- Trading is restricted to each symbol's active session hours, with a buffer near session open/close to avoid edge-of-session execution errors.
- One position per symbol at a time - no grid, no martingale, no averaging down.
- Lot size is automatically normalized to the broker's allowed volume step, minimum and maximum.
Input Parameters
- InpMagicNumber - unique identifier for this EA's trades.
- InpTimeframe - timeframe used for signal calculation (default H1).
- InpMaxSpreadPoints - maximum allowed spread in points to permit new trades.
- InpRviPeriod - period used for the Relative Vigor Index calculation.
- InpAdxPeriod / InpMinAdxTrend - ADX period and minimum trend-strength threshold.
- InpMinConfidence - minimum AI confidence score (0-100) required to enter a trade.
- InpUseEmaFilter / InpEmaTrendPeriod - enable/disable and configure the optional long-term EMA trend filter.
- InpLotSize - base trade volume (auto-normalized to broker limits).
- InpAtrPeriod, InpSlAtrMult, InpTpAtrMult - ATR settings controlling Stop Loss and Take Profit distances.
- InpUseTrailing, InpTrailAtrMult, InpTrailStepPoints - trailing stop configuration.
Important Notes
This EA does not use martingale, grid, or averaging strategies - every position has a defined Stop Loss from the moment it opens. As with any trading system, past behavior and logic design do not guarantee future results; always test on a demo account first and use position sizing appropriate to your own risk tolerance.
