OPEN-SOURCE SCRIPT
Volume essential parameters overlay

Volume EPO – Essential Volume Parameters Overlay
1. Motivation and design philosophy
Volume EPO is designed as a conceptual overlay rather than a self contained trading system. The main idea behind this script is to take complex, foundational market concepts out of heavy, menu driven strategies and express them as lightweight, independent layers that sit on top of any chart or indicator.
In many TradingView scripts, a single strategy tries to handle everything at once: signal logic, risk settings, visual cues, multi timeframe controls, and conceptual explanations. This usually leads to long input menus, performance issues, and difficult maintenance. The architectural approach behind Volume EPO is the opposite: keep the core strategy lean, and move the explanation and measurement of key concepts into dedicated overlays.
In this framework, Volume EPO is the base layer for the concept of volume. It does not decide anything about entries or exits. Instead, it exposes and clarifies how different definitions of volume behave candle by candle. Other layers or strategies can then build on top of this understanding.
2. What Volume EPO does
Volume EPO focuses on four essential volume parameters for each bar:
- Buy volume - Sell volume - Total volume - Delta volume (the difference between buy and sell volume)
The script presents these parameters in a compact heads up display (HUD) table that can be positioned anywhere on the chart. It is designed to be visually minimal, language aware, and usable on top of any other indicator or price action without cluttering the view.
The indicator does not output signals, alerts, arrows, or strategy entries. It is a descriptive and educational tool that shows how volume is distributed, not a prescriptive tool that tells the trader what to do.
3. Two definitions of volume
A central theme of this script is that there is more than one way to define and interpret “volume” inside a single candle. Volume EPO implements and clearly separates two different approaches:
- A geometric, candle based approximation that uses only OHLC and volume of the current bar. - An intrabar, data driven definition that uses lower timeframe up and down volume when it is available.
The user can switch between these modes via the calculation method input. The mode is prominently shown inside the on chart table so that the context is always explicit.
3.1 Geometry mode (Source File, approximate)
In Geometry mode, Volume EPO works only with the current bar’s OHLC values and total volume. No lower timeframe data is required.
The candle’s range is defined as high minus low. If the range is positive, the position of the close inside that range is used as a simple model for how volume might have been distributed between buyers and sellers:
- The closer the close is to the high, the more of the total volume is attributed to the buying side. - The closer the close is to the low, the more of the total volume is attributed to the selling side. - In a rare case where the bar has no price range (for example a flat or doji bar), total volume is split evenly between buy and sell volume.
From this model, the script derives:
- Buy volume (approximated) - Sell volume (approximated) - Total volume (as reported by the bar) - Delta volume as the difference between buy and sell volume
This approach is intentionally labeled as “Geometry (Approx)” in the HUD. It is a theoretical reconstruction based solely on the candle’s geometry and total volume, and it is always available on any market or timeframe that provides OHLCV data.
3.2 Intrabar mode (Precise)
In Intrabar mode, Volume EPO uses the TradingView built in library for up and down volume on a user selected lower timeframe. Instead of inferring volume from the shape of the candle, it reads the underlying lower timeframe data when that data is accessible.
The script requests up and down volume from a lower timeframe such as 15 seconds, using the official TA library functions. The results are then interpreted as follows:
- Buy volume is taken as the absolute value of the up volume. - Sell volume is taken as the absolute value of the down volume. - Total volume is the sum of buy and sell volume. - Delta volume is provided directly by the library as the difference between up and down volume.
If valid lower timeframe data exists for a bar, the bar is counted as covered by Intrabar data. If not, that bar is marked as invalid for this precise calculation and is excluded from the covered count.
This mode is labeled “Precise” in the HUD, together with the selected lower timeframe, because it is anchored in actual intrabar data rather than in a geometric model. It provides a closer view of how buying and selling pressure unfolded inside the bar, at the cost of requiring more data and being dependent on the availability of that data.
4. Coverage, lookback, and what the numbers mean
The top part of the HUD reports not only which volume definition is active, but also an additional line that describes the effective coverage of the data.
In Intrabar (Precise) mode, the script displays:
- “Scanned: N Bars”
Here, N counts how many bars since the indicator was loaded have successfully received valid lower timeframe delta data. It is a measure of how much of the visible history has been truly covered by intrabar information, not a lookback window in the sense of a rolling calculation.
In Geometry mode, the script displays:
- “Lookback: L Bars”
In this extracted layer, the lookback value L is purely descriptive. It does not change how the current bar’s volume is computed, and it is not used in any iterative or statistical calculation inside this script. It is meant as a conceptual label, for example to keep the volume layer consistent with a broader framework where lookback length is a structural parameter.
Summarizing these two fields:
- Scanned tells you how many bars have been processed using real intrabar data. - Lookback is a descriptive parameter in Geometry mode in this specific overlay, not a direct driver of the computations.
5. The HUD layout on the chart
The on chart table is intentionally compact and structured to be read quickly:
- Header: a title identifying the overlay as Volume EPO. - Mode line: explicitly states whether the script is in Precise or Geometry mode, and for Precise mode also shows the lower timeframe used. - Coverage line: - In Precise mode, it shows “Scanned: N Bars”. - In Geometry mode, it shows “Lookback: L Bars”. - Volume block: - A line for buy and sell volume, marked with clear directional symbols. - A line for total volume and the absolute delta, accompanied by the sign of the delta. - Numeric formatting uses human friendly suffixes (for example K, M, B) to keep the display readable. - Footer: the current symbol and a time stamp, adjusted by a user selectable timezone offset so that the HUD can be aligned with the trader’s local time reference.
The table can be positioned anywhere on the chart and resized via inputs, and it supports multiple color themes and languages in order to integrate cleanly into different chart layouts.
6. How to use Volume EPO in practice
Volume EPO is meant to be read together with price action and other tools, not in isolation. Typical uses include:
- Studying how often a strong directional candle is actually supported by dominant buy or sell volume. - Comparing the behavior of delta volume between Geometry and Intrabar definitions. - Building a personal intuition for how intrabar data refines or contradicts the simple candle based approximation. - Feeding these insights into separate, lean strategy scripts that do not need to carry the full explanatory logic of volume inside them.
Because it is an overlay layer, Volume EPO can be stacked with other custom indicators without adding new signals or complexity to their logic. It simply adds a clear and consistent view of volume behavior on top of whatever the trader is already watching.
7. Educational and non signalling nature
Finally, it is important to stress that Volume EPO is not a trading system, not a signal generator, and not financial advice. The script does not tell the user when to enter or exit. It only reports how different definitions of volume describe the current bar.
Deciding whether to trade, how to trade, and which risk parameters to use remains entirely with the user and with their own strategy. Volume EPO provides context and clarity around the concept of volume so that those decisions can be informed by a better understanding of how buying and selling pressure is structured inside each candle.
Note: Even on lower timeframes, every reconstruction of volume remains an approximation, except at the true single tick level. However, the closer the chosen lower timeframe is to a one tick stream, the more accurately it can reflect the underlying order flow and balance between buying and selling pressure.
1. Motivation and design philosophy
Volume EPO is designed as a conceptual overlay rather than a self contained trading system. The main idea behind this script is to take complex, foundational market concepts out of heavy, menu driven strategies and express them as lightweight, independent layers that sit on top of any chart or indicator.
In many TradingView scripts, a single strategy tries to handle everything at once: signal logic, risk settings, visual cues, multi timeframe controls, and conceptual explanations. This usually leads to long input menus, performance issues, and difficult maintenance. The architectural approach behind Volume EPO is the opposite: keep the core strategy lean, and move the explanation and measurement of key concepts into dedicated overlays.
In this framework, Volume EPO is the base layer for the concept of volume. It does not decide anything about entries or exits. Instead, it exposes and clarifies how different definitions of volume behave candle by candle. Other layers or strategies can then build on top of this understanding.
2. What Volume EPO does
Volume EPO focuses on four essential volume parameters for each bar:
- Buy volume - Sell volume - Total volume - Delta volume (the difference between buy and sell volume)
The script presents these parameters in a compact heads up display (HUD) table that can be positioned anywhere on the chart. It is designed to be visually minimal, language aware, and usable on top of any other indicator or price action without cluttering the view.
The indicator does not output signals, alerts, arrows, or strategy entries. It is a descriptive and educational tool that shows how volume is distributed, not a prescriptive tool that tells the trader what to do.
3. Two definitions of volume
A central theme of this script is that there is more than one way to define and interpret “volume” inside a single candle. Volume EPO implements and clearly separates two different approaches:
- A geometric, candle based approximation that uses only OHLC and volume of the current bar. - An intrabar, data driven definition that uses lower timeframe up and down volume when it is available.
The user can switch between these modes via the calculation method input. The mode is prominently shown inside the on chart table so that the context is always explicit.
3.1 Geometry mode (Source File, approximate)
In Geometry mode, Volume EPO works only with the current bar’s OHLC values and total volume. No lower timeframe data is required.
The candle’s range is defined as high minus low. If the range is positive, the position of the close inside that range is used as a simple model for how volume might have been distributed between buyers and sellers:
- The closer the close is to the high, the more of the total volume is attributed to the buying side. - The closer the close is to the low, the more of the total volume is attributed to the selling side. - In a rare case where the bar has no price range (for example a flat or doji bar), total volume is split evenly between buy and sell volume.
From this model, the script derives:
- Buy volume (approximated) - Sell volume (approximated) - Total volume (as reported by the bar) - Delta volume as the difference between buy and sell volume
This approach is intentionally labeled as “Geometry (Approx)” in the HUD. It is a theoretical reconstruction based solely on the candle’s geometry and total volume, and it is always available on any market or timeframe that provides OHLCV data.
3.2 Intrabar mode (Precise)
In Intrabar mode, Volume EPO uses the TradingView built in library for up and down volume on a user selected lower timeframe. Instead of inferring volume from the shape of the candle, it reads the underlying lower timeframe data when that data is accessible.
The script requests up and down volume from a lower timeframe such as 15 seconds, using the official TA library functions. The results are then interpreted as follows:
- Buy volume is taken as the absolute value of the up volume. - Sell volume is taken as the absolute value of the down volume. - Total volume is the sum of buy and sell volume. - Delta volume is provided directly by the library as the difference between up and down volume.
If valid lower timeframe data exists for a bar, the bar is counted as covered by Intrabar data. If not, that bar is marked as invalid for this precise calculation and is excluded from the covered count.
This mode is labeled “Precise” in the HUD, together with the selected lower timeframe, because it is anchored in actual intrabar data rather than in a geometric model. It provides a closer view of how buying and selling pressure unfolded inside the bar, at the cost of requiring more data and being dependent on the availability of that data.
4. Coverage, lookback, and what the numbers mean
The top part of the HUD reports not only which volume definition is active, but also an additional line that describes the effective coverage of the data.
In Intrabar (Precise) mode, the script displays:
- “Scanned: N Bars”
Here, N counts how many bars since the indicator was loaded have successfully received valid lower timeframe delta data. It is a measure of how much of the visible history has been truly covered by intrabar information, not a lookback window in the sense of a rolling calculation.
In Geometry mode, the script displays:
- “Lookback: L Bars”
In this extracted layer, the lookback value L is purely descriptive. It does not change how the current bar’s volume is computed, and it is not used in any iterative or statistical calculation inside this script. It is meant as a conceptual label, for example to keep the volume layer consistent with a broader framework where lookback length is a structural parameter.
Summarizing these two fields:
- Scanned tells you how many bars have been processed using real intrabar data. - Lookback is a descriptive parameter in Geometry mode in this specific overlay, not a direct driver of the computations.
5. The HUD layout on the chart
The on chart table is intentionally compact and structured to be read quickly:
- Header: a title identifying the overlay as Volume EPO. - Mode line: explicitly states whether the script is in Precise or Geometry mode, and for Precise mode also shows the lower timeframe used. - Coverage line: - In Precise mode, it shows “Scanned: N Bars”. - In Geometry mode, it shows “Lookback: L Bars”. - Volume block: - A line for buy and sell volume, marked with clear directional symbols. - A line for total volume and the absolute delta, accompanied by the sign of the delta. - Numeric formatting uses human friendly suffixes (for example K, M, B) to keep the display readable. - Footer: the current symbol and a time stamp, adjusted by a user selectable timezone offset so that the HUD can be aligned with the trader’s local time reference.
The table can be positioned anywhere on the chart and resized via inputs, and it supports multiple color themes and languages in order to integrate cleanly into different chart layouts.
6. How to use Volume EPO in practice
Volume EPO is meant to be read together with price action and other tools, not in isolation. Typical uses include:
- Studying how often a strong directional candle is actually supported by dominant buy or sell volume. - Comparing the behavior of delta volume between Geometry and Intrabar definitions. - Building a personal intuition for how intrabar data refines or contradicts the simple candle based approximation. - Feeding these insights into separate, lean strategy scripts that do not need to carry the full explanatory logic of volume inside them.
Because it is an overlay layer, Volume EPO can be stacked with other custom indicators without adding new signals or complexity to their logic. It simply adds a clear and consistent view of volume behavior on top of whatever the trader is already watching.
7. Educational and non signalling nature
Finally, it is important to stress that Volume EPO is not a trading system, not a signal generator, and not financial advice. The script does not tell the user when to enter or exit. It only reports how different definitions of volume describe the current bar.
Deciding whether to trade, how to trade, and which risk parameters to use remains entirely with the user and with their own strategy. Volume EPO provides context and clarity around the concept of volume so that those decisions can be informed by a better understanding of how buying and selling pressure is structured inside each candle.
Note: Even on lower timeframes, every reconstruction of volume remains an approximation, except at the true single tick level. However, the closer the chosen lower timeframe is to a one tick stream, the more accurately it can reflect the underlying order flow and balance between buying and selling pressure.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。