Blog / Strategy
Strategy

Informed Flow Imbalance 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?

The Informed Flow Imbalance Shift is a market-microstructure, order-flow strategy built on Bulk Volume Classification (BVC) — the same volume-splitting technique that powers the well-known VPIN ("Volume-Synchronized Probability of Informed Trading") flow-toxicity research by Easley, López de Prado, and O'Hara. Rather than using a traditional oscillator like RSI or MACD, this Expert Advisor (EA) tries to read who is driving each bar's volume — buyers or sellers — and trades in the direction of that classified order flow when it decisively tips one way.

Most simple volume tools use a crude rule: an up-bar counts as buying volume and a down-bar counts as selling volume. Bulk Volume Classification is more nuanced. It divides each bar's volume probabilistically between buyers and sellers using the standard-normal CDF (cumulative distribution function, denoted Φ) of the bar's standardized price change. A tiny move on heavy volume is treated as roughly balanced two-sided trade; a large move on the same volume is classified as almost entirely one-sided. Summing these signed, volume-weighted classifications over a rolling window produces an order-imbalance oscillator bounded between −1 and +1.

This strategy is designed for traders who want to study order-flow concepts and volatility-normalized signal construction on a liquid instrument. It is a trend-following / flow-following system best suited to those learning how microstructure ideas translate into a mechanical, rule-based EA. It is an analytical learning tool — not a shortcut — and it works on whatever timeframe is selected at backtest time.

How It Works

The core of the strategy is the order-imbalance oscillator, often written as OI. On every newly-closed bar the EA recomputes it and looks for a fresh shift across a threshold. Here is the logic in plain English:

Everything in the design self-scales: the volume classification is normalized by rolling volatility (sigma), the imbalance is normalized by total volume, and the stop and target are ATR multiples. This means the same parameter set adapts as market volatility expands or contracts.

informed flow imbalance MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
FlowPeriod 20 8 60 Rolling window (in bars) over which classified buy/sell volume is summed to build the order-imbalance oscillator.
SigmaPeriod 50 20 150 Lookback for the standard deviation of close-to-close change used to standardize each bar (sigma).
Threshold 0.25 0.05 0.60 The order-imbalance level (0–1) the oscillator must freshly cross to trigger a trade. Higher = more selective.
AtrPeriod 14 5 30 Lookback period for the ATR used to size stops and targets.
AtrStopMult 1.5 0.5 4.0 Stop-loss distance as a multiple of ATR.
AtrTargetMult 2.0 0.5 6.0 Take-profit distance as a multiple of ATR.
MaxSpreadPoints 80 5 300 Skip new entries when the current spread (in points) is wider than this value.
Lots 0.10 0.01 1.0 Trade volume (lot size) per position.
Magic 5124 0 9,999,999 Unique identifier so the EA manages only its own positions.
informed flow imbalance MT5 EA — MQL5 source code

Recommended Chart Settings

This strategy was designed with a liquid instrument in mind — a major FX pair, a metal, or an index such as EURUSD, XAUUSD, or US500 — on an intraday timeframe of roughly M5 to M30, where tick volume serves as a reasonable proxy for genuine order flow. The EA uses only the chart's primary timeframe, so it runs on whatever timeframe you attach it to at backtest or trade time.

Because the whole approach depends on tick volume as an order-flow proxy, instruments with rich, well-distributed tick activity tend to suit it better than thin or illiquid symbols. As always, results will vary across different market conditions, brokers, and volatility regimes. Test thoroughly on historical data and a demo account before drawing any conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of this approach. The Bulk Volume Classification method is a genuinely thoughtful upgrade over naive up-bar/down-bar volume splitting, and it rests on peer-reviewed microstructure research. Because the classification is volatility-normalized and the imbalance is volume-normalized, the oscillator is comparable across market regimes. The "fresh cross" requirement means the EA waits for a decisive shift rather than reacting to noise, and ATR-based stops and targets keep risk proportional to current volatility. The spread filter is a practical touch that helps avoid entering when trading costs are elevated.

Known limitations. Tick volume in MetaTrader 5 is not true exchange volume — it counts price updates, not traded contracts. On decentralized FX, it is only a proxy, and its reliability varies by broker and feed. The BVC classification inherits any distortion in that proxy. Like most trend- and flow-following systems, this strategy can struggle in choppy, range-bound markets where imbalance flickers across the threshold without follow-through, producing whipsaw entries. A fixed 1:1.33 stop-to-target geometry may also cut winners short in strongly trending conditions or hold losers too long in fast reversals.

Where it may underperform. Expect weaker behavior during low-liquidity sessions, around major news releases when spreads blow out (though the filter helps), and in prolonged sideways consolidation. No single parameter set is optimal for all symbols or all market phases, so treat the defaults as a starting point for study, not a finished configuration.

Risk Management Tips

Sound risk management matters more than any single indicator. Consider these general principles as you study this EA:

Approach this EA as a way to learn how order-flow and volatility-normalized signals behave, not as a hands-off solution. Ongoing monitoring, testing, and disciplined risk control remain essential.

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