OPEN-SOURCE SCRIPT
Telah dikemas kini VSA - The Volume HUD

VSA Volume HUD: Your At-a-Glance Volume Dashboard
Tired of cluttered charts with multiple indicators taking up screen space?
The VSA Volume HUD is a clean, powerful, and fully customisable Heads-Up Display that puts all the critical volume and price action data you need into one compact box, right on your chart.
Designed for traders who rely on Volume Spread Analysis (VSA), this tool helps you instantly gauge the strength, conviction, and context behind every price move as it happens.
Key Features
This indicator isn't just about showing the current volume; it provides a comprehensive, real-time analysis of the market's activity.
Real-time VSA Dashboard: A persistent on-screen table that updates with every tick, giving you instant feedback without needing to look away from the price. The HUD is fully draggable (hold Ctrl/Cmd + click and drag) to place it anywhere you like.
Essential Volume Metrics:
Current Volume: Displayed in a clean, abbreviated format (e.g., 1.25M for millions, 54.3K for thousands).
% Change (vs. Previous Bar): Instantly see if volume is expanding or contracting.
Vs Short-Term Average: Compare the current bar's volume to a moving average to spot unusual spikes.
Volume Velocity: Measures the rate of change in volume over a short period, helping you spot acceleration or deceleration in market interest.
Relative Volume (RVOL): See how the current volume compares to the average for that specific time of day, perfect for identifying abnormally high or low activity.
Price Action & Volatility Context:
Range vs. ATR: Quickly determine if the current bar's volatility is expanding or contracting compared to the recent average.
Price vs. VWAP: See how far the current price has deviated from the session's Volume-Weighted Average Price, a key level for institutional traders.
Deep Customization is Key
Tailor the HUD to perfectly match your trading style and chart aesthetic.
Display & Layout:
Compact Mode: Remove the metric labels for a sleek, minimalist view that saves screen space.
Bar Meters: Enable optional visual bars next to key metrics for a quick, graphical representation of strength.
Total Control: Toggle every single metric on or off to build the exact dashboard you need. Adjust text size, position, and background opacity with ease.
Smart Coloring & Visual Alerts:
Advanced VSA Coloring: This isn't just about up/down candles. The script intelligently colors volume based on confluence. It highlights increasing volume on a strong up-bar (bullish confirmation) or increasing volume on a down-bar (potential climax or distribution), giving you a deeper VSA context.
High Volume Highlight: Make standout bars impossible to miss! The entire HUD background can change color automatically when volume surges past a custom threshold (e.g., over 150% of the average), instantly drawing your attention to critical moments.
Full Color Customization: Change every color to match your chart's theme, including separate colors for bullish/bearish moves, the background, and the border.
How to Use It
The VSA Volume HUD is a powerful confirmation tool. Use it to:
Confirm Breakouts: Look for a spike in Volume vs. Average and RVOL as price breaks a key level.
Spot Exhaustion: Notice high volume on a narrow-range candle after a long trend, visible through the Range/ATR metric.
Gauge Conviction: Use the Advanced Coloring to see if volume is supporting the price move (e.g., green volume on a green candle) or diverging from it.
Tired of cluttered charts with multiple indicators taking up screen space?
The VSA Volume HUD is a clean, powerful, and fully customisable Heads-Up Display that puts all the critical volume and price action data you need into one compact box, right on your chart.
Designed for traders who rely on Volume Spread Analysis (VSA), this tool helps you instantly gauge the strength, conviction, and context behind every price move as it happens.
Key Features
This indicator isn't just about showing the current volume; it provides a comprehensive, real-time analysis of the market's activity.
Real-time VSA Dashboard: A persistent on-screen table that updates with every tick, giving you instant feedback without needing to look away from the price. The HUD is fully draggable (hold Ctrl/Cmd + click and drag) to place it anywhere you like.
Essential Volume Metrics:
Current Volume: Displayed in a clean, abbreviated format (e.g., 1.25M for millions, 54.3K for thousands).
% Change (vs. Previous Bar): Instantly see if volume is expanding or contracting.
Vs Short-Term Average: Compare the current bar's volume to a moving average to spot unusual spikes.
Volume Velocity: Measures the rate of change in volume over a short period, helping you spot acceleration or deceleration in market interest.
Relative Volume (RVOL): See how the current volume compares to the average for that specific time of day, perfect for identifying abnormally high or low activity.
Price Action & Volatility Context:
Range vs. ATR: Quickly determine if the current bar's volatility is expanding or contracting compared to the recent average.
Price vs. VWAP: See how far the current price has deviated from the session's Volume-Weighted Average Price, a key level for institutional traders.
Deep Customization is Key
Tailor the HUD to perfectly match your trading style and chart aesthetic.
Display & Layout:
Compact Mode: Remove the metric labels for a sleek, minimalist view that saves screen space.
Bar Meters: Enable optional visual bars next to key metrics for a quick, graphical representation of strength.
Total Control: Toggle every single metric on or off to build the exact dashboard you need. Adjust text size, position, and background opacity with ease.
Smart Coloring & Visual Alerts:
Advanced VSA Coloring: This isn't just about up/down candles. The script intelligently colors volume based on confluence. It highlights increasing volume on a strong up-bar (bullish confirmation) or increasing volume on a down-bar (potential climax or distribution), giving you a deeper VSA context.
High Volume Highlight: Make standout bars impossible to miss! The entire HUD background can change color automatically when volume surges past a custom threshold (e.g., over 150% of the average), instantly drawing your attention to critical moments.
Full Color Customization: Change every color to match your chart's theme, including separate colors for bullish/bearish moves, the background, and the border.
How to Use It
The VSA Volume HUD is a powerful confirmation tool. Use it to:
Confirm Breakouts: Look for a spike in Volume vs. Average and RVOL as price breaks a key level.
Spot Exhaustion: Notice high volume on a narrow-range candle after a long trend, visible through the Range/ATR metric.
Gauge Conviction: Use the Advanced Coloring to see if volume is supporting the price move (e.g., green volume on a green candle) or diverging from it.
Nota Keluaran
VSA Volume HUD: Your Custom VSA DashboardThis indicator gives you a powerful and flexible Heads-Up Display (HUD) for Volume Spread Analysis (VSA). The core idea of VSA is to understand the story behind the price by comparing the volume (effort) with the price movement (result). This HUD brings all the essential data into one clean box on your chart, which you can tailor to your exact needs.
Three Strategies, One Tool
As shown in the main chart image, the HUD isn't a one-size-fits-all tool. You can fully customize it to match your trading style. Here are a few examples:
The Full Analyst View: This setup shows every available metric. It gives a complete, detailed picture of the market's health, perfect for in-depth analysis of a single stock.
The Breakout Trader's View: This minimalist setup focuses only on the essentials for confirming breakouts: Volume vs. Average and RVOL. The highlight feature is set to be very sensitive to immediately flag any surge in volume.
The Minimalist View: Using Compact Mode, this setup removes all labels to save screen space. It might show only Close Position and Effort/Result to focus on the quality of the price action itself.
Detailed Breakdown of All Metrics
You have full control to toggle any of these metrics on or off.
Core Volume & Price Metrics
Volume: The total volume for the current bar.
% Chg (Prev): Percentage change in volume compared to the previous bar.
vs ST Avg: How the current volume compares (as a %) to its recent average (e.g., last 20 bars). This is key for spotting unusual activity.
Vol Velo: Measures if volume is accelerating or decelerating, showing if market interest is picking up or fading.
RVOL (Relative Volume): Compares current volume to the average for that specific time of day. An RVOL of 3.0x means volume is 300% of normal.
Range/ATR: The size of the current bar as a percentage of the Average True Range. It tells you if volatility is expanding or contracting.
vs VWAP: The current price’s distance from the Volume-Weighted Average Price, a key institutional level.
Advanced VSA Metrics
Close Pos (Close Position): Shows where the bar closed within its own range (0-100%). A close above 80% shows strong buying commitment; a close below 20% shows weakness.
Effort/Result: Directly measures the VSA principle. It calculates the amount of volume it took to produce the price move. A high reading means a lot of effort produced little result, a classic warning sign.
Wicks: Shows the size of the top and bottom wicks. Large wicks can reveal a battle between buyers and sellers, signaling rejection at certain price levels.
Instant Visual Feedback
The HUD uses two systems to draw your attention to what matters:
High-Volume Highlight: The entire HUD background can change color when volume surges past a threshold you define (e.g., 150% of the average). It’s a simple "pay attention now" signal.
Smart Color Coding: The text for each metric changes color to give you at-a-glance context. Green text shows signs of strength (e.g., rising volume on an up-bar), while Red text shows signs of weakness (e.g., rising volume on a down-bar).
Total Customization for Your Strategy
You can adjust every aspect of the HUD to build your perfect tool:
Display Settings: Toggle Compact Mode or Bar Meters, adjust text size, change all colors, and add bottom padding to position the HUD perfectly.
Calculation Settings: Fine-tune the logic by changing the lookback periods for the Short-Term Average, Volume Velocity, RVOL, and ATR. For example, a scalper might use a shorter average length than a swing trader to get faster signals.
Alert Settings: You have full control over the visual alerts. You can enable or disable the High-Volume Highlight and set the exact percentage that triggers it, filtering out market noise and focusing only on the volume levels that matter to your strategy.
What's New in This Version? (Update Notes) 📝
This update adds few new VSA metrics and a few quality-of-life improvements. All new features are enabled by default but can be toggled off instantly in the settings.
New 'Close Pos' Metric: See exactly where the price closed within the bar's range (0-100%).
New 'Effort/Result' Metric: A direct measure of the classic VSA principle, showing how much volume was behind a price move compared to the average.
New 'Wicks' Metric: Analyze the size of the top and bottom wicks to spot buying or selling pressure.
New 'Bottom Padding' Option: You can now add some space below the HUD to keep it from overlapping your chart's price scale.
Nota Keluaran
VSAHUD: Welcome to the VSAHUD, your compact, real-time dashboard for Volume Spread Analysis. This guide explains every feature of the indicator, starting with the latest updates and then covering how to use it in full.
What's New in This Version?
This update introduces a powerful alert system and a complete user interface (UI) overhaul based on user feedback.
1. A Smarter, Cleaner Interface
Your previous feedback on the HUD's design and position has been directly implemented:
Price Scale Overlap FIXED: The HUD now includes an invisible "spacer" column. When you align the HUD to the right (the new default), this spacer sits against the chart's price scale, automatically "pushing" all your data to the left so it remains fully visible.
Clean Frame Design: The messy internal grid lines have been removed. The HUD now features a single, clean external frame for a more professional and unified look.
New Default Position: The HUD now defaults to the Bottom Right of your chart, keeping it clear of the default indicator space in the top-left.
Light/Dark Mode Ready: The default text color is now a neutral gray, ensuring perfect legibility on both light and dark chart themes.
2. Powerful, Configurable Alert System
You can now create alerts that trigger based on the HUD's data. You can set custom thresholds and logic for four different metrics, all within the indicator's settings.
How to Use the HUD
Placing and Moving the HUD
Default Position: The HUD appears in the Bottom Right by default.
Move It Anywhere: To move the HUD, hold Ctrl (or Cmd on Mac), then click and drag the HUD to any location on your chart. TradingView will remember this new position.
Change Default Corner: You can change the corner it docks to in the indicator's Settings > Display & Toggles > HUD Position.
Reading the Metrics
Here is a breakdown of every line item on the HUD:
Top Row (TICKER | ▲) Ticker:
The current asset.
Candle Direction: Shows the direction of the current, live candle. ▲ for an up candle (close > open), ▼ for a down candle (close < open), or ─ for a neutral candle.
Volume:
The total volume for the current bar, abbreviated for clarity (e.g., 1.01K for 1,010, 2.5M for 2,500,000).
% Chg (Prev):
Shows the percentage change in volume compared to the single previous bar. This helps you spot immediate volume expansion or contraction.
Vs 20 Avg:
Shows how the current bar's volume compares (as a percentage) to the recent average. By default, it uses a 20-bar Simple Moving Average (SMA). A reading of +50.0% means the current volume is 50% above the 20-bar average.
Vol Velocity:
A volume "momentum" metric. It compares the average volume of the last 5 bars to the average of the 5 bars before that. A positive value shows volume is accelerating, while a negative value shows it's decelerating.
RVOL (Relative Volume):
Compares the current bar's volume to the average volume for that specific time of day (based on a 10-day lookback). An RVOL of 2.5x means the volume is 250% of (or 2.5 times) its normal level for that time.
Understanding the Visuals
The HUD uses two types of "smart" coloring to give you instant context.
1. Smart VSA Coloring
When "Enable Advanced VSA Coloring" is checked, the text values (like +55.0% or 0.03x) will change color based on classic VSA logic:
Green Text (Bullish):
Confirmation: Increasing volume on an up-bar.
Effortless Move: Decreasing volume on a down-bar (signals a lack of selling pressure).
Red Text (Bearish):
Confirmation: Increasing volume on a down-bar.
Struggling Move: Decreasing volume on an up-bar (signals a lack of buying pressure).
Gray Text (Neutral):
If "Advanced VSA Coloring" is disabled, all text will use the default color.
2. High Volume Highlight
When "Enable High Volume Highlight" is checked, the entire background of the HUD will change color (default: orange) whenever the "Vs Avg" metric crosses your chosen threshold. This is a powerful, simple "pay attention now" signal.
How to Set Up Alerts (2-Step Guide)
This is the most important new feature. You must follow both steps for alerts to work.
Step 1: Configure the Alert in the Indicator Settings
- Click the Gear icon on the VSAHUD indicator on your chart to open its settings.
- Go to the "Alerts & Highlights" tab.
- Check the master toggle: "Enable Alerts".
- Choose your "Alert Logic":
- Any (OR): Fires an alert if at least one of your checked conditions is met.
- All (AND): Fires an alert only if all of your checked conditions are met.
- Finally, toggle on and set the thresholds for the metrics you want to watch. For example:
- Check "Alert on Vs Avg?" and set the value to 150 (for +150%).
- Check "Alert on RVOL?" and set the value to 2.0.
Step 2: Create the Alert in TradingView
- Click the Clock icon on the main TradingView toolbar (or press Alt + A).
- In the "Condition" dropdown, select "VSAHUD".
- In the second dropdown that appears, select "VSAHUD Alert".
- Under "Options," select "Once Per Bar". This is essential to prevent multiple alerts for the same event.
- Choose your "Notification actions" (e.g., "Show popup," "Send email," "Play sound").
- Click "Create".
Your alert is now active. When the conditions you set in Step 1 are met, the script will tell TradingView to fire the alert you created in Step 2.
Customizing Your Settings
You have full control over the HUD in the settings panel.
Display & Toggles:
- Toggle any of the 5 metric rows on or off.
- Change the "HUD Position" default corner.
- Change the "Text Size".
Calculation Settings:
- Fine-tune the lookback periods for all calculations:
- Short-Term Avg Length: (Default 20)
- Volume Velocity Length: (Default 5)
- RVOL Lookback (Days): (Default 10)
Alerts & Highlights:
This is where you control the High Volume Highlight (toggle, threshold, color) and set up the Alert logic and thresholds as described above.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
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.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
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.