MACD Matrix [Quantum Algo]
The MACD read as a system: four momentum quadrants instead of one sign, four timeframes scored into a matrix with a gold beacon on full alignment, divergence drawn on the candles as well as in the pane, a histogram squeeze with release signals, and a momentum river through price — every signal family scored on your own symbol.

The short answer
MACD Matrix is a free, open-source TradingView indicator that reads the Moving Average Convergence Divergence as a complete momentum system rather than a line and a histogram. It classifies momentum into four quadrants instead of one sign — Expanding ▲, Fading ▲, Expanding ▼, Fading ▼ — aligns four timeframes into a live matrix with a scored consensus and a gold beacon on full alignment, detects histogram divergence and draws it on both the oscillator and the price candles, tracks histogram compression before expansion, and paints a momentum river through price so the entire reading lives on the chart. Every signal family carries its own historical record on the exact symbol you are trading.
A quadrant-coloured momentum river through price, gold beacons on 4/4 alignment, dual-canvas divergence, squeeze coils and releases, and the matrix dashboard.
The quadrant engine and the timeframe matrix — fading momentum caught before the sign flips, alignment as a threshold event.
No — signals on confirmed bars; higher-timeframe rows finalise at their own close.
What MACD is
The MACD, created by Gerald Appel, measures momentum as the distance between a fast and a slow exponential moving average; a signal line smooths that distance, and the histogram — introduced by Thomas Aspray — shows the gap between the two. MACD above zero means the fast average leads the slow one; the histogram rising means momentum is accelerating. Our MACD guide covers the classic reading; this page is the matrix.
The four MACD quadrants
Expanding ▲
Above zero and the histogram rising: momentum accelerating in an uptrend.
Fading ▲
Above zero and the histogram falling: the uptrend losing thrust, the earliest warning.
Expanding ▼
Below zero and the histogram falling: momentum accelerating in a downtrend.
Fading ▼
Below zero and the histogram rising: the downtrend losing thrust, the earliest turn.
Most traders read MACD as bullish or bearish; the difference between the four states is where the money is. The matrix names the quadrant on every bar, colours the river and the aura by it, and stamps it into every signal's tooltip.
What it draws
The momentum river
A short EMA of price coloured by the current quadrant, bright when expanding, dimmed when fading — and the aura around it.
Gold beacons
On price when all four matrix timeframes align with expanding momentum.
Dual-canvas divergence
Connectors in the pane and dashed twins across the corresponding price pivots.
Gold coil dots
During a histogram squeeze and a directional release signal on expansion.
The dashboard
The quadrant, the four-timeframe matrix with its consensus score, and the family records.
The Bitcoin 15-minute screenshot on this page shows the river through price, the pane below and the matrix dashboard; the settings screenshot shows the Inputs tab.
Why it is different
The quadrant engine.
Four momentum phases, made visible on the price chart, so fading momentum is caught before the sign flips.
The timeframe matrix.
Four configurable timeframes, each read as side-of-zero × expanding-or-fading, with a consensus score and a beacon at 4/4 — a threshold event, not a vague trend agreement.
Dual-canvas divergence.
Drawn where you trade it — on the candles — as well as in the pane.
The histogram squeeze.
Histogram amplitude ranked in its own history; a coil below a low percentile, and a release signal on expansion — a compression concept almost never applied to MACD.
Signal families with per-symbol records.
Zero-line crosses, early signal crosses on the correct side of zero, divergences and squeeze releases, each with ten-bar outcome statistics shrunk toward neutral and a Wilson bound.
How it works
MACD, signal and histogram from configurable lengths; the quadrant from the sign of MACD and the direction of the histogram.
Four higher-timeframe MACD states requested without lookahead and scored into the matrix.
Histogram pivots compared against price pivots for regular divergences, drawn on both canvases.
Histogram amplitude ranked against its own history for the squeeze; a mature coil that expands fires a release.
Every family feeds its own first-in-first-out outcome samples; statistics reported with sample counts.
Signals on confirmed bars; higher-timeframe rows finalise when their own bar closes; drawings capped.
Settings
| Group | Input | What it does | Where to start |
|---|---|---|---|
| MACD | Fast, slow, signal lengths | The classic trio | 12 / 26 / 9 |
| Timeframe Matrix | Four timeframes | The consensus rows | 15m / 1H / 4H / D for intraday; 1H / 4H / D / W for swing |
| Signals & Squeeze | Divergence pivot length | Swing size for divergence | 5 |
| Squeeze window and percentile | The coil definition | 100; 15th | |
| Cooldown, signal visibility | Spacing; which families print | 6 bars; all | |
| Statistics | Sample cap, minimum samples, shrinkage strength, Wilson z | The family records | 60 / 10 / default / 1.28 |
| Visuals & dashboard | River and aura toggles, river length, colours, position | Appearance | on / on / 8 |

Alerts
Five named conditions: Matrix Aligned Bullish, Matrix Aligned Bearish (all four timeframes with expanding momentum), Zero-Line Cross, Histogram Divergence, and Squeeze Release.
How to use it
Trade the quadrant, not the sign. Expanding phases favour continuation entries; Fading phases favour taking profit or tightening risk, and they precede most zero-line crosses.
Use the matrix as a filter. A 4/4 beacon is the highest-conviction environment; a divided matrix warns that timeframes disagree.
Divergence on the candles. When the dashed price line and the pane connector appear together, you have a momentum-versus-price disagreement located precisely on structure.
Watch the coil. A long squeeze then a release is the expansion setup; the family record says how reliably releases have followed through here.
Set the four timeframes to your horizon before anything else.
Three ways to trade it
The beacon continuation.
A gold beacon at a pullback into an order block from Order Blocks with Volume — four timeframes expanding in the same direction at a structure level; stop beyond the block.
The fade-quadrant exit.
In a Zeno trade, the quadrant flipping to Fading ▲ is the cue to take TP1 or trail the stop — it usually prints bars before the zero-line cross.
The divergence at the sweep.
A bearish histogram divergence drawn across a swept high from Liquidity Sweeps is the exhaustion signature; short the change of character, stop above the sweep.
Recommended settings by market
Crypto, 15m–1H:
Matrix 15m/1H/4H/D; pivot 5; squeeze percentile 15.
Forex and gold, 15m–4H:
Matrix 1H/4H/D/W for the swing read; pivot 7.
Indices, 5m–15m:
Matrix 5m/15m/1H/4H; cooldown 8 to tame the open.
How it compares
Against the standard MACD: one line, one signal, one histogram in a pane — versus four quadrants, a four-timeframe matrix with beacons, divergence on price, the squeeze, the river and per-family statistics. Against the TDI: the TDI reads RSI momentum with bands; the matrix reads MACD momentum across timeframes — different engines, same role. Against the Institutional Pressure Oscillator: that reads volume pressure; this reads price momentum — run both for agreement. Against Zeno: Zeno prints the entry; the matrix says whether momentum is expanding into it.
Limitations
MACD is a lagging momentum measure; the quadrant engine reduces but cannot eliminate lag. Divergences can extend before resolving. Statistics describe the current chart's history only.
Credits
The MACD is by Gerald Appel; the MACD histogram by Thomas Aspray (1986); the Wilson score interval by Edwin B. Wilson (1927). The quadrant engine, timeframe matrix and beacon logic, dual-canvas divergence rendering, histogram squeeze, per-symbol statistics and all code are original work by Quantum Algo, published open source.
Step-by-step: adding it to your TradingView chart
Open the script page on TradingView (link above) and click Add to favorites, then Use on chart — or on any chart open Indicators, search "MACD Matrix Quantum Algo" and add it. Free on every TradingView plan.
Open the indicator's settings and set the inputs for your market and timeframe from the table above; the defaults are tuned for crypto on intraday and 4-hour charts.
In the Style tab, match the colours to your chart theme; the dashboard position and text size are in Inputs.
To set alerts, right-click the chart → Add alert, choose the indicator as the condition and pick the event; set "Once per bar close" so alerts match the closed-bar logic.
Save the layout, and add the other free Quantum Algo tools to it — they are designed to sit together.
To read or reuse the code, click Source code on the script page; republishing is subject to TradingView's house rules.
Inside the code, for developers
Pine Script, open source. Worth reading if you want to modify it: every detection and signal gated on barstate.isconfirmed; state held in capped arrays of drawing objects with explicit create, update and retire functions; where statistics are kept, first-in-first-out arrays with shrinkage and a Wilson bound computed inline; named alertcondition calls so webhooks receive a consistent payload. The Academy's Pine Script tutorials and the TradingView backtesting guide cover strategy conversion.
Using it with the other free indicators
The free tools layer on one chart: the Smart Money Concepts Engine for bias and the Confluence Score; Order Blocks with Volume, Fair Value Gaps + Inversion and Institutional Key Levels for the zone; Liquidity Sweeps, Sessionscope and Liquidation Magnet for the liquidity and the trigger; OTE + Silver Bullet for the time-qualified entry; the Institutional Volume Profile and Pressure Oscillator for whether volume agrees; the trend and volatility family — the Adaptive Trend Sentinel, SuperTrend Engine, Golden Cross Engine, Anchored VWAP Engine, Trendline Architect, Keltner Rings and Volatility Storm Tracker — for regime, direction and room; and the momentum and statistics family — MACD Matrix, the Multi-Oscillator Divergence Scanner, the Event Probability Engine, the Market Bottom Finder, the Neural Confluence Engine, the Adaptive Lorentzian Classification and the Directional Strength Index — for momentum, probability and strength. The free-indicators hub lists every tool; the SMC guide is the method behind the layering.
Common mistakes with this indicator
- Trusting the developing bar — every event waits for the close.
- Trading every marker — the tool gives momentum and context; the entry needs a structure level and a stop beyond it.
- Default lengths on the wrong timeframe — adjust the inputs, as the settings table shows.
- Reading the statistics as promises — they describe this chart's history, shrunk toward neutral on purpose.
- Stacking ten random scripts — the free tools layer because they were built to.
Want the signal, not just the structure?
Zeno reads Smart Money structure across timeframes and prints the entry, stop, TP1 and TP2 on your chart — with a public record of 160 posted trades, 120 wins and 40 losses at the stated levels. QuantumBot executes it on Bybit, Binance, OKX, Bitget and Kraken.

Glossary for this indicator
Frequently asked questions
Does MACD Matrix repaint?
Signals are evaluated on confirmed bars and never change once printed. The higher-timeframe rows of the matrix update while their own bar is open and finalise at its close — inherent to any multi-timeframe reading, with no lookahead.
What does the momentum river represent?
A short exponential average of price coloured by the current MACD quadrant — bright when momentum expands, dimmed when it fades — so you can read momentum without looking away from price.
What do the family percentages mean?
The share of past signals in that family after which price moved favourably ten bars later, on this symbol and timeframe, shrunk toward 50% at small samples. History, not prediction.
Which settings should I change first?
The four matrix timeframes, so the matrix reflects your own horizons. The MACD lengths follow the classic 12, 26, 9.
What is a MACD squeeze?
Histogram amplitude compressed below a low percentile of its own recent history — momentum coiled — marked with gold dots; the expansion out of the coil fires the release.
How does it relate to Zeno?
Zeno prints structure signals with stop and targets; the matrix is the free momentum layer that says whether the move into them is expanding or fading.
What are the best MACD settings?
12, 26, 9 remain the defaults; the setting that changes behaviour most is the four matrix timeframes — set them to your own horizons before touching the lengths.
Is multi-timeframe MACD reliable?
A single-timeframe MACD is noisy; four timeframes scored together turn agreement into a threshold event, and the family records report how the 4/4 beacons have behaved on your symbol.
What is a MACD histogram divergence?
Price making a new extreme while histogram peaks shrink — drawn here on both the pane and the candles so you see it at the level you would trade.
Can I get a MACD alert?
Yes — Matrix Aligned Bullish and Bearish, Zero-Line Cross, Histogram Divergence and Squeeze Release are named alert conditions.
Does it work on stocks and forex?
Yes on any symbol; the squeeze percentile and the family statistics are relative to the chart's own history, so nothing needs retuning per market.
Should I read the river or the pane?
The river for the state at a glance, the pane for the divergence geometry and the squeeze — they show the same engine on two canvases.
The momentum and statistics family
Momentum, probability and strength — the reads that sit under the Smart Money layer and beside the trend tools.
Add MACD Matrix to your chart
One click on TradingView, free on every plan, code you can read. Nothing repaints.