OPEN-SOURCE SCRIPT

Volume Profile Plus

Updated
This 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: snapshot

🔵 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.

snapshot

🔵 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.
Release Notes
Add a toggle for turning on/off second-based timeframes and set it to false by default. Note that second-based timeframes are only supported if the user is subscribed to the TradingView Premium Plan and above.
Release Notes
Added support for showing Volume Delta (the difference between buying and selling volume).
Release Notes
Fixed the "memory limit exceeded" error by limiting the maximum lower timeframe multiplier to 16x instead of 32x.
Release Notes
Added support for Market Profile (a.k.a. Time Price Opportunity).
Default to Market Profile mode if the current ticker does not have any volume data.
marketprofilePOCpointofcontrolprofileTPOvalueareaVolume IndicatorvolumeanalysisVolume ProfilevolumesVolumevpvr

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?


专业缠论指标: alphaviz.pro/chanlun
Email: contact@alphaviz.pro
Discord: discord.gg/w2fFtNega4
Also on:

Disclaimer