Qif Pro Market Regime Engine
- Индикаторы
-
Dario Cadeddu
Quantitative Trading Systems Developer focused on risk management, market regime analysis and structured trading workflows for MetaTrader 5. - Версия: 1.2
- Обновлено: 31 октября 2026
- Активации: 5
QIF PRO - Market Regime Engine (v1.002)
QIF PRO tells you how much risk your strategy deserves right now.
It reads the current market condition on every closed bar and returns a sizing state - REDUCE, STANDARD or FULL - matched to the style of the strategy you trade: trend/breakout or mean-reversion.
QIF PRO does not generate BUY or SELL signals. It is a context and position-sizing layer that works on top of your own entries.
HOW IT WORKS
The engine combines three independent components, each measured on closed bars only:
1. Volatility expansion - ln(ATR14 / ATR100). Is volatility expanding or contracting compared with its recent norm?
2. Regime break - Bayesian online change-point detection (BOCPD) on volatility-normalised returns. Has the market just changed behaviour? A detected break stays active for 12 bars.
3. Session liquidity - a seasonal True Range factor for the current time slot of the week, measured over the last 26 weeks. Is this a high-activity or a quiet part of the session?
The three components are added into a condition score (-2 to +3):
- score >= +1 -> TREND-favourable
- score <= -1 -> MR-favourable (mean-reversion)
- otherwise -> neutral
SIZING STATE
Choose your strategy style in the inputs:
- Trend style: TREND-favourable = FULL, neutral = STANDARD, MR-favourable = REDUCE
- Mean-reversion style: the mapping is inverted (MR-favourable = FULL). In this style the state changes only after the new condition has persisted for 4 closed bars, which removes most intraday flip-flopping.
VALIDATION AND TIMEFRAME
All engine parameters are fixed: they were frozen at validation and are not optimised per symbol.
The engine is validated out-of-sample on M15 only.
- On M15 the engine is fully active.
- On any other timeframe the engine stays off and the state remains STANDARD.
- H1 can be enabled manually ("Allow unvalidated TF"), but H1 did not pass out-of-sample validation and is provided for research only.
Please use QIF PRO on M15 charts.
INTEGRATION WITH QRM PRO
QRM PRO (risk manager, sold separately) reads the QIF state directly and scales risk per trade:
- REDUCE -> x0.50
- STANDARD -> x0.75
- FULL -> x1.00
QIF only adjusts risk within your QRM settings and never increases it beyond them.
INTEGRATION WITH VEO PRO
VEO PRO (free) shows the current QIF state and the bias alignment in its footer when both indicators are on the same chart.
ON-CHART PANEL
- Sizing state and selected style
- Expansion, Liquidity, Break (active/none + probability), Confidence
- Market condition (TREND-favourable / neutral / MR-favourable) and Directional Bias
INPUTS
1. Style - Trend / breakout or Mean-reversion
2. Max Bars - published history in bars (0 = all). The internal warm-up is added automatically.
3. Allow unvalidated TF - enables the engine on H1 (not validated; off by default)
4. Show Panel
HISTORY REQUIREMENT
The liquidity component needs about 26 weeks of M15 history before it is complete. Until then the panel shows "(warming up)". Keep "Max bars in chart" at the MetaTrader default (100,000) or higher.
BUFFERS FOR EA DEVELOPERS (iCustom / CopyBuffer, read the closed bar at shift 1)
- 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 session)
- 6 Confidence: 40..100 (agreement of the three components)
- 7 Condition score: -2..+3
- 8 Regime-break probability: 0..100
- 9 Directional Bias: -100..+100 (signed efficiency ratio, 20 bars)
iCustom input order: Style, Max Bars, Allow unvalidated TF, Show Panel.
TECHNICAL
- Closed-bar logic, no repainting: the forming bar is never published
- Incremental calculation after the first load
- No DLLs, no external connections
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.
