Indicator · Pine Script v5 · On the chart

News Dash

by SarpSoysal

News Dash is an overlay indicator that flags bars where both volume and bar range are unusually large.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code42
Settings5inputs
LicenceMIT
Last update6 months ago29 Apr 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

42 lines of Pine Script v5 from newsdash.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

newsdash.pine
//@version=5
indicator("News Dash", overlay=true, max_labels_count=100, max_lines_count=100)

volMultiplier   = input.float(3.0, "Volume Spike Threshold", minval=1.5, step=0.1, tooltip="How many times above average volume to flag as unusual")
rangeMultiplier = input.float(2.5, "Range Spike Threshold", minval=1.5, step=0.1, tooltip="How many times above average range to flag as unusual")
lookback        = input.int(20, "Lookback Period", minval=5, maxval=100, tooltip="Number of bars to calculate average from")
showLabels      = input.bool(true, "Show News Event Labels")
enableAlerts    = input.bool(true, "Enable Alerts")

avgVolume = ta.sma(volume, lookback)
avgRange  = ta.atr(lookback)

volumeSpike = volume > avgVolume * volMultiplier
rangeSpike  = (high - low) > avgRange * rangeMultiplier

newsEvent = volumeSpike and rangeSpike

if newsEvent and showLabels
    label.new(bar_index, high, "News", color=color.new(#ffd54f, 0), textcolor=#000000, style=label.style_label_down, size=size.small)

bgcolor(newsEvent ? color.new(#ffd54f, 85) : na)

var int lastNewsBar = na
if newsEvent
    lastNewsBar := bar_index

barsSinceNews = not na(lastNewsBar) ? bar_index - lastNewsBar : 999

riskLevel = barsSinceNews <= 3 ? "HIGH" : barsSinceNews <= 10 ? "MEDIUM" : "LOW"
riskColor = barsSinceNews <= 3 ? #ef5350 : barsSinceNews <= 10 ? #ffd54f : #4caf50

var table infoTable = table.new(position.top_right, 2, 3, bgcolor=color.new(#1a1a2e, 10), border_width=1, border_color=color.new(#333333, 0))

if barstate.islast
    table.cell(infoTable, 0, 0, "News Risk", text_color=#e0e0e0, text_size=size.small)
    table.cell(infoTable, 1, 0, riskLevel, text_color=riskColor, text_size=size.small)
    table.cell(infoTable, 0, 1, "Bars Since", text_color=#e0e0e0, text_size=size.small)
    table.cell(infoTable, 1, 1, not na(lastNewsBar) ? str.tostring(barsSinceNews) : "None", text_color=#e0e0e0, text_size=size.small)
    table.cell(infoTable, 0, 2, "Vol vs Avg", text_color=#e0e0e0, text_size=size.small)
    table.cell(infoTable, 1, 2, str.tostring(volume / avgVolume, "#.#") + "x", text_color=#e0e0e0, text_size=size.small)

alertcondition(newsEvent and enableAlerts, "News Event Detected", "NEWS DASH: Unusual volume and range spike detected. Possible news event.")

Overview

A bar is marked when its volume exceeds the recent average by one multiplier and its high-low range exceeds the ATR by another, with a lookback period setting the baseline. Flagged bars get a News label and a shaded background. A table shows a news risk state based on bars since the last event, plus the volume ratio, and an alert is available. It detects volatility spikes, not actual news.

Details

Published by

SarpSoysal on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Volatility & bands, Volume

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Volume Spike Thresholdfloat3.0volMultiplier
Range Spike Thresholdfloat2.5rangeMultiplier
Lookback Periodint20lookback
Show News Event LabelsbooltrueshowLabels
Enable AlertsbooltrueenableAlerts
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.

Similar Pine Scripts

The Momentum Setup is a multi-indicator visual tool designed for trend and momentum analysis directly on the price chart. It combines Relative Strength Index (RSI), Money Flow Index (MFI), Commodity Channel Index (CCI), Supertrend, and a 250-bar percentage cha

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - Ankush Bajaj Momentum Investing Setup

Snag - VWAP

by dearvn
257 stars

This indicator plots a custom Anchored Volume-Weighted Average Price (VWAP) directly on the price chart along with optional standard deviation bands. Users can anchor the VWAP to standard time periods like sessions, weeks, or months, or to corporate events suc

Indicator v5 Moving averagesVolatility & bands Repaints
Updated 6 weeks ago · None stated GitHub repository of Snag - VWAP

VWAP Bands Template

by TradersPost
218 stars

This indicator plots a volume-weighted average price and three standard-deviation bands on the price chart. It resets the running volume-weighted totals at the selected anchor, which can be the session, week, month, quarter, or year. The source price, band mul

Indicator v6 VolumeVolatility & bands
Updated 3 months ago · None stated GitHub repository of VWAP Bands Template

LiqSpikeBounceLong Feb2026

by agutinbaigo28
147 stars

LiqSpikeBounceLong Feb2026 is an indicator designed to identify long bounce entries following high-volume liquidation cascades in bearish market contexts. It checks if price is below an exponential moving average, then detects large single-bar drops exceeding

Indicator v5 Volatility & bandsVolume
Updated 6 weeks ago · MIT GitHub repository of LiqSpikeBounceLong Feb2026

Adaptive MA Slope

by capissimo
114 stars

This indicator calculates Kaufman's Adaptive Moving Average (KAMA) on a chosen price source and determines trend direction based on the slope across a configurable lookback window. Signals can be filtered by short-term volatility expansion using ATR comparison

Indicator v4 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Adaptive MA Slope

VWAP Bands

by mihakralj
99 stars

This indicator plots a volume-weighted average price on the price chart and resets the calculation when the selected session changes. It builds first and second standard-deviation bands from a volume-weighted variance of the chosen source, which defaults to th

Indicator v6 VolumeVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of VWAP Bands

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers