1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
182 lines of Pine Script v5 from examples/202405/volume_spike_dmi.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
A spike is flagged when volume reaches a chosen multiple of the median over a selected lookback. Growing volume is flagged when a short recent median exceeds a longer median by another multiple, or when the volume moving average rises for three consecutive bars. DMI length and smoothing settings relate to buy and sell pressure. The title includes alerts and a scanner, and a code note says it loads data from eight other tickers.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Volume Spike Amount
int
3
spikeMultiple
How Many Bars Back To Calculate The Median From
int
1000
barsBack
Number Of Bars To Caluclate Current Volume Median
int
5
medianLengthCurrent
Volume Spike Amount For Current Median
int
3
spikeMultipleCurrent
Number Of Bars Back To Calculate Overall Median
int
1000
barsBackCurrent
Volume Moving Average Length
int
20
maLength
DMI Length
int
1
dilength
DMI Smoothing
int
1
smoothing
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This overlay indicator screens a pasted list of up to forty symbols and draws a table on the price chart. It classifies bullish or bearish setups from the percent change between the current candle and the candle 250 bars back, then shows RSI with a simple movi
This overlay indicator builds a horizontal momentum profile over a chosen lookback. It splits price into rows and plots the average WaveTrend of each zone as a bar colored by direction, plus an optional MFI reference band that stays gray when real trade volume
The 7M Multi-Factor Momentum Scoreboard evaluates real-time market momentum across multiple criteria and displays the results in an overlay dashboard panel on the price chart. It tracks anchored percentage price moves based on pre-market, regular open, or post
This indicator overlays an order flow intelligence suite directly on the price chart. It renders a liquidity heatmap across configured price zones, alongside an on-chart information panel displaying volume delta, cumulative volume delta, a momentum compass bas
An overlay indicator that calculates multi-timeframe market conditions and displays them in an information panel on the price chart. It evaluates timeframe metrics such as 15-minute and 1-hour periods to monitor RSI values, support and resistance levels, and r
CSW MTF Sentiment Line evaluates market sentiment across five customizable timeframes on the price chart. Traded assets can be measured using RSI, volatility (RSI of price standard deviation), or volume (RSI of volume moving average), with values normalized on