OPEN-SOURCE SCRIPT
Telah dikemas kini ds-Volume with Flags & Alerts v1.2

ds-Volume with Flags & Alerts: User & Training Guide
1. Summary of Features
This indicator is a powerful, all-in-one tool designed to give you a deep and customizable view of market volume. By analyzing volume in multiple ways, it helps you spot unusual activity, confirm trends, and identify potential reversals.
How It Helps a Trader:
Spotting Institutional Activity: The core purpose of the Volume Flags (using either the Multiplier or Standard Deviation method) is to highlight bars with exceptionally high volume. These spikes often signal the entry or exit of large institutional players. A high-volume up-bar can confirm bullish conviction, while a high-volume down-bar can signal significant selling pressure.
Identifying Climactic Events: The HVE (Highest Volume Ever) and HV1 (Highest Volume - 1 Year) labels automatically pinpoint the most significant volume events on the chart. A "blow-off top" at the end of a long uptrend or a "capitulation" event at a market bottom is almost always accompanied by an HVE or HV1 bar. These are critical moments to watch for potential trend reversals.
Gauging Buying vs. Selling Pressure: The Up/Down Volume Ratio gives you a more nuanced view than volume alone. A ratio consistently above 1.2 suggests that buyers are more aggressive, while a ratio below 0.8 suggests sellers are in control. Watching this ratio can help you confirm the strength of a trend or spot divergences where price is rising but the ratio is falling (a potential warning sign).
Visual Confirmation & Customization: With options to color both the volume bars and the main price bars, you can get instant visual confirmation of these events without having to look away from the price action. The ability to toggle features on and off keeps your chart clean and focused on what matters most to you.
Actionable Alerts: The comprehensive alert system ensures you don't miss a key event. You can be notified of everything from a new all-time high volume bar to a subtle shift in the Up/Down Volume Ratio, allowing you to react to market changes in real-time.
2. User-Changeable Options
This indicator is highly customizable. Here is a breakdown of every setting available in the "Inputs" tab.
General Settings
MA Length: The lookback period for the simple moving average (the gray area plot) of the volume.
Volume Flags
Color Price Bars with Flags: If checked, the main price bars on your chart will be colored when a high or low volume flag condition is met.
Color Volume Bars with Flags: If checked, the volume bars in the indicator pane will be colored for flag conditions.
Flag Calculation Method: This is a crucial setting.
Multiplier (Default): Identifies high volume based on a simple multiple of the average volume (e.g., volume is 1.4x its average). It's simple and intuitive.
Standard Deviation: Identifies high volume based on how statistically unusual it is compared to its recent behavior. This method is more adaptive to changing market volatility.
Daily/Weekly Lookback (Multiplier): Sets the lookback period for calculating the average volume when using the "Multiplier" method.
Daily/Weekly High-Vol Multiplier: Sets the multiplier for a high volume event (e.g., 1.4).
STDEV Length (Daily/Weekly): Sets the lookback period for calculating the average and standard deviation when using the "Standard Deviation" method.
STDEV Threshold (Daily/Weekly): Sets the number of standard deviations above the average required to trigger a high volume flag (e.g., 2.0).
Daily/Weekly Low-Vol Multiplier: Sets the threshold for a low volume event (e.g., 0.5 means volume is less than 50% of its average). This is always based on the multiplier method.
Ratios & Stats
Up/Down Ratio Daily/Weekly Lookback: Sets the lookback period for calculating the sum of up volume and down volume for the ratio.
Ratio Calculation Method:
Close vs. Open: Defines an "up volume" bar as one where the close is higher than the open.
Close vs. Previous Close (Default): Defines an "up volume" bar as one where the close is higher than the previous bar's close. This is a common standard.
Up Ratio Arrow Threshold: If the U/D Ratio exceeds this value, a green "up" arrow will appear.
Show Up Ratio Arrow: Toggles the visibility of the green "up" arrow.
Down Ratio Arrow Threshold: If the U/D Ratio falls below this value, a red "down" arrow will appear.
Show Down Ratio Arrow: Toggles the visibility of the red "down" arrow.
1. Summary of Features
This indicator is a powerful, all-in-one tool designed to give you a deep and customizable view of market volume. By analyzing volume in multiple ways, it helps you spot unusual activity, confirm trends, and identify potential reversals.
How It Helps a Trader:
Spotting Institutional Activity: The core purpose of the Volume Flags (using either the Multiplier or Standard Deviation method) is to highlight bars with exceptionally high volume. These spikes often signal the entry or exit of large institutional players. A high-volume up-bar can confirm bullish conviction, while a high-volume down-bar can signal significant selling pressure.
Identifying Climactic Events: The HVE (Highest Volume Ever) and HV1 (Highest Volume - 1 Year) labels automatically pinpoint the most significant volume events on the chart. A "blow-off top" at the end of a long uptrend or a "capitulation" event at a market bottom is almost always accompanied by an HVE or HV1 bar. These are critical moments to watch for potential trend reversals.
Gauging Buying vs. Selling Pressure: The Up/Down Volume Ratio gives you a more nuanced view than volume alone. A ratio consistently above 1.2 suggests that buyers are more aggressive, while a ratio below 0.8 suggests sellers are in control. Watching this ratio can help you confirm the strength of a trend or spot divergences where price is rising but the ratio is falling (a potential warning sign).
Visual Confirmation & Customization: With options to color both the volume bars and the main price bars, you can get instant visual confirmation of these events without having to look away from the price action. The ability to toggle features on and off keeps your chart clean and focused on what matters most to you.
Actionable Alerts: The comprehensive alert system ensures you don't miss a key event. You can be notified of everything from a new all-time high volume bar to a subtle shift in the Up/Down Volume Ratio, allowing you to react to market changes in real-time.
2. User-Changeable Options
This indicator is highly customizable. Here is a breakdown of every setting available in the "Inputs" tab.
General Settings
MA Length: The lookback period for the simple moving average (the gray area plot) of the volume.
Volume Flags
Color Price Bars with Flags: If checked, the main price bars on your chart will be colored when a high or low volume flag condition is met.
Color Volume Bars with Flags: If checked, the volume bars in the indicator pane will be colored for flag conditions.
Flag Calculation Method: This is a crucial setting.
Multiplier (Default): Identifies high volume based on a simple multiple of the average volume (e.g., volume is 1.4x its average). It's simple and intuitive.
Standard Deviation: Identifies high volume based on how statistically unusual it is compared to its recent behavior. This method is more adaptive to changing market volatility.
Daily/Weekly Lookback (Multiplier): Sets the lookback period for calculating the average volume when using the "Multiplier" method.
Daily/Weekly High-Vol Multiplier: Sets the multiplier for a high volume event (e.g., 1.4).
STDEV Length (Daily/Weekly): Sets the lookback period for calculating the average and standard deviation when using the "Standard Deviation" method.
STDEV Threshold (Daily/Weekly): Sets the number of standard deviations above the average required to trigger a high volume flag (e.g., 2.0).
Daily/Weekly Low-Vol Multiplier: Sets the threshold for a low volume event (e.g., 0.5 means volume is less than 50% of its average). This is always based on the multiplier method.
Ratios & Stats
Up/Down Ratio Daily/Weekly Lookback: Sets the lookback period for calculating the sum of up volume and down volume for the ratio.
Ratio Calculation Method:
Close vs. Open: Defines an "up volume" bar as one where the close is higher than the open.
Close vs. Previous Close (Default): Defines an "up volume" bar as one where the close is higher than the previous bar's close. This is a common standard.
Up Ratio Arrow Threshold: If the U/D Ratio exceeds this value, a green "up" arrow will appear.
Show Up Ratio Arrow: Toggles the visibility of the green "up" arrow.
Down Ratio Arrow Threshold: If the U/D Ratio falls below this value, a red "down" arrow will appear.
Show Down Ratio Arrow: Toggles the visibility of the red "down" arrow.
Nota Keluaran
ds-Volume with Flags & Alerts: User & Training Guide1. Summary of Features
This indicator is a powerful, all-in-one tool designed to give you a deep and customizable view of market volume. By analyzing volume in multiple ways, it helps you spot unusual activity, confirm trends, and identify potential reversals.
How It Helps a Trader:
Spotting Institutional Activity: The core purpose of the Volume Flags (using either the Multiplier or Standard Deviation method) is to highlight bars with exceptionally high volume. These spikes often signal the entry or exit of large institutional players. A high-volume up-bar can confirm bullish conviction, while a high-volume down-bar can signal significant selling pressure.
Identifying Climactic Events: The HVE (Highest Volume Ever) and HV1 (Highest Volume - 1 Year) labels automatically pinpoint the most significant volume events on the chart. A "blow-off top" at the end of a long uptrend or a "capitulation" event at a market bottom is almost always accompanied by an HVE or HV1 bar. These are critical moments to watch for potential trend reversals.
Gauging Buying vs. Selling Pressure: The Up/Down Volume Ratio gives you a more nuanced view than volume alone. A ratio consistently above 1.2 suggests that buyers are more aggressive, while a ratio below 0.8 suggests sellers are in control. Watching this ratio can help you confirm the strength of a trend or spot divergences where price is rising but the ratio is falling (a potential warning sign).
Visual Confirmation & Customization: With options to color both the volume bars and the main price bars, you can get instant visual confirmation of these events without having to look away from the price action. The ability to toggle features on and off keeps your chart clean and focused on what matters most to you.
Actionable Alerts: The comprehensive alert system ensures you don't miss a key event. You can be notified of everything from a new all-time high volume bar to a subtle shift in the Up/Down Volume Ratio, allowing you to react to market changes in real-time.
2. User-Changeable Options
This indicator is highly customizable. Here is a breakdown of every setting available in the "Inputs" tab.
General Settings
MA Length: The lookback period for the simple moving average (the gray area plot) of the volume.
Volume Flags
Color Price Bars with Flags: If checked, the main price bars on your chart will be colored when a high or low volume flag condition is met.
Color Volume Bars with Flags: If checked, the volume bars in the indicator pane will be colored for flag conditions.
Flag Calculation Method: This is a crucial setting.
Multiplier (Default): Identifies high volume based on a simple multiple of the average volume (e.g., volume is 1.4x its average). It's simple and intuitive.
Standard Deviation: Identifies high volume based on how statistically unusual it is compared to its recent behavior. This method is more adaptive to changing market volatility.
Daily/Weekly Lookback (Multiplier): Sets the lookback period for calculating the average volume when using the "Multiplier" method.
Daily/Weekly High-Vol Multiplier: Sets the multiplier for a high volume event (e.g., 1.4).
STDEV Length (Daily/Weekly): Sets the lookback period for calculating the average and standard deviation when using the "Standard Deviation" method.
STDEV Threshold (Daily/Weekly): Sets the number of standard deviations above the average required to trigger a high volume flag (e.g., 2.0).
Daily/Weekly Low-Vol Multiplier: Sets the threshold for a low volume event (e.g., 0.5 means volume is less than 50% of its average). This is always based on the multiplier method.
Ratios & Stats
Up/Down Ratio Daily/Weekly Lookback: Sets the lookback period for calculating the sum of up volume and down volume for the ratio.
Ratio Calculation Method:
Close vs. Open: Defines an "up volume" bar as one where the close is higher than the open.
Close vs. Previous Close (Default): Defines an "up volume" bar as one where the close is higher than the previous bar's close. This is a common standard.
Up Ratio Arrow Threshold: If the U/D Ratio exceeds this value, a green "up" arrow will appear.
Show Up Ratio Arrow: Toggles the visibility of the green "up" arrow.
Down Ratio Arrow Threshold: If the U/D Ratio falls below this value, a red "down" arrow will appear.
Show Down Ratio Arrow: Toggles the visibility of the red "down" arrow.
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.