Blog / Strategy
Strategy

Von Neumann Ratio Trend

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 Von Neumann Ratio Trend strategy is a trend-continuation approach for MetaTrader 5 that uses the von Neumann ratio — a successive-difference statistic closely related to the Durbin-Watson test used in statistics — as its core regime filter, combined with a channel breakout entry trigger. In plain terms, the strategy tries to measure how smooth a price path is before it commits to riding a move. Smoothness, in this context, is treated as evidence that a trend is orderly and persistent rather than choppy and prone to whipsaw.

The von Neumann ratio (VNR) compares the average size of each bar-to-bar change against the overall spread of prices around their mean over a lookback window. When a market drifts steadily in one direction, each individual step is small relative to how far price has travelled from the window's average, so the ratio falls well below 1. When a market chops sideways, each step is large relative to a modest spread, and the ratio climbs toward or beyond 2 — the value you would expect from independent, random-walk-like noise. This strategy only looks for entries when the ratio is low, meaning the path is "certifiably smooth."

As a learning tool, the Von Neumann Ratio Trend is well suited to traders who want to study regime filtering — the idea that a breakout signal is only worth taking under the right market conditions. It is a good example of how a statistical measure of price behaviour can be layered on top of a simple directional trigger. It is not a beginner "set and forget" system; it rewards study of how the smoothness gate interacts with the breakout logic.

How It Works

The strategy evaluates its logic once per completed bar, using the most recently closed candle as the trigger bar. It combines a regime filter, a directional bias, and a breakout confirmation before any order is placed.

Because every calculation uses the platform's primary symbol and timeframe, the strategy operates on a single chart and a single timeframe at a time.

von Neumann ratio trend MT5
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
VnrPeriod 40 20 120 Number of closing prices used to measure the von Neumann ratio (the smoothness window).
PersistThreshold 1.10 0.60 1.80 The VNR must be below this value to trade. Lower settings act as a stricter "smooth trend only" gate.
TrendPeriod 30 10 100 Net-displacement window that sets trade direction (up bias vs. down bias).
TriggerLookback 8 3 30 Number of bars before the trigger bar whose high/low the breakout must clear.
AtrPeriod 14 5 50 ATR period used to size the stop and target.
AtrStopMult 2.0 0.5 6.0 Stop-loss distance expressed as a multiple of ATR.
AtrTargetMult 3.0 0.5 10.0 Take-profit distance expressed as a multiple of ATR.
Lots 0.10 0.01 1.0 Order volume (position size) in lots.
von Neumann ratio trend MT5 — MQL5 source code

Recommended Chart Settings

The Von Neumann Ratio Trend was designed as a single-symbol, single-timeframe expert advisor. A common starting point for studying this type of trend-continuation logic is a major forex pair such as EUR/USD on an H1 (1-hour) or H4 (4-hour) timeframe, where trends tend to develop with enough persistence for a smoothness filter to be meaningful. Lower timeframes tend to be noisier, which can keep the VNR elevated and reduce the number of qualifying signals.

Keep in mind that the default parameters are a neutral baseline, not an optimized configuration. Results will vary considerably across different symbols, timeframes, broker spreads, and market conditions. Any timeframe or instrument you choose should be studied on its own before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of the approach. The most distinctive feature of this strategy is its regime filter. Rather than taking every breakout, it uses the von Neumann ratio to demand statistical evidence that the path is smooth before committing. This is a rigorous, well-grounded idea: successive-difference variance is a classic tool for detecting whether a series is trending or behaving like noise. Layering a directional bias and a channel breakout on top of that filter gives the entries structure, and the ATR-based stops adapt risk to volatility rather than using fixed distances.

Known limitations. The strategy is, by design, selective — the smoothness gate can filter out many bars, so signals may be infrequent. In markets that are genuinely range-bound or erratic, the VNR may rarely drop below the threshold, and the EA can sit idle for long stretches. Conversely, no filter is perfect: a smooth path can still reverse sharply after entry, and the breakout trigger can fire near the exhaustion of a move, leading to entries just before a pullback. The stop-and-reverse behaviour means that in a whipsawing environment where signals alternate, the strategy can flip sides repeatedly and accumulate losses from spread and adverse moves.

Where it may underperform. Choppy, low-volatility ranges and news-driven spikes are the natural enemies of a smoothness-based trend follower. Because entries depend on both a low VNR and a channel breakout in the biased direction, sudden regime changes can leave the strategy on the wrong side of a reversal. Treat this EA as a framework for studying how regime filtering behaves, not as a finished, market-ready system.

Risk Management Tips

Sound risk management matters far more than any single entry rule. Consider these general principles as part of your education:

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