HomeFeaturesAcademyLive SignalsCompareTrack RecordPricingToolsBlog
🌐 ES FR DE ZH AR
Log In Sign Up
✓Free indicator · open source · Pine Script

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.

75Likes on TradingView
1,338Traders using it
4Timeframes in the matrix
5 namedAlerts
Open sourceLicence
MACD Matrix by Quantum Algo on BTCUSDT perpetual 15-minute chart: the quadrant-coloured momentum river through price, the MACD pane with histogram divergence and squeeze dots, and the four-timeframe matrix dashboard
The momentum river through Bitcoin 15m, the pane with divergence and the squeeze, and the four-timeframe matrix in the dashboard.
◆ What it is

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.

WHAT IT DRAWS?

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 ORIGINAL PART?

The quadrant engine and the timeframe matrix — fading momentum caught before the sign flips, alignment as a threshold event.

REPAINT?

No — signals on confirmed bars; higher-timeframe rows finalise at their own close.

◆ Section

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.

◆ Section

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.

◆ On the chart

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.

QUADRANT READERMACD side, histogram direction and the matrix → the quadrant and what it means for your position
Quadrant——
◆ Section

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.

◆ Under the hood

How it works

1

MACD, signal and histogram from configurable lengths; the quadrant from the sign of MACD and the direction of the histogram.

2

Four higher-timeframe MACD states requested without lookahead and scored into the matrix.

3

Histogram pivots compared against price pivots for regular divergences, drawn on both canvases.

4

Histogram amplitude ranked against its own history for the squeeze; a mature coil that expands fires a release.

5

Every family feeds its own first-in-first-out outcome samples; statistics reported with sample counts.

6

Signals on confirmed bars; higher-timeframe rows finalise when their own bar closes; drawings capped.

◆ Inputs

Settings

GroupInputWhat it doesWhere to start
MACDFast, slow, signal lengthsThe classic trio12 / 26 / 9
Timeframe MatrixFour timeframesThe consensus rows15m / 1H / 4H / D for intraday; 1H / 4H / D / W for swing
Signals & SqueezeDivergence pivot lengthSwing size for divergence5
Squeeze window and percentileThe coil definition100; 15th
Cooldown, signal visibilitySpacing; which families print6 bars; all
StatisticsSample cap, minimum samples, shrinkage strength, Wilson zThe family records60 / 10 / default / 1.28
Visuals & dashboardRiver and aura toggles, river length, colours, positionAppearanceon / on / 8
MACD Matrix settings panel: fast, slow and signal lengths, four matrix timeframes, divergence pivot length, squeeze window and percentile, cooldown, statistics, river and dashboard
MACD lengths, the four matrix timeframes, divergence and squeeze inputs and the statistics controls.
◆ Alerts

Alerts

Matrix Aligned BullishMatrix Aligned Bearish (all four timeframes with expanding momentum)Zero-Line CrossHistogram DivergenceSqueeze Release

Five named conditions: Matrix Aligned Bullish, Matrix Aligned Bearish (all four timeframes with expanding momentum), Zero-Line Cross, Histogram Divergence, and Squeeze Release.

◆ Workflow

How to use it

1

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.

2

Use the matrix as a filter. A 4/4 beacon is the highest-conviction environment; a divided matrix warns that timeframes disagree.

3

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.

4

Watch the coil. A long squeeze then a release is the expansion setup; the family record says how reliably releases have followed through here.

5

Set the four timeframes to your horizon before anything else.

◆ Setups

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.

◆ Comparison

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.

◆ Honest limits

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

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.

◆ Setup

Step-by-step: adding it to your TradingView chart

1

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.

2

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.

3

In the Style tab, match the colours to your chart theme; the dashboard position and text size are in Inputs.

4

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.

5

Save the layout, and add the other free Quantum Algo tools to it — they are designed to sit together.

6

To read or reuse the code, click Source code on the script page; republishing is subject to TradingView's house rules.

◆ Open source

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.

◆ Layering

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.

◆ Avoid these

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.
◆ The premium layer

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.

Quantum Algo Zeno Gold on XAUUSD 15-minute chart with long and short signals, stop-loss zone, TP1, TP2 and dashboard
◆ Zeno Gold · XAUUSD 15M · the premium engine
◆ Vocabulary

Glossary for this indicator

MACDMoving Average Convergence Divergence — the distance between a fast and a slow exponential moving average.
Signal lineAn EMA of the MACD line; crosses between the two are the classic trigger.
HistogramMACD minus signal — the visual measure of momentum acceleration.
QuadrantOne of four momentum states from side-of-zero × histogram direction: Expanding ▲, Fading ▲, Expanding ▼, Fading ▼.
Momentum riverA short EMA of price coloured by the current quadrant.
MatrixFour timeframes read as quadrants and scored into a consensus.
BeaconA gold marker on price when all four timeframes expand in the same direction.
SqueezeHistogram amplitude compressed below a low percentile of its own history.
ReleaseThe expansion out of a mature squeeze, printed as a directional signal.
Family recordPer-signal-type outcome statistics on the current symbol, shrunk toward neutral with a Wilson bound.
◆ Questions

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.

◆ Free · open source

Add MACD Matrix to your chart

One click on TradingView, free on every plan, code you can read. Nothing repaints.