OPEN-SOURCE SCRIPT

Volume Ratio

878
🚀 Volume Ratio(VR,量比)
  • 100% Match to Tonghuashun (Same as App)
  • Supports A-shares / HK / US Stocks / Futures / Crypto


Exact Formula:
  • Intraday: Today’s cumulative volume ÷ (5-day avg volume per minute × elapsed minutes)
  • Daily+: Today’s volume ÷ 5-day average volume (no lookahead)


Features:
  • Auto detects daily or intraday chart
  • Color bars: Gray (<0.5) → Blue (<1.0) → Green (<1.5) → Orange (<2.5) → Red (>2.5)
  • Reference lines at 0.5 / 1.0 / 2.5
  • Live value label on last bar
  • Optional N-day avg line


Settings:
  • Avg Length (default 5)
  • Total Minutes per Day (240 A-share / 330 HK / 390 US)
  • Show Avg Volume (toggle)


Best on 1m / 5m / 15m charts
Works perfectly on daily charts too.
No repaint • Pine Script v6

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.