Algo Shadow Matrix — User Manual & Installation Guide

20 May 2026, 06:08
Kestutis Balciunas
0
37
Algo Shadow Matrix — User Manual & Installation Guide

Introduction

The Algo Shadow Matrix indicator is a non-repainting adaptive trend system for MetaTrader 4 and MetaTrader 5 that solves vanilla Supertrend's biggest weakness — fixed-width bands that whipsaw in chop and lag in clean trends. Algo Shadow Matrix measures a continuous Trend Quality Index (TQI) from four independent factors on every confirmed bar and uses that index to modulate band-width, asymmetrically tighten the active trailing stop, widen the passive side, and trigger early regime flips when trend character collapses. The indicator pairs this adaptive engine with a 6-factor confluence scorer (0–102 with on-chart star rating), automatic SL and three R-multiple take-profit targets, a 100-trade rolling performance buffer with 3×3 regime grid, and a multi-section dashboard.

This manual walks through installation, the first chart attach, every input group, reading the chart and dashboard, configuring alerts, five preset configurations, and troubleshooting. For a deeper theoretical understanding of the TQI math, the asymmetric-band derivation, and the character-flip detection logic.

Download the indicator: 

TIP: Algo Shadow Matrix is designed for traders who want a structured, adaptive trend system with built-in risk management and performance tracking. It works on any symbol and any timeframe available in MetaTrader.

Installation Guide

Algo Shadow Matrix is distributed through the MQL5.com Market. Installation is automatic — no manual file copying is required.

Step 1 — Purchase and Auto-Install

  1. Purchase the indicator from the MQL5 Market product page
  2. The indicator installs automatically into your MetaTrader terminal
  3. Open MetaTrader and press Ctrl+N to open the Navigator panel
  4. Expand Indicators > Market
  5. Find Algo Shadow Matrix in the list

Step 2 — Attach to a Chart

  1. Drag the indicator from the Navigator onto any chart
  2. The input dialog opens
  3. Review or adjust the inputs (defaults are tuned for H1 swing trading on majors)
  4. Click OK to attach

IMPORTANT: Do not manually copy files to the data folder. The MQL5 Market handles all file placement, automatic activation, and version updates.

If you do not see the indicator in your Navigator after purchase, restart MetaTrader. If it still does not appear, check View > Toolbox > Journal for error messages and verify your MQL5.com account is logged in via Tools > Options > Community.


First Impression — What You See on the Chart

Once attached with default inputs, the indicator immediately draws several elements:

  • Two colored Supertrend lines — the bullish line in mint when the regime is bullish (price above it acts as trailing stop), the bearish line in red when the regime is bearish
  • Signal arrows at every confirmed flip in the visible history — mint up-arrow for BUY, red down-arrow for SELL — each with a numeric confluence score and star rendering
  • Active trade level lines — when a trade is currently open (most recent signal has not yet hit SL or TP3), four horizontal lines extending forward from the signal bar: entry (white), SL (dashed red), TP1 (dashed mint thin), TP2 (dashed mint full), TP3 (dotted mint)
  • TP/SL hit labels dropped on bars where price first touched each level
  • Multi-section dashboard in the top-right corner showing live state across Header, Market Context, TQI Engine, Active Signal, and Performance sections

If the chart looks cluttered, scroll the inputs to the Visual group and toggle off the bands ( ShowBandsInput ), the signal arrows ( ShowSignalsInput ), the trade levels ( ShowRiskInput ), or the dashboard ( ShowDashInput ) individually.


Reading the Signal Labels


A signal label combines three elements:

  1. A Wingdings arrow placed below the bar low (for BUY) or above the bar high (for SELL), colored mint for buys and red for sells
  2. A bold text label further from the candle showing  BUY 78 ****  or  SELL 91 *****  with the numeric confluence score (0–102) and star count (1–5)
  3. A tooltip that appears on hover showing the full trade specification: entry price, SL, TP1/TP2/TP3 prices, R-multiples, TQI value at signal time, and the six confluence factor scores

Star count interpretation (based on total 0–102 score):

  • *  — score 0–25 (one filter — weakest setup)
  • **  — score 26–45 (two filters — okay)
  • ***  — score 46–65 (three filters — solid)
  • ****  — score 66–85 (four filters — strong)
  • *****  — score 86–102 (five filters — exceptional, rare)

Higher star counts indicate stronger historical edge. The indicator draws all confluence levels — it does not filter out low-star signals. The decision to act on a 2-star versus a 4-star setup is the trader's, informed by the regime grid in the dashboard and personal strategy preference.


Input Parameter Groups


The input panel is organized into eight sections covering the adaptive engine, the trend quality engine, signal filtering, risk management, visuals, dashboard layout, and alerts.

Main Settings

The high-level controls that govern the indicator's behavior:

  • PresetInput  (default Auto) — choose Auto (timeframe-driven preset selection), Custom (use exact input values), or one of the four explicit presets (Scalping, Default, Swing, Crypto)
  • AtrLenInput  (13) — period for the base ATR calculation used by the Supertrend bands
  • BaseMultInput  (2.0) — base ATR multiplier before TQI-driven modulation

Adaptive Engine (Legacy ER)

The classic Kaufman Efficiency Ratio engine — preserved as a baseline layer that operates beneath the full TQI engine:

  • UseAdaptiveInput  (true) — enable legacy ER-based adaptation
  • ErLengthInput  (20) — period for the Efficiency Ratio window
  • AdaptStrengthInput  (0.5) — how strongly legacy ER influences band-width (0 = none, 1 = full)
  • AtrBaselineLenInput  (100) — period for the long-term ATR baseline used in the volatility regime fallback

Trend Quality Engine

The TQI core — four factors, weighting controls, curve, asymmetric bands, character-flip detector:

  • UseTqiInput  (true) — master switch for the TQI engine
  • QualityStrengthInput  (0.4) — how strongly TQI modulates band-width (0–1)
  • QualityCurveInput  (1.5) — non-linearity exponent on  (1 - TQI)^curve  (higher = more dramatic expansion on chop)
  • MultSmoothInput  (true) — apply EMA smoothing to band multipliers (recommended on)
  • UseAsymBandsInput  (true) — enable asymmetric band tightening/widening
  • AsymStrengthInput  (0.5) — how strongly the asymmetry applies (0 = symmetric, 1 = full asymmetry)
  • UseEffAtrInput  (true) — multiply ATR by  0.5 + 0.5 * ER  before SL/TP computation
  • UseCharFlipInput  (true) — enable character-flip detection (early regime flips on TQI collapse)
  • CharFlipMinAgeInput  (5) — minimum trend age (bars) before a character-flip can fire
  • CharFlipHighInput  (0.55) — TQI threshold the previous bar must exceed
  • CharFlipLowInput  (0.25) — TQI threshold the current bar must fall below
  • TqiWeightErInput  (0.35),  TqiWeightVolInput  (0.20),  TqiWeightStructInput  (0.25),  TqiWeightMomInput  (0.20) — factor weights (auto-renormalized to sum to 1.0)
  • TqiStructLenInput  (20) — period for structural position window
  • TqiMomLenInput  (10) — period for momentum persistence window

Signal Filters (Display Layer)

These inputs control which factors are visible in the 6-factor confluence scoring on every signal. Disabling a filter awards a neutral BYPASS_SCORE = 12 for that factor instead of penalizing:

  • UseStructureInput  (true) — enable pivot-distance scoring
  • PivotLenInput  (3) — pivot lookback length
  • UseRsiInput  (true) — enable RSI-depth scoring
  • RsiLenInput  (14) — RSI period
  • RsiOBInput  (70) — RSI overbought level
  • RsiOSInput  (30) — RSI oversold level
  • RsiLookbackInput  (20) — bars to look back for deepest RSI excursion
  • UseVolInput  (true) — enable volume-burst scoring
  • VolLenInput  (20) — volume SMA period

Risk Management

SL and TP target configuration:

  • ShowRiskInput  (true) — draw SL and TP lines on chart when a trade is active
  • SlAtrMultInput  (1.5) — ATR multiplier for the stop-loss distance
  • Tp1RInput  (1.0),  Tp2RInput  (2.0),  Tp3RInput  (3.0) — R-multiples for the three take-profit targets (auto-sorted ascending)
  • LabelOffsetInput  (10) — how many bars forward to extend the SL/TP lines
  • ShowHitsInput  (true) — drop hit labels ( TP1 HIT ,  SL HIT , etc.) at the bars where each level was touched
  • TradeMaxAgeInput  (100) — maximum bars a trade can stay "active" before it auto-expires (prevents stale lines)

The SL mode selector lives inside the indicator code but the input naming differs across versions; the three modes (ATR + Pivot, Pure ATR, Recent Swing) are documented in the educational article. Default is ATR + Pivot.

Visual

  • ShowBandsInput  (true) — show the bullish and bearish Supertrend lines
  • ShowSignalsInput  (true) — show signal arrows and labels
  • Color inputs for bullish elements (default mint), bearish elements (default red), and dashboard section accents

Dashboard

  • ShowDashInput  (true) — show the multi-section dashboard widget
  • ShowTqiBreakdownInput  (false) — expand the TQI section to show the four-factor breakdown (ER / Vol / Struct / Mom each on its own row)
  • ShowPerfInput  (true) — show the Performance section (rolling W/L%, regime grid, streaks)
  • DashPosInput  (TR) — corner anchor: TR (Top Right), TL (Top Left), BR (Bottom Right), BL (Bottom Left), MR (Mid Right), ML (Mid Left)
  • DashFontSizeInput  (8) — base font size (6–24)
  • DashMarginInput  (10) — pixel distance from chart edge
  • DashOffsetXInput  (0) — additional horizontal nudge (+ right, - left)
  • DashOffsetYInput  (20) — additional vertical nudge (+ down, - up)
  • DashColumnWidthInput  (130) — pixel width per column

Alerts

  • EnableAlertsInput  (true) — master alert switch
  • EnablePopupInput  (true) — fire MetaTrader popup dialogs
  • EnablePushInput  (false) — send push notifications to the mobile app
  • EnableEmailInput  (false) — send email via terminal SMTP

Reading the Dashboard


The dashboard is a pixel-anchored widget rendered in a corner of the chart, organized into a header row plus four colored sections.

Header (row 0). Brand title  ALGO SHADOW MATRIX  on the left,  by Forexobroker  subtitle, current symbol and timeframe on the right.

MARKET CONTEXT (rows 1–4, blue background). Four rows of market context:

  • Trend Regime — BULLISH / BEARISH / NEUTRAL with matching color
  • Active Preset — current preset name plus status (e.g., "Default — Active" or "Custom" or "Auto -> Scalping")
  • ATR — current ATR value plus ATR as a percent of current price (useful for cross-symbol volatility comparison)
  • Regime / Vol — Regime classification (Trend / Range / Chop) and volume classification (High / Mid / Low)

TQI ENGINE (rows 5–7 or 5–9 if breakdown enabled, purple background). TQI section:

  • TQI Score — the 0..1 TQI value, with QStrength indicator showing the effective influence
  • ER + RSI + VolZ — three values on one row giving the raw inputs to the engine
  • If  ShowTqiBreakdownInput  is on, four additional rows show ER / Vol / Struct / Mom factor values with their contributing weight

ACTIVE SIGNAL (rows 8–12, orange background). When a trade is currently active:

  • Direction — LONG / SHORT with bars-ago count (e.g., "LONG 5 bars ago")
  • Entry — entry price plus live percent-PnL from current bar's close
  • SL — SL price plus percent-distance from entry
  • TP1 — TP1 price with R-multiple, suffixed with  *  if hit
  • TP2 — TP2 price with R-multiple, suffixed with  *  if hit
  • TP3 — TP3 price with R-multiple, suffixed with  *  if hit

When no trade is active, the section collapses to a single "WAITING FOR SIGNAL" row.

PERFORMANCE (rows 13–16, indigo background). Performance summary:

  • Win Rate — rolling W/L percentage over the buffer (last 100 trades), average R-realized, current streak (win or loss with consecutive count)
  • Drawdown — Window DD (max drawdown from buffer high) plus All-Time DD (max drawdown since indicator load)
  • Cumulative R — sum of all realized R since indicator load
  • Regime Grid — compact 3×3 of colored cells with EWMA R per (ER bin, Vol bin) cell

The dashboard updates on every tick. The Active Signal section is particularly useful for monitoring open trades — you can see at a glance how close the trade is to each TP level without scrolling the chart.

To reposition the dashboard, change  DashPosInput  to one of the six corner options, then use  DashOffsetXInput  and  DashOffsetYInput  for pixel-level nudging. Default  DashOffsetYInput = 20  keeps it below the symbol/timeframe toolbar area on most chart layouts.


Configuring Alerts

Figure 4 — popup, push, email alert configuration (upload: as10.png)

Algo Shadow Matrix delivers alerts through three independent channels.

The simplest channel. When  EnablePopupInput = true , every triggered event produces a MetaTrader popup dialog with the full alert message. Popups are best for active sessions when you are at your computer and want immediate audible/visual notification.

Push Notifications to MetaTrader Mobile App

For traders who want alerts on their phone:

  1. Install the MetaTrader mobile app on your phone (iOS or Android)
  2. Open the app and go to Settings > Chat and Messages
  3. Note your MetaQuotes ID (a number like  12345678 )
  4. In the desktop MetaTrader, go to Tools > Options > Notifications
  5. Tick Enable Push Notifications and paste your MetaQuotes ID
  6. Click Test to verify delivery to your phone
  7. In the indicator inputs, set  EnablePushInput = true

The push channel delivers the same message text as popups, directly to your phone's lock screen.

Email Alerts

  1. In MetaTrader, go to Tools > Options > Email
  2. Tick Enable and configure SMTP server, sender, recipient, and login credentials (your email provider's outgoing-mail settings)
  3. Click Test to confirm delivery
  4. In the indicator inputs, set  EnableEmailInput = true

Email alerts have higher latency than popups and push (typically 5–30 seconds depending on the SMTP provider) but are useful for archival and for integration with downstream automation that parses alert emails.

Event Categories

The five event categories fire automatically when their conditions trigger. Currently the indicator does not expose per-event on/off toggles in the input panel — the global  EnableAlertsInput  is the master switch:

  • BUY signal — fires when a bullish flip is confirmed (band-break or character-flip)
  • SELL signal — fires when a bearish flip is confirmed
  • Bullish trend shift — fires on every regime change to bullish (independent of whether the signal labels were drawn)
  • Bearish trend shift — fires on every regime change to bearish
  • TP/SL hit — fires when an active trade reaches any TP tier or its SL (each tier is a separate event)

Each alert message includes the indicator name, brand, symbol, timeframe, current price, and the relevant level prices. The message body also embeds a JSON payload for webhook bridging by external tools:

{"indicator":"ASM","brand":"Forexobroker","action":"buy","ticker":"EURUSD","tf":"H1","price":1.07420,"sl":1.07100,"tp1":1.07740,"tp2":1.08060,"tp3":1.08380,"score":78,"tqi":0.71}

Alerts are silenced during the initial historical replay when the indicator first attaches. Only fresh signals on bars after attachment will alert.


Preset Strategies

The  PresetInput  selector lets you switch between five tuned configurations without manually editing every input. When set to a non-Custom preset, the indicator overrides the relevant inputs internally with the preset's values; visible inputs in the dialog are ignored.

Auto (default)

The Auto preset selects parameters based on the chart's timeframe at attach:

  • M1 / M5 — Scalping preset
  • M15 / M30 / H1 / H4 — Default preset
  • H4+ / D1 / W1 / MN1 — Swing preset

Auto is the safest starting point because the indicator picks reasonable values without requiring the trader to know the optimal parameters for the current chart. Once the indicator has produced some signals on a chart, the trader can switch to an explicit preset or Custom for fine-tuning.

Scalping (M1 / M5)

Optimized for fast markets and tight risk:

AtrLenInput         = 7
BaseMultInput       = 1.5
ErLengthInput       = 10
QualityStrengthInput= 0.5
SlAtrMultInput      = 1.0
Tp1R / Tp2R / Tp3R  = 0.8 / 1.5 / 2.5
CharFlipMinAgeInput = 3

Tighter ATR, shorter ER, higher QStrength (more responsive TQI), tighter SL, and lower R-multiples to match scalping's faster mean-reversion.

Default (M15–H4)

Balanced configuration — the design target of the indicator:

(All defaults work well — H1 majors are the optimization target.) QualityStrengthInput= 0.4

The default configuration is calibrated for H1 majors. No overrides needed.

Swing (H4 / D1)

Longer periods, wider stops, runner-style TPs:

AtrLenInput         = 21
BaseMultInput       = 2.5
ErLengthInput       = 30
QualityStrengthInput= 0.3
SlAtrMultInput      = 2.0
Tp1R / Tp2R / Tp3R  = 1.0 / 2.5 / 4.5
CharFlipMinAgeInput = 8

Wider stops to absorb H4 / D1 volatility, lower QStrength (less aggressive TQI modulation because higher timeframes are already smoother), longer minimum-age before character-flips can fire.

Crypto 24/7

Tuned for 24-hour markets (BTC, ETH, etc.) where session-break behavior does not apply:

AtrLenInput = 14 BaseMultInput = 2.5 QualityStrengthInput= 0.5 SlAtrMultInput = 2.0 Tp1R / Tp2R / Tp3R = 1.0 / 2.0 / 3.5 UseEffAtrInput = true

Higher QStrength because crypto regime changes are sharp, wider stops because intraday range is larger, and efficiency-weighted ATR enabled to shrink risk on clean trends.


Troubleshooting

Indicator shows in Navigator but does not attach to chart. Check the Journal tab in the Toolbox (Ctrl+T) for error messages. The most common cause is an out-of-range input value — every input has range validation, and the indicator returns  INIT_PARAMETERS_INCORRECT  on the first invalid value. Reset to defaults and re-attach.

Bands or signals do not appear. The indicator needs at least  max(AtrLenInput, ErLengthInput, AtrBaselineLenInput) + 20  bars of history before bands and TQI render. On a fresh chart with limited history, scroll back to load more bars or switch to a higher timeframe.

Dashboard is in the wrong position. Adjust  DashPosInput  to choose a corner, then nudge with  DashOffsetXInput  and  DashOffsetYInput . The default  DashOffsetYInput = 20  pushes the dashboard below the symbol/timeframe toolbar area. If the dashboard runs off-screen, reduce  DashColumnWidthInput  from 130 to a smaller value.

Too many signals on chart. Switch to a higher timeframe, or switch the preset from Scalping to Default/Swing. Setting  UseCharFlipInput = false  disables the early-flip mechanism and reverts to slower band-break flips only.

Too few signals on chart. Switch to a lower timeframe, or enable character-flips ( UseCharFlipInput = true ) for earlier regime detection. Lowering  CharFlipHighInput  from 0.55 to 0.45 makes the engine more willing to trigger character-flips.

Alerts fire during initial attachment. This should never happen on the latest version. If it does, verify the indicator version in the indicator properties dialog (Ctrl+I on the chart). If the version is older than the current Market release, remove and re-add the indicator from the Navigator to pull the latest update.

SL/TP lines disappear unexpectedly. The lines are intentionally removed when the trade closes (SL hit or TP3 hit). The signal arrow stays permanently visible. To verify whether a trade closed, check the dashboard's Active Signal section — if it shows "WAITING FOR SIGNAL", the trade has closed.

Different signals on MT4 versus MT5. The two builds should produce identical signals at identical bar timestamps. If you see a discrepancy, verify both builds are on the same symbol with identical inputs (especially preset selection and all TQI weights). Force a refresh in both terminals (right-click chart > Refresh) so both have synced history.

Dashboard shows "Loading..." for several seconds at attach. This is normal. The Performance section requires the historical replay pass to complete before it can populate. On charts with thousands of bars, the replay can take 1–3 seconds. The dashboard guards against array-out-of-range errors during this window by rendering placeholder values until calculation finishes.

Download the indicator: 

CONTACT & SUPPORT

Risk Disclaimer

Trading foreign exchange and CFDs on margin carries a high level of risk and may not be suitable for all investors. You may sustain a loss exceeding your initial investment. Trend Quorum is a technical analysis tool and does not guarantee profitable trades. Past performance is not indicative of future results. The authors accept no liability for any loss arising from use of the indicator. By using Trend Quorum you acknowledge sole responsibility for your trading decisions.