Blog / Strategy
Strategy

Relative Vigor Trend Shift

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

Relative Vigor Trend Shift is a trend-following momentum strategy built around the Relative Vigor Index (RVI) — an oscillator that measures the conviction behind a price move rather than the price level itself. The core idea is simple and intuitive: in a genuine up move, the market tends to close near the top of each bar's range, and in a down move it closes near the bottom. RVI captures that behaviour by comparing the close-minus-open distance to the full high-minus-low range of each bar, smoothing the result, and then comparing it to its own signal line. When RVI crosses above its signal line, closing pressure is turning bullish; when it crosses below, closing pressure is turning bearish. That crossover is the "vigor shift" the strategy is named for.

The strategy is designed for liquid, trending markets — instruments such as EURUSD or XAUUSD (gold) on the M15 or H1 timeframe, where sustained directional drift gives momentum signals room to work. To avoid the classic weakness of any oscillator — being whipsawed by choppy, directionless price action — the strategy adds a single regime filter: a slow Exponential Moving Average (EMA), a moving average that weights recent prices more heavily. It only takes long signals when price is above that EMA and short signals when price is below it. This keeps trades aligned with the prevailing trend and filters out counter-trend crosses that tend to be noise.

As a learning tool, Relative Vigor Trend Shift is well suited to traders who want to study how momentum oscillators, trend filters, and volatility-based risk controls fit together in a single, deliberately compact system. It is best understood as a framework for analysing conviction-driven entries — not as a shortcut to a particular outcome. Treat it as a case study in disciplined strategy design.

How It Works

The strategy evaluates its rules once per newly closed bar, so signals are based on completed price action rather than an unfinished, flickering bar. Here is what it checks:

Two more rules keep exposure controlled. Only one position per Magic number is open at a time, so the strategy never pyramids into a runaway position. And order volume is normalised to the symbol's lot step and minimum/maximum limits, so the requested size is always valid for the broker.

Relative Vigor Index MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
RviPeriod 10 4 30 Averaging length of the RVI oscillator (and the base for its num/den smoothing). Larger values give a smoother, slower oscillator.
AtrPeriod 14 7 30 Number of bars used to calculate ATR, which sizes both the stop and the target.
StopLossAtr 2.00 0.50 5.00 Protective stop distance expressed as a multiple of ATR. Higher values give the trade more room but risk more per position.
TakeProfitAtr 3.00 0.50 8.00 Take-profit distance expressed as a multiple of ATR. Sets the reward side of the reward-to-risk ratio.
TrendEmaPeriod 100 20 250 Length of the trend-filter EMA on closes. Longer values define a slower, more dominant trend regime.
MaxSpreadPoints 30 1 200 Maximum spread (in points) allowed at entry. Trades are skipped when the spread is wider, avoiding poor fills.
Lots 0.10 0.01 1.00 Base order volume, normalised to the symbol's lot step and min/max limits.
Magic 7310 0 9,999,999 Unique identifier so the EA manages only its own positions on the chart.
Relative Vigor Index MT5 EA — MQL5 source code

Recommended Chart Settings

Relative Vigor Trend Shift was designed with liquid trending instruments in mind — for example EURUSD or XAUUSD (gold) — on the M15 or H1 timeframe. These conditions give the RVI crossover and the trend EMA enough clean, directional movement to work with, which is where a momentum-plus-trend-filter approach is most at home.

Keep in mind that results will vary considerably across different symbols, timeframes, and market conditions. A setting that behaves well on one instrument during a trending phase may behave very differently on another instrument, or on the same instrument during a range-bound period. Always test any configuration on your own broker's data before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Like every strategy, Relative Vigor Trend Shift has clear strengths and equally clear limitations. Understanding both is part of using it responsibly.

Strengths. The design is deliberately compact — one oscillator, one trend filter, and one volatility-based risk model — which keeps the parameter search space small and reduces the temptation to overfit. Because RVI reads where price actually commits to close within each bar, it reflects real order-flow conviction rather than price level alone. Gating those signals with a trend EMA keeps the strategy on the side of the dominant drift and helps it sidestep much of the mid-range whipsaw that plagues raw oscillator crossovers. The ATR-based stop and target also adapt automatically to volatility across different symbols and timeframes.

Limitations. RVI is still an oscillator, and in genuinely sideways or news-driven markets it can produce clusters of false crosses. The trend EMA filters many of these, but no filter is perfect — during choppy conditions the strategy may take a series of small losing trades before the market picks a direction. Because it trades one position at a time with a fixed reward-to-risk profile, it can also give back open profit when the early-exit rule closes a trade on an opposite cross that later reverses. And like all trend-following systems, it tends to underperform during extended ranging periods and shine only when a market actually trends.

The honest takeaway: this is an educational framework for studying momentum-with-regime-filtering, not a set-and-forget solution. Its behaviour depends heavily on the market environment.

Risk Management Tips

Sound risk management matters far more than any single entry rule. Whatever strategy you study, keep these general principles in mind:

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog