Volume Profile PlusThis indicator provides a high-resolution and high-precision implementation of Volume Profile with flexible range settings. Its key features include:
1. Support for a high resolution of up to 2,500 rows.
2. Capability to examine lower timeframe bars (default 5,000 intra-bars) for enhanced precision.
3. Three range modes — "Visible Range", "Anchored Range", and "All Range".
4. Highlighting of Point of Control and Value Area.
5. Extensive customization options allowing users to configure dimensions, on-chart placements, and color schemes.
🔵 Settings
The settings screen, along with the explanations for each setting, is provided below:
🔵 High Resolution using Polyline
Inspired by @fikira, this indicator utilizes the newly introduced `polyline` type in PineScript to plot the volume profile. It employs a single polyline instance to represent the entire histogram. With each polyline instance supporting up to 10,000 points and each histogram row requiring 4 points, this indicator can accommodate 2500 rows, resulting in a significantly higher resolution compared to conventional volume profile indicators that use `line`s or `box`es to draw the histogram.
🔵 High Precision Data-binning using Lower Timeframe Data
Conventional volume profile indicators often face one or both of the following limitations:
1. They only consider volume within the chart's current timeframe.
2. They assign each bar's total volume to a single price bucket based on the bar's average price, rather than distributing volume across multiple price buckets.
As a result, when the number of bars in the chart is low, those indicators may provide imprecise results, making it difficult to accurately identify significant volume nodes and the point of control.
To address these limitations and enhance accuracy, this indicator examines data from lower timeframes and distributes the volume to fine-grained price buckets. It intelligently selects an appropriate lower timeframe to ensure precise output while complying with a maximum specified number of bars to maintain good performance.
🔵 Three Range Modes
This indicator offers users the flexibility to choose from three range modes:
1. Visible Range (Default Mode): In this mode, the volume profile calculation begins at the time of the left-most bar displayed in the current viewport. As the user scrolls through the viewport, the volume profile updates automatically.
2. Anchored Range: This mode allows the user to set the start time either by using the datetime input boxes or by dragging the anchor line on the chart.
3. All Range: In this mode, the volume profile calculation is based on all the historical bars available in the chart.
Vpvr
Fr3d0's Volume Profile Visible RangeLow level implementation
At the core of VPVR there’s a concept called “bucketization”.
Question : what is bucketization?
Answer : bucketization consists of identifying metrics with high predictive power and combine them appropriately.
I think this is a problem of bucketization because what the VPVR does is to take a price range, divide it into buckets and fill them up with the volume that was produced in each bucket’s range over the given period.
The more we divide our price range the finer the resolution, but also the less significant each bucket will become.
The steps are :
1. Get the price range with min and max over the give period;
2. Divide the range into buckets;
3. Loop over each candle of the given period and proportionally assign volume to one or more bucket.
Question : how to assign volume to buckets?
Answer : we need to calculate the right amount to add to each bucket for each candle. If 20% of a candle lies on a bucket then that bucket needs to have 20% of the volume of that candle, the rest 80% belongs to other buckets.
To get the percentage of a candle on a given bucket we have to find the price range of the candle contained within the bucket, then divide that amount by the entire length of the candle.
How to bucketize
Question : what are the formulas of A, B, C and Target respectively?
Answer :
- A = Max(candle_high, bucket_top) - Min(candle_low, bucket_bottom);
- B = Max(candle_high, bucket_top) - Min(candle_high, bucket_top);
- C = Max(candle_low, bucket_bottom) - Min(candle_low, bucket_bottom);
- Target = A - B - C.
Now that we now how to calculate the price range belonging to each bucket we need to calculate a percentage of volume to fill the bucket with.
The formula is trivially simple :
Volume * Target / (candle_high - candle_low).
Question : can we distinguish between buy volume and sell volume? If so, how?
Answer : yes we can and the following paragraph will teach you how.
Put it simply we can use the difference between the extremes of a candle (low and high) and its close price to get the buy and sell volumes.
The formulas for that are :
- Buy volume = Volume * (close - low) / (high - low);
- Sell volume = Volume * (high - close) / (high - low).
I know this is rather simplicistic but it makes sense.
Closing thoughts
This script is a working progress and I’m going to give more details if necessary, just let me know in the comments down below.
Silen's Pseudo VPVR / Pseudo Volume Profile Custom RangeDisclamer: This indicator does not use actual Volume data and doesn't display any Volume data. It creates a pseudo Volume Profile by counting the high-low-2 values of candles and simulates something that is similar to a Volume Profile without using any Volume data.
Core facts:
Creates a pseudo Volume Profile by counting values of candles and sorting them into a Profile.
Works for charts that don't provide any Volume Information.
Can display up to 5 different Value Levels.
Value level colors are (from largest to smallest level): Red, Orange, Yellow, Green, Blue.
The Value levels can be used as Support and Resistance indicators.
The Custom Range of the Volume Profile can be adjusted from 10 to 1500 bars.
Much faster than the other custom pseudo VPVRs out there.
Shortcomings:
As the chart progresses with bars the line positions will distort to the left side. Refreshing the tradingview page or switching to another time interval fixes this. I might fix this issue in the future.
Does not use actual Volume nor display actual Volume.
Note: For those who wondered what happened to my first version of this indicator: It got taken down by Tradingview because it was misleading as to using the words "Volume Profile" and "Visible Range". I fully support their decision and I hope I could clear any misunderstandings! Give their team a heads up for the hard work they're doing in keeping this place clean and well organized!
Enjoy! :)
Historic VPoCs and pseudo VPVRThis study tries to recreate session based historic VPoCs
and VPVR Volume Profile
as they are used by
TradingLatino TradingView user.
It's aimed at BTCUSDT pair and 4h timeframe.
HOW IT WORKS
HOW IT WORKS - VPVR Profile Block
It gathers volume from the last chosen Bars
in order to draw the vpvr profile block
Volume that intersects with current level range
being studied is added to its value.
Additionally the current level price is modified
so that it matches the level price where most
of the volume has concentrated
So you get a pretty accurate price for drawn volume
while at the same time the levels are not stuck
to arbitrary level prices.
HOW IT WORKS - VPoC
It calculates a Volume Profile for the
given historic session but then
it only outputs that Volume Profile VPoC.
SETTINGS
Show VPVR Volume Profile {True}.
Show Historic VPoC lines {True}.
Show Historic VPoC labels {True}.
Extend Historic VPoC lines {True}: If this option is turned off the VPoC lines are only shown during the session duration.
Show tick difference from current price {False}: BETA. Feedback is needed because I'm not sure how it should work this setting.
VPVR Number of bars {100}: Define the Visible Range in number of bars so that its Volume Profile can be shown.
VPVR Profile width (in bars) {15}: VPVR Profile can be make larger or smaller in width thanks to this option.
VPVR Profile offset (in bars) {15}: VPVR Profile can be shown more to the left or to the right if the defaults do not suit you.
Historic Session Volume Profile timeframe {1D}: Historic VPoC use 1 day as their timeframe reference by default.
Number of decimal digits {2}: How many decimal digits are shown in label prices.
Number of previous sessions to print VPoC {5}: How many previous sessions VPoCs are to be printed. The maximum for this setting is 20.
Historic VPoC lines width (in pixels) {2}.
Historic VPoC labels size {small}.
History VPoC line offset (in bars) {5}: How far to the right VPoCs lines are to be extended. Note: This setting does not apply when 'Extend Historic VPoC lines' is set to 'False'.
WARNING
Please be aware that VPoC from the first previous session might not be accurate due to Pine Script limitations.
VPVR USAGE
This is not a VPVR like the official TradingView indicator.
This is a pseudo VPVR and that means it needs some manual input from you.
But, don't worry it's quite easy to do and if you always use the same number
of bars to calculate your VPVR then you might even just set it up once.
In order to show the VPVR (or Volume Profile on the Visible Range):
Rescale your chart so that you see all the bars for your Visible Range.
Click on the ruler tool.
Click on the last bar (far to the right) shown on the screen
Drag the ruler to first bar (far to the left) shown on the screen
Check what the ruler says
E.g. it says: 101 bars
Open this study settings
Modify: 'VPVR Number of bars ' setting
So that its value matches your measured number of bars (101)
Press OK to confirm and wait for the indicator to refresh.
STRATEGY USAGE
If your strategy uses VPoC
to define your resistances
or supports
you can check the VPoCs shown here.
FEEDBACK
I have only used this identifier in BTCUSDT 4h timeframe.
I'm interested to know what needs to be tweaked
in other securities and timeframes.
PINE STUDY TRICK
This study let's you choose the number of decimals the label will use.
CREDITS
I have reused and adapted some code from
'Poor man's volume profile' study
which it's from TradingView IldarAkhmetgaleev user.
I also wanted to thank him for helping me understanding his study.
I have reused some code from
'MTF Selection Framework - PineCoders FAQ' study
which it's from TradingView PineCoders user.