Blog / Strategy
Strategy

VWAP RSI Reversion

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?

The VWAPRSI Reversion strategy is a mean-reversion trading system built around the Volume Weighted Average Price (VWAP) — a benchmark that blends price with traded volume to estimate the "fair value" of an instrument over a rolling window. The core idea behind mean reversion is simple to state and difficult to time: when price stretches unusually far from its statistical center, it has a historical tendency to drift back toward that center. This strategy attempts to identify those stretched moments and fade them, meaning it looks to trade against a short-term spike in the expectation that price snaps back toward the VWAP.

To avoid catching falling knives, VWAPRSI Reversion does not act on distance from VWAP alone. It layers a second, independent filter on top: the Relative Strength Index (RSI), a momentum oscillator that ranges from 0 to 100 and is widely used to flag when a market is "overbought" or "oversold." Here, RSI acts as an exhaustion gate — it must confirm that the move into the extreme is itself losing steam before a signal is allowed. A third requirement, a reversal candle printing in the intended trade direction, adds a final layer of timing confirmation. Stops are sized with the Average True Range (ATR), an indicator that measures recent volatility, so risk adapts to how active the market currently is.

As a learning tool, this strategy is well suited to traders who want to study how multiple confirmations can be combined into a single rules-based system, and how a take-profit target can be anchored to a dynamic reference (VWAP) rather than a fixed distance. It is best understood as a study in disciplined, condition-driven entries — not as a shortcut to returns. Mean-reversion logic typically performs differently in ranging markets than in strongly trending ones, a distinction this article will return to.

How It Works

The strategy evaluates its rules once per newly closed bar, never on every incoming tick, which keeps decisions tied to completed price action. It also holds only one position at a time per symbol — while a trade is open, it waits and lets the stop-loss and take-profit manage the outcome.

On each closed bar, the strategy builds its reference values and then checks for a signal:

The strategy signals a long (buy) setup only when all three of these conditions align on the just-closed bar:

The strategy signals a short (sell) setup under the mirror-image conditions:

When a long signal triggers, the entry is taken at the current ask price. When a short signal triggers, the entry is taken at the current bid price.

VWAP RSI mean reversion EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
VwapPeriod 50 20 200 Number of bars used to calculate the rolling VWAP and its standard-deviation bands. Larger values create a slower, smoother fair-value reference.
BandMult 2.0 1.0 3.5 How many standard deviations from VWAP price must close beyond to be considered "stretched." Higher values demand more extreme moves and produce fewer signals.
RsiPeriod 14 5 30 Lookback length for the RSI momentum oscillator. Shorter periods make RSI more reactive.
RsiOversold 30 15 40 The RSI oversold threshold for longs. The overbought threshold for shorts is derived automatically as 100 minus this value.
AtrPeriod 14 5 30 Lookback length for the ATR volatility measure used to size the stop-loss.
AtrSlMult 1.5 0.5 4.0 Multiplier applied to ATR to set the stop-loss distance from entry. Higher values give the trade more room but increase per-trade risk.
Lots 0.10 0.01 1.0 Fixed trade volume in lots for each position. Should be set in line with your account size and risk tolerance.
VWAP RSI mean reversion EA — MQL5 source code

Recommended Chart Settings

This strategy was designed as a general-purpose mean-reversion study and works conceptually on liquid instruments where VWAP and volume carry meaning — major forex pairs and index CFDs are common candidates. Intraday timeframes such as M15 to H1 are a reasonable starting point for studying mean-reversion behavior, since VWAP is a particularly popular reference among intraday traders. The default VwapPeriod of 50 bars covers a meaningful slice of the session on those timeframes.

That said, no single symbol or timeframe is universally "correct." Mean-reversion edges historically vary considerably across instruments and market regimes, so you should expect results to differ as conditions change. Always study the strategy's behavior on a demo account across several symbols and timeframes before drawing any conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

The strength of VWAPRSI Reversion lies in its triple confirmation. Requiring a band breach, an RSI extreme, and a reversal candle all at once makes the entry selective, which can filter out many of the weak signals that a single-indicator system would take. Anchoring the take-profit to VWAP is also elegant in concept: the target adapts to the market rather than being an arbitrary fixed distance, and the ATR-based stop scales risk with volatility.

These same design choices, however, come with trade-offs you should understand. Mean-reversion systems are, by nature, vulnerable to strong trends. When a market breaks out and keeps running, "stretched" price can become more stretched — the strategy may fade a move that simply does not revert, and the stop is where that risk is realized. The reversal-candle and RSI filters reduce but do not eliminate this exposure. Because the take-profit is the VWAP and the stop is ATR-based, the reward-to-risk ratio is not fixed; in some setups price may sit close to VWAP already, producing a relatively small target compared to the stop. The strategy also trades one position at a time, so it can sit idle through long stretches when conditions never fully align.

The honest summary is that this is a thoughtfully constructed example of multi-filter mean reversion, not a finished, market-ready system. It is most valuable as something to study, test, and stress against different conditions — not as a tool to deploy unexamined.

Risk Management Tips

Sound risk management matters far more than any single entry rule. Consider these general principles as you study this or any strategy:

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