High Volume Alert

The High Volume Alert Script is developed for all traders focusing on volume analysis in their trading strategies, providing alerts for unusually high trading volumes during specified trading sessions.


Volume Moving Average Calculation:
Average Volume = Moving Average(Volume) = Sum of last the x last candles Volume
Where n is the user-defined period for the moving average calculation (denoted as movingaverageinput in the script. This moving average serves as the baseline to compare current volume levels against historical averages.

High Volume Detection:
HighVolume = CurrentVolume >= (MA(Volume) x HighVolumeRatio)
Here, HighVolumeRatio is a user-defined multiplier that sets the threshold for what is considered high volume. If the current volume exceeds this threshold (the product of the moving average of volume and the HighVolumeRatio), the script identifies this as a high-volume event.

Session Filtering:
The script further refines these alerts by ensuring they only trigger during the specified trading session, enhancing relevance for traders interested in specific market hours. This session is defined by the sess and timezone parameters.

Visualisation and Alerts:
If high volume is detected (HighVolume = True), the script colors the volume bar with the highVolumeColor. If the option is selected, it also changes the color of the candlestick to either highVolumeCandleColorUp (for bullish candles) or highVolumeCandleColorDown (for bearish candles), depending on the price movement within the high-volume period. An alert is generated through the alertcondition function when high volume is detected during the specified session, notifying the trader of potentially significant market activity.

Application in Trading:

This indicator serves traders who prioritize volume as a leading indicator of potential price movement. High trading volumes may indicate the presence of significant market activity, often associated with events like news releases, market openings, or large trades, which can precede price movements.

Originality and Practicality:

This script is self-developed, aiming to fill the gap in automatic ratio adjusted volume alerts within the TradingView environment.


The High Volume Alert Script is an essential tool for traders who integrate volume analysis into their strategy, offering tailored alerts and visual cues for high volume periods.

Compliance and Limitations:

The script complies with TradingView scripting standards, ensuring no lookahead bias and maintaining real-time data integrity. However, its utility depends on the availability on volume data, and please be aware that forex pairs never offer real volume data, this tool is best used with a exchange traded symbol.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


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.

Want to use this script on a chart?