OPEN-SOURCE SCRIPT

Bullish Volume Anomaly

170
Anomaly is designed to spot hidden bullish accumulation before price actually breaks out, by blending a trend-aware volume measure with a volatility-adjusted price channel. Here’s how it works:

First, it runs a simple ATR-based zigzag to identify the current swing direction. Volume is then signed (+ for up-trends, – for down-trends) and cumulatively summed. By converting that cumulative signed volume into a z-score over the past 480 bars, we get a sense of when buying or selling pressure is unusually strong relative to its own history.

At the same time, price itself is normalized into a z-score over the same 480-bar window, and its change over that period is also tracked. These two measures—volume z-score (s) and price z-score (p)—are compared, and the indicator looks for moments when s outpaces p by at least two standard deviations (s – p > 2), while price momentum change remains low (c < 1) and the net volume is positive (s > 0). That combination flags instances where heavy buying is taking place but price hasn’t yet reacted.

To define a dynamic trading zone, it plots a 288-bar EMA of price as the middle band (t2), and builds upper and lower bands around it using the average close-to-open range multiplied by a user-set factor. The lower band (t1) sits beneath the EMA by that volatility-based margin. A signal fires only when the bar’s high stays below t1—meaning price is still “sleeping” under the lower volatility boundary even as bullish volume builds up.

Together, these filters home in on anomalies: strong, trend-aligned volume surges that outstrip price movement, occurring while price sits below its lower volatility band. In practice, that often marks early accumulation before a breakout. You can tweak the ATR length and multiplier for the zigzag, as well as the channel period and range factor, to suit different markets or timeframes.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.