bharatTrader

Extended Volume With Historical & Realtime Intrabar Profile

Extended Volume With Historical & Realtime Intrabar Profile
This indicator displays some additional information on the normal volume bars. Apart from the normal co-relation between price action, it is possible to configure an intrabar timeframe.

Intrabar volume analysis
On historical bars, this will calculate the last intrabar timeframe minutes volumes. The intrabar timeframe is user input. On a realtime bar, it will calculate the "rolling/forward" minutes cumulative volume . Which means from the time the script is loaded, it will on subsequent volume ticks, calculate the cumulative volume till then. The realtime cumulative volume will roll-over once the intrabar timeframe minutes is reached. For example, if the script was set to an intrabar timeframe of 30 minutes and loaded on the chart at 2:00 PM, then the realtime bar, will start adding up the volume on each volume tick. At 2:30 PM, this cumulative volume will be reset to zero, again start the same process for 30 minutes till 3:00 PM. It must be noted that fetching lower timeframe data from higher timeframe is not supported/guaranteed in pine script, yet. So the data is approximate and can be erroneous at times. Physical checking maybe required on lower timeframes to confirm the actions.

Price Action and Volume
Each volume bar is coloured on the basis of resulting price action and relative to volume bars prior to this day. This is very helpful in spotting "unusual" volumes.
Color Codes
A normal day volume on an up day, (today close > previous close) is displayed in Blue.
A normal day volume on a down day, is displayed in Fuchsia.
An up day with up volume day with today's volume higher than daily average volume is displayed in Teal.
A down volume day but with high close with lower average volume maybe a sign of weak hands, displayed in Orange.
An up day with volume above the weekly average is displayed in Lime.

Special Info
When enabled, a 52W High volume bar is noted by the sign "1Yr H".
When enabled (for historical bars), if the last intrabar cumulative volume is greater than 1.5 times the 5 day's average intrabar volume , "HD:XX" is displayed on top of the volume bar. The ratio of the day's volume to last 5 day's is displayed. For many markets, a higher value is indicative of delivery based trades near the end of the trading sessions when intraday volumes reside.

Nudge
A modification of the "Volume Buzz", this is a percentage change of the current rolling volume to the daily average of the intrabar volumes for realtime bar. For historical bars, it is the percentage change of the day volume to the daily average volume . The realtime "Nudge" is displayed in the

RT Box
The RT Box, displays the following information:
Elapsed Time - Time elapsed since realtime monitoring, will reset to 0 after intrabar timeframe is elapsed
Vol: Cumulative volume till recent tick since start of monitoring
Chng%: Change in price between the current time and the price at start of the monitoring
Nudge: The volume Nudge value, as explained above

Input controls
Intrabar volumes
Session Closing Volumes, when enabled activates realtime monitoring
Lookback minutes, in steps of 15 minutes, define the intrabar timeframe. Max 210 minutes. Minimum 15 minutes.
Show Only Intrabar Volumes, display on the intrabar timeframe volumes on historical bars, turn off normal day volumes
RT Box, when enabled displays realtime stats about rolling volumes on realtime bar
Volume Averages
Daily Avg Lookback, enable and set the lookback for daily volume average - disabled when "Only Last bars Info" is selected
Weekly Avg Lookback, enable and set the lookback for weekly volume average
Intrabars Avg Lookback, enable and set the lookback for intrabar volume average - enabled only when "Only Last bars Info" is selected
Debug & Info
Display Debug info on each volume bar, set by offset. 0 will show on last bar, 1 on the second last and sop on.
Enhanced Info: When enabled displays "1 Yr H" and "HD" data as explained above

Known Issue
The intrabar volume average does not get displayed on the last historical bar during market-off hours.
Release Notes:
  • Capability to set a global label color for texts
Release Notes:
  • Price% change in last x minutes also added in enhanced info
Some cosmetic changes with color.
Now Enhanced Info is in the following manner:
1 Yr H
HD: N.Nx (Times volume in last minutes)
Chng: X% (Price change in last minutes (Open - High)/Open)
Av: Average % above daily last minutes avg
Release Notes:
  • Pine 5

Protected script
This script is published closed-source and you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
Want to use this script on a chart?