OPEN-SOURCE SCRIPT

MOMENTUM MATRIX

148
MOMENTUM MATRIX is a single-pane momentum dashboard that combines a zero-lag oscillator, a volume-weighted money flow histogram, automatic divergence detection, a four-factor confluence strip, and a live table that tracks the historical hit rate of every signal the script prints. The goal is to show momentum, participation, and trend agreement in one place, and to let you measure how the signals have actually performed on the chart you are looking at instead of trusting a marketing claim.

█ WHAT IT SHOWS

1. Wave (upper band, 0 to 100)
A stochastic oscillator applied to a zero-lag EMA of price instead of raw price, smoothed once and paired with a short signal line. The zero-lag input reduces turning-point delay by roughly one bar compared with a standard stochastic or RSI while keeping the familiar 0 to 100 scale. Dotted levels mark overbought (default 80), midpoint (50), and oversold (default 20). The wave colours green when rising above its signal line and red when falling below it.

2. Money Flow (lower band, -100 to 0)
A histogram of net buying or selling pressure. Each bar's volume is signed by where the close sits inside the bar's range, then smoothed with an EMA and normalised by average volume so the reading stays between -100 and +100 across any symbol. Columns are drawn from the band midpoint: above it means net inflow, below it means net outflow. Columns become solid when the reading exceeds the overflow level (default 40), which flags unusually one-sided pressure.

3. Divergences
Regular bullish and bearish divergences between price and the Wave are found from pivot highs and lows (default 3-bar pivots, maximum 40 bars apart) and labelled on the pane.

4. Confluence strip (bottom row)
A thin colour strip scoring -4 to +4 from four independent checks: Wave above or below 50, Wave above or below its signal line, Money Flow positive or negative, and price above or below a 21-period zero-lag EMA. Bright green or red means all four agree; grey means they conflict.

5. Signals
Reversal buy: Wave crosses up through the oversold level while Money Flow is positive and the wave is rising.
Reversal sell: mirror of the above at the overbought level.
Momentum buy: Wave crosses up through 50 while Money Flow is positive and volume is at least 1.2 times its average.
Momentum sell: mirror of the above.
Each signal type has its own alert condition, plus alerts for both divergence types.

6. Accuracy table (top right)
Shows the current state and confluence score, live Wave, Money Flow, and trend readings, and the running hit rate of each of the four signal types on this chart. A hit is counted when price moves at least X percent (default 0.5) in the signal direction within N bars (default 6). Both thresholds are inputs, so you can set them to match your own targets. The counters are computed from the loaded history, so they reflect the symbol and timeframe you are viewing.

█ HOW TO USE IT

Treat the pane as context, not as a stand-alone entry system. The most useful reads are:

- Trend continuation: confluence strip at +3 or +4 (or -3 / -4), Money Flow on the same side, and a Momentum signal in that direction.
- Exhaustion: Wave in the overbought or oversold zone while Money Flow overflow fades, or a divergence label appears.
- Filtering: check the hit-rate table before acting on a signal type. If a signal has printed twenty times on your chart with a 40 percent hit rate, that tells you more than any indicator marketing.

On my own tests across BTC, HYPE, and ZEC on the 4-hour chart, simple oversold and overbought reversal signals from any oscillator, including this one, land close to a coin flip. Confluence-gated momentum signals did better on strongly trending symbols and worse on ranging ones. The table exists so you can see this for yourself on every chart.

█ INPUTS

Wave: zero-lag EMA length, stochastic length, smoothing, signal length, overbought and oversold levels.
Money Flow: length and overflow level.
Confluence: trend ZLEMA length.
Divergence: pivot length, maximum bars between pivots, show or hide.
Signals: volume multiplier for momentum signals, show or hide.
Accuracy: evaluation bars and hit threshold percent.
Display: show or hide the table.

█ NOTES

Works on any symbol and timeframe. Signals and divergence labels are confirmed on bar close and do not repaint. Hit-rate counters use only bars available in the chart history, so they will differ between timeframes and between accounts with different history limits.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.