Blog / Strategy
Strategy

Volume Time Price Divergence

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?

Volume Time Price Divergence is an order-flow momentum strategy that compares two different ways of averaging the same price to infer where trading conviction is building. Its core indicator is a custom divergence oscillator built from the gap between a TWAP (Time-Weighted Average Price — every bar counted equally) and a VWAP (Volume-Weighted Average Price — each bar weighted by its tick volume), normalized by the ATR (Average True Range, a standard measure of volatility). Because both averages are computed from the same typical price, they can only diverge based on where the volume actually traded — which is exactly the footprint this strategy tries to read.

The strategy is designed for liquid instruments that carry meaningful tick volume, such as EUR/USD, gold (XAU/USD), or a major index CFD. It works on whatever single timeframe you attach it to, and it belongs to the trend-following / order-flow momentum family. Rather than tracking price against a single VWAP line, it measures the difference between two averaging schemes, which lets it detect accumulation or distribution pressure even while price is largely sitting still.

As a learning tool, Volume Time Price Divergence is well-suited to traders who want to understand how volume and time can be blended to build a lightweight order-flow proxy without needing a full order book or Level II data. It is best treated as a study in market-microstructure concepts — how one-sided participation can precede directional continuation — rather than as a turnkey system. Newer traders can use it to see how normalization by volatility keeps a signal scale-free across different instruments.

How It Works

The strategy acts once per completed bar. On each new bar it rebuilds its averages over a rolling window and recomputes the divergence oscillator, then checks for entry or exit conditions.

volume time price divergence EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
Lookback 20 5 100 Number of bars in the rolling window over which TWAP and VWAP are measured.
AtrPeriod 14 5 50 ATR period used to normalize the VWAP−TWAP gap into a scale-free divergence.
Threshold 0.12 0.02 1.00 Divergence level, in ATR units, that D must freshly cross to arm an entry.
StopAtr 2.0 0.5 6.0 Stop-loss distance expressed as a multiple of ATR.
TargetAtr 3.0 0.5 10.0 Take-profit distance expressed as a multiple of ATR.
Lots 0.10 0.01 1.00 Trade volume in lots.
Magic 74213 0 9,999,999 Magic number used to identify and manage this EA's positions.
volume time price divergence EA — MQL5 source code

Recommended Chart Settings

Volume Time Price Divergence was designed for liquid instruments with meaningful tick volume — for example EUR/USD, XAU/USD (gold), or a major index CFD. It runs on whatever single timeframe you attach it to, so intraday charts such as M15, M30, or H1 are natural starting points for study because they produce enough completed bars to fill the lookback window while still reacting to fresh shifts in participation.

Because the oscillator relies on tick volume, the quality of your broker's volume feed matters. Keep in mind that results will vary considerably across different symbols, timeframes, brokers, and market conditions. Always study the behavior on a demo account first and observe how the divergence reacts to your specific instrument before drawing any conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

The main strength of this approach is conceptual clarity. By comparing a time-weighted average against a volume-weighted average of the same price, Volume Time Price Divergence isolates the volume footprint from raw price action — a genuinely different mechanism from watching price cross a single VWAP line. The ATR normalization makes the signal scale-free, the fresh-crossing requirement avoids chasing stale moves, and the price-agreement filter (close relative to TWAP) reduces entries that fight the immediate trend. The flow-flip exit adds a responsive way to leave a trade when the underlying pressure reverses.

There are also real limitations to understand. Tick volume is a proxy for true traded volume; in forex there is no centralized volume feed, so readings depend on your broker and can differ between platforms. In quiet, choppy, or range-bound conditions the TWAP and VWAP can hug each other closely, producing small, noisy divergence values that whipsaw around the threshold and generate low-quality signals. Like most momentum and trend-following logic, this strategy historically tends to struggle when a market lacks sustained one-sided participation, and the flow-flip exit — while protective — can occasionally close a trade just before it would have resumed. News-driven volatility spikes can also distort both the volume weighting and the ATR normalization.

Treat this EA as an educational study rather than a finished system. Its behavior is sensitive to the Lookback and Threshold settings, and there is no single configuration that suits every instrument or regime. Forward-testing on a demo account and reviewing the trade log are the most reliable ways to learn how it responds to your chosen market.

Risk Management Tips

Sound risk management matters more than any single signal. Consider these general principles as you study the strategy:

These points are educational guidelines, not guarantees. No amount of risk management removes the possibility of loss, and you should size and monitor positions in line with your own circumstances and a qualified adviser's guidance.

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