OPEN-SOURCE SCRIPT
Volume Ratio

🚀 Volume Ratio(VR,量比)
Exact Formula:
Features:
Settings:
Best on 1m / 5m / 15m charts
Works perfectly on daily charts too.
No repaint • Pine Script v6
- 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
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.