Matrix Distribution Momentum Filter
Family: trend_following · Regime: trending · Complexity: medium · Asset classes: Equities, Forex, Crypto · Timeframes: 1H, 4H, D1
Thesis
Sustained price movement is a function of volume-backed momentum that hasn't yet reached distributional extremes; by filtering for price location within a sorted matrix and capping allowed relative error (MAPE), we identify high-probability trend entries while avoiding exhaustion.
Components
- Supported ta.dmi na lengths (regime) — Acts as a technical heartbeat/regime check; if the environment fails to compute valid DMI values (returning NA), the strategy suspends operations to prevent garbage-in-garbage-out signals.
- Matrix Sort Method UDF Test (direction) — Determines the 'distributional trend' by sorting the last N prices in a matrix and comparing the current price to the median value. Current > Median = Bullish.
- QQE (Qualitative Quantitative Estimation) (entry) — Provides the primary momentum entry signal through the crossover of its RSI-derived moving average and trailing volatility bands.
- Chandelier Exit (exit) — Provides a volatility-adjusted trailing stop-loss to capture trend extensions while exiting on significant adverse movements.
- SuperTrend (risk) — Used for risk management and hard stop-loss placement; the distance between entry and the SuperTrend line defines the risk unit for position sizing.
- Accumulation/Distribution (A/D) Index (confirmation) — Confirms that momentum (QQE) is supported by volume flow; long entries require an upward trend in A/D to ensure buying pressure.
- Mean Absolute Percentage Error (MAPE) (volatility_filter) — Filter to avoid 'outlier volatility' regimes. If MAPE (relative to a 100-EMA) is too high, the trend is considered overextended or erratic.
Known failure conditions
- If the MAPE remains consistently above 5%, indicating the asset is too erratic for EMA-based modeling.
- If the A/D index stays flat during a significant price move, suggesting a lack of volume participation.
- If the 'ta.dmi' function returns NA across multiple periods, signaling a platform or data feed incompatibility.
Explore the full interactive blueprint, parameter ranges and evidence on WOBR StrategyVerse, or generate this strategy as an MT4/MT5 Expert Advisor with QuantMogul AI Engine.