QIF PRO User Manual – Market Regime Engine for MetaTrader 5

QIF PRO User Manual – Market Regime Engine for MetaTrader 5

15 September 2026, 10:55
Dario Cadeddu
0
93

1. WHAT QIF PRO DOES


QIF PRO answers one practical question: how much risk does my strategy deserve right now?


On every closed bar it measures the current market condition and returns a sizing state:

- REDUCE (trade smaller)

- STANDARD (normal size)

- FULL (full size)Cover trend EURUSD

Figure 1 - QIF PRO on EURUSD M15, Trend style: REDUCE overnight, FULL during the London and New York sessions.


The state depends on the style of the strategy you trade. A trend/breakout system and a mean-reversion system need opposite conditions, so QIF PRO maps the same market reading in opposite ways for the two styles.


What QIF PRO is not:

- It does not generate BUY or SELL signals. It works on top of your own entries.

- It does not predict direction. The Bias field is context only.

- It does not repaint. Only closed bars are published; the forming bar is always empty.



2. INSTALLATION AND QUICK START


1. Buy or download the demo from the MQL5 Market. After installation the indicator is in the Navigator under Indicators > Market.

2. Open an M15 chart (EURUSD, a major pair or gold).

3. Drag QIF PRO onto the chart.

4. In the Inputs tab choose your Style:

   - Trend / breakout strategies

   - Mean-reversion strategies

5. Click OK. QIF PRO opens in its own sub-window with an on-chart panel.


On the first load the panel can show SYNCING HISTORY or CALCULATING for a few seconds while the full history is processed. This is normal.


Important: the engine is validated on M15 only. On any other timeframe it stays off and the state is always STANDARD (see section 7).



3. INPUTS


There are only four inputs. All engine parameters are fixed: they were frozen at validation and are not optimised per symbol.


- Style: Trend / breakout or Mean-reversion. Choose the style of the strategy you size with QIF.

- Max Bars (default 5000): how many bars of history are published on the chart. 0 = all. The internal warm-up is added automatically and does not depend on this value.

- Allow unvalidated TF (default false): enables the engine on H1. H1 did not pass out-of-sample validation; use it for research only.

- Show Panel (default true): shows or hides the on-chart panel.



4. READING THE CHART


The histogram in the sub-window shows the sizing state of every closed bar:

- Red, short bar: REDUCE

- Grey, medium bar: STANDARD

- Green, tall bar: FULL


The panel always describes the LAST CLOSED BAR, not the bar under the mouse. Scrolling back in history does not change the panel.


Panel fields:

Panel closeup

Figure 2 - The QIF PRO panel. It always describes the last closed bar.

SIZING | style

The current sizing state and its QRM PRO multiplier: REDUCE x0.50, STANDARD x0.75, FULL x1.00.

"(warming up)" means the history is not long enough yet for all components (see section 8).


EXPANSION

Short-term volatility versus its recent norm: 100 x ln(ATR14 / ATR100).

- 0% = volatility in line with the norm

- -23% = ATR14 is about 80% of ATR100 (contracting)

- +20% = ATR14 is about 120% of ATR100 (expanding)


LIQUIDITY

How active the current time slot of the week normally is, compared with the average of the last 26 weeks. 100 = average activity.

- 73 = a quieter-than-average slot

- 130 = a busy slot (for example the London/New York overlap)


BREAK

Regime-break detection (Bayesian online change-point detection on volatility-normalised returns).

- "none 2%" = no recent change in behaviour

- "ACTIVE 93%" = the market has just changed behaviour. A break stays active for 12 bars (3 hours on M15).


CONFIDENCE (40-100)

How strongly the three components agree. 40 = neutral reading, 60 = one-step condition, 80-100 = strong agreement.


MARKET

The condition: TREND-favourable, neutral or MR-favourable.


BIAS

Direction of the last 20 bars (signed efficiency ratio): BULLISH, BEARISH or NEUTRAL. Context only; it does not affect the state.



5. HOW THE STATE IS BUILT


Each component adds a vote to a condition score (M15 thresholds):


- Expansion: below -25% votes -1, above +12.3% votes +1, otherwise 0

- Break: active votes +1, otherwise 0

- Liquidity: below 77 votes -1, above 114 votes +1, otherwise 0


Score from -2 to +3:

- +1 or more: TREND-favourable

- -1 or less: MR-favourable

- 0: neutral


Then the style decides the sizing state:

Sizing by style

Figure 3 - The same market condition maps to opposite sizing states for Trend and Mean-reversion strategies.

Mean-reversion style only: the state changes after the new condition has persisted for 4 closed bars. This removes most intraday flip-flopping.


In plain trading terms:

- Expanding volatility, a fresh change in behaviour and an active session favour moves that continue: good for trend and breakout entries.

- Contracting volatility, no recent break and a quiet session favour ranges: good for mean-reversion entries.



6. USING QIF PRO IN PRACTICE


Manual trading:

1. Take your entries exactly as your strategy says.

2. Before sending the order, look at the QIF state and scale the size:

   FULL = your full risk, STANDARD = 75%, REDUCE = 50%.

3. Do not use QIF as an entry trigger and do not skip trades because of it, unless that is part of your own tested rules.


With QRM PRO (automatic): see section 9.


Practical notes:

- Choose the Style that matches the strategy, not your view of the market.

- If you run a trend system and a mean-reversion system at the same time, attach QIF twice (one per style) or read both styles from an EA.

- The state is a sizing tool: it puts more risk on trades taken in conditions that suit your style and less on the others. It does not make losing trades disappear.



7. TIMEFRAMES


- M15: engine active (validated).

- H1: engine off by default. It can be enabled with "Allow unvalidated TF", but H1 failed out-of-sample validation.

- Any other timeframe: engine off.


When the engine is off the state is always STANDARD x0.75, the histogram is grey, the market field shows "not validated on this TF" and the panel footer shows "Engine inactive on this TF (use M15)".

H1_Inactive

Figure 4 - On H1 the engine is inactive: the state stays STANDARD x0.75.


8. HISTORY REQUIREMENTS


The liquidity component needs about 26 weeks of M15 history. With less history the panel shows "(warming up)" and Liquidity "--", and the state is computed from the other components only.


If you see "(warming up)":

1. Tools > Options > Charts > Max bars in chart: set "Unlimited" (or at least 100,000).

2. On the chart press Home a few times to download older history.

3. Switch timeframe and back to M15 to recalculate.


Some brokers do not provide enough M15 history for every symbol (often exotic pairs and some metals on demo servers). In that case use a symbol with full history.



9. INTEGRATION WITH QRM PRO


QRM PRO (risk manager, sold separately) reads the QIF state and scales the risk per trade automatically.


Setup:

1. Put QIF PRO and QRM PRO on the same M15 chart.

2. In the QRM PRO inputs, group "5. COMPANION INDICATORS":

   - Use QIF PRO market regime = true

   - QIF PRO mode = the option that applies the QIF state to risk (the option "Display QIF context; do not modify risk" only shows it)

3. In the QRM panel, RISK ENGINE section, check the "QIF x..." value and the Final Risk.


Example: base risk 0.50% with QIF in REDUCE gives QIF x0.50 and Final Risk 0.25%.

Ecosystem QRM_VEO

Figure 5 - QRM PRO applies the QIF state: base risk 0.50% × QIF REDUCE 0.50 = final risk 0.25%.


QIF only scales risk within your QRM settings: it never raises risk above them.



10. INTEGRATION WITH VEO PRO


VEO PRO (free) shows the QIF state in its footer when both are on the same chart:

- QIF=RED / QIF=STD / QIF=FUL

- /AL = the QIF bias agrees with VEO, /CF = conflict


The QIF information in VEO is display only. It never changes VEO's own calculations.



11. FOR EA DEVELOPERS


Read the closed bar at shift 1. The forming bar (shift 0) is always EMPTY_VALUE.


Buffers:

- 2 State: 0 = REDUCE, 1 = STANDARD, 2 = FULL

- 3 Risk: 0..70 (volatility expansion gauge)

- 4 Expansion: 100 x ln(ATR14/ATR100)

- 5 Liquidity: 100 x seasonal factor (100 = average)

- 6 Confidence: 40..100

- 7 Condition score: -2..+3

- 8 Regime-break probability: 0..100

- 9 Directional Bias: -100..+100

EA Buffers

Figure 6 - Buffer map and iCustom input order.


Input order for iCustom: Style, Max Bars, Allow unvalidated TF, Show Panel.



12. TROUBLESHOOTING


- The panel shows "(warming up)": not enough history, see section 8.

- The state is always STANDARD and the histogram is grey: you are not on M15 (section 7).

- The panel does not change when I scroll back: correct, it always shows the last closed bar.

- SYNCING HISTORY / CALCULATING on first load: wait a few seconds while the history is processed.

- QRM PRO shows QIF x1.00 while QIF is in REDUCE: check that "Use QIF PRO market regime" is true and that the QIF mode applies the state to risk (section 9).



13. VERSION HISTORY


v1.002 (MQL5 Market version 1.2)

- New engine: volatility expansion, Bayesian regime-break detection and session liquidity

- Sizing states REDUCE / STANDARD / FULL by strategy style

- Validated on M15; other timeframes stay STANDARD

- Inputs reduced to 4


Get QIF PRO on the MQL5 Market: https://www.mql5.com/en/market/product/195528


RISK WARNING


QIF PRO is an analytical tool, not financial advice. It does not guarantee results. Trading leveraged products involves a high level of risk and may not be suitable for all investors. Test any change to your position sizing on a demo account before using it live.