OPEN-SOURCE SCRIPT

Extended Hours Volume Flag

Overview: The Extended Hours Volume Flag Indicator is a powerful tool designed for traders who are interested in monitoring and analyzing the volume activity during the extended trading hours—specifically the premarket (4:00 AM to 9:30 AM) and afterhours (4:00 PM to 8:00 PM) sessions. This indicator identifies and flags stocks where the trading volume during these extended hours exceeds 20% of the Average Volume (AVOL) during regular trading hours. Such occurrences often signal unusual activity or potential market-moving events, which can be crucial for informed trading decisions.

Concept: Volume is a critical factor in trading, often providing insights into market sentiment and potential price movements. However, volume during extended hours can be particularly revealing as it may indicate heightened interest or activity outside of the regular trading session. The Extended Hours Volume Flag Indicator is built on the concept that significant volume during premarket or afterhours trading sessions, relative to the average regular session volume, could be an early indicator of upcoming volatility or trends.

How It Works:

Session Segmentation: The indicator distinguishes between regular trading hours (9:30 AM to 4:00 PM) and extended hours (premarket and afterhours). It accumulates the trading volume separately for these sessions.
Volume Comparison: It calculates the Average Volume (AVOL) over a user-defined period (default is 14 days) during regular trading hours. It then compares the extended hours volume to this AVOL.
Flagging Condition: If the volume during the extended hours exceeds 20% of the AVOL, the indicator flags the stock with a warning symbol on the chart. This visual cue helps traders quickly identify stocks with potentially significant afterhours or premarket activity.
Reset Mechanism: The accumulated volumes reset at the start of the new trading day, ensuring accurate calculations for each day.
Usage: This indicator is ideal for traders who are looking for early signals of market activity outside regular hours, which might not be immediately visible when looking solely at price action. It is particularly useful for day traders and swing traders who want to keep an eye on potential premarket or afterhours catalysts.
Volume

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer