Volume Profile [Makit0]VOLUME PROFILE INDICATOR v0.5 beta
Volume Profile is suitable for day and swing trading on stock and futures markets, is a volume based indicator that gives you 6 key values for each session: POC, VAH, VAL, profile HIGH, LOW and MID levels. This project was born on the idea of plotting the RTH sessions Value Areas for /ES in an automated way, but you can select between 3 different sessions: RTH, GLOBEX and FULL sessions.
Some basic concepts:
- Volume Profile calculates the total volume for the session at each price level and give us market generated information about what price and range of prices are the most traded (where the value is)
- Value Area (VA): range of prices where 70% of the session volume is traded
- Value Area High (VAH): highest price within VA
- Value Area Low (VAL): lowest price within VA
- Point of Control (POC): the most traded price of the session (with the most volume)
- Session HIGH, LOW and MID levels are also important
There are a huge amount of things to know of Market Profile and Auction Theory like types of days, types of openings, relationships between value areas and openings... for those interested Jim Dalton's work is the way to come
I'm in my 2nd trading year and my goal for this year is learning to daytrade the futures markets thru the lens of Market Profile
For info on Volume Profile: TV Volume Profile wiki page at www.tradingview.com
For info on Market Profile and Market Auction Theory: Jim Dalton's book Mind over markets (this is a MUST)
BE AWARE: this indicator is based on the current chart's time interval and it only plots on 1, 2, 3, 5, 10, 15 and 30 minutes charts.
This is the correlation table TV uses in the Volume Profile Session Volume indicator (from the wiki above)
Chart Indicator
1 - 5 1
6 - 15 5
16 - 30 10
31 - 60 15
61 - 120 30
121 - 1D 60
This indicator doesn't follow that correlation, it doesn't get the volume data from a lower timeframe, it gets the data from the current chart resolution.
FEATURES
- 6 key values for each session: POC (solid yellow), VAH (solid red), VAL (solid green), profile HIGH (dashed silver), LOW (dashed silver) and MID (dotted silver) levels
- 3 sessions to choose for: RTH, GLOBEX and FULL
- select the numbers of sessions to plot by adding 12 hours periods back in time
- show/hide POC
- show/hide VAH & VAL
- show/hide session HIGH, LOW & MID levels
- highlight the periods of time out of the session (silver)
- extend the plotted lines all the way to the right, be careful this can turn the chart unreadable if there are a lot of sessions and lines plotted
SETTINGS
- Session: select between RTH (8:30 to 15:15 CT), GLOBEX (17:00 to 8:30 CT) and FULL (17:00 to 15:15 CT) sessions. RTH by default
- Last 12 hour periods to show: select the deph of the study by adding periods, for example, 60 periods are 30 natural days and around 22 trading days. 1 period by default
- Show POC (Point of Control): show/hide POC line. true by default
- Show VA (Value Area High & Low): show/hide VAH & VAL lines. true by default
- Show Range (Session High, Low & Mid): show/hide session HIGH, LOW & MID lines. true by default
- Highlight out of session: show/hide a silver shadow over the non session periods. true by default
- Extension: Extend all the plotted lines to the right. false by default
HOW TO SETUP
BE AWARE THIS INDICATOR PLOTS ONLY IN THE FOLLOWING CHART RESOLUTIONS: 1, 2, 3, 5, 10, 15 AND 30 MINUTES CHARTS. YOU MUST SELECT ONE OF THIS RESOLUTIONS TO THE INDICATOR BE ABLE TO PLOT
- By default this indicator plots all the levels for the last RTH session within the last 12 hours, if there is no plot try to adjust the 12 hours periods until the seesion and the periods match
- For Globex/Full sessions just select what you want from the dropdown menu and adjust the periods to plot the values
- Show or hide the levels you want with the 3 groups: POC line, VA lines and Session Range lines
- The highlight and extension options are for a better visibility of the levels as POC or VAH/VAL
THANKS TO
@watsonexchange for all the help, ideas and insights on this and the last two indicators (Market Delta & Market Internals) I'm working on my way to a 'clean chart' but for me it's not an easy path
@PineCoders for all the amazing stuff they do and all the help and tools they provide, in special the Script-Stopwatch at that was key in lowering this indicator's execution time
All the TV and Pine community, open source and shared knowledge are indeed the best way to help each other
IF YOU REALLY LIKE THIS WORK, please send me a comment or a private message and TELL ME WHAT you trade, HOW you trade it and your FAVOURITE SETUP for pulling out money from the market in a consistent basis, I'm learning to trade (this is my 2nd year) and I need all the help I can get
GOOD LUCK AND HAPPY TRADING
Tìm kiếm tập lệnh với "volume profile"
Volume Profile With Buy & Sell Pressure LabelVOLUME PROFILE WITH BUY AND SELL PRESSURE LABEL
This volume profile indicator shows volume traded for each bar and is colored according to the difference in buy and sell pressure(DMI).
***HOW TO USE***
If the bar and background is colored green, there is more market buying than selling on that bar.
If the bar and background is colored red, there is more market selling than buying on that bar.
If the bar and background is colored blue, there is an equal amount of market buying and selling on that bar.
***BUY/SELL LABEL***
There is also a label on the right side that tells you whether there is more buying or selling on the current bar. This table updates in real time and changes colors so you can get an easy, quick interpretation of the current buy/sell pressure without having to look at the volume bars so you can make faster decisions on whether to enter or exit a trade. The table changes colors in sync with the volume bars and background. Green means more market buying than selling. Red means more market selling than buying. Blue means an equal amount of market buying and selling.
***MARKETS***
This indicator can be used as a signal on all markets, including stocks, crypto, futures and forex.
***TIMEFRAMES***
This volume profile indicator can be used on all timeframes.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are our Auto Fibonacci, DMI, Momentum, Auto Support And Resistance and Money Flow Index in combination with this Volume Profile. They all have real time Bullish and Bearish labels as well so you can immediately understand each indicator's trend.
Volume Profile Free MAX SLI (50 Levels Value Area VWAP) by RRBVolume Profile Free MAX SLI by RagingRocketBull 2019
Version 1.0
All available Volume Profile Free MAX SLI versions are listed below (They are very similar and I don't want to publish them as separate indicators):
ver 1.0: style columns implementation
ver 2.0: style histogram implementation
ver 3.0: style line implementation
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 50 horizontal bars.
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator.
There are several versions: Free Pro, Free MAX SLI, Free History. This is the Free MAX SLI version. The Differences are listed below:
- Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
- Free MAX SLI: 50 levels, packed to the limit, 2x SLI modes for Buy/Sell or even higher res 150 levels
- Free History: auto highest/lowest, historic poc/va levels for each session
Features:
- High-Res Volume Profile with up to 50 levels (3 implementations)
- 20-30x faster than the old Pro versions especially on lower tfs with long history
- 2x SLI modes for even higher res: 150 levels with 3x vertical SLI, 50 buy/sell levels with 2x horiz SLI
- Calculate Volume Profile on full history
- POC, Developing POC Levels
- Buy/Sell/Total volume modes
- Side Cover
- Value Area, VAH/VAL dynamic levels
- VWAP High/Low dynamic levels with Source, Length, StdDev as params
- Show/Hide all levels
- Dim Non Value Area Zones
- Custom Range with Highlighting
- 3 Anchor points for Volume Profile
- Flip Levels Horizontally
- Adjustable width, offset and spacing of levels
- Custom Color for POC/VA/VWAP levels and Transparency for buy/sell levels
Usage:
- specify max_level/min_level/spacing (required)
- select range (start_bar, range length), confirm with range highlighting
- select volume type: Buy/Sell/Total
- select mode Value Area/VWAP to show corresponding levels
- flip/select anchor point to position the buy/sell levels
- use Horiz SLI mode for 50 Buy/Sell or Vertical SLI for 150 levels if needed
- use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
SLI:
- use SLI modes to extend the functionality of the indicator:
- Horiz Buy/Sell 2x SLI lets you view 50 Buy/Sell Levels at the same time
- Vertical Max_Vol 3x SLI lets you increase the resolution to 150 levels
- you need at least 2 instances of the indicator attached to the same chart for SLI to work
1) Enable Horiz SLI:
- attach 2 indicator instances to the chart
- make sure all instances have the same min_level/max_level/range/spacing settings
- select volume type for each instance: you can have a buy/sell or buy/total or sell/total SLI. Make sure your buy volume instance is the last attached to be displayed on top of sell/total instances without overlapping.
- set buy_sell_sli_mode to true for indicator instances with volume_type = buy/sell, for type total this is optional.
- this basically tells the script to calculate % lengths based on total volume instead of individual buy/sell volumes and use ext offset for sell levels
- Sell Offset is calculated relative to Buy Offset to stack/extend sell after buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
- there are no master/slave instances in this mode, all indicators are equal, poc/va levels are not affected and can work independently, i.e. one instance can show va levels, another - vwap.
2) Enable Vertical SLI:
- attach the first instance and evaluate the full range to roughly determine where is the highest max_vol/poc level i.e. 0..20000, poc is in the bottom half (third, middle etc) or
- add more instances and split the full vertical range between them, i.e. set min_level/max_level of each corresponding instance to 0..10000, 10000..20000 etc
- make sure all instances have the same range/spacing settings
- an instance with a subrange containing the poc level of the full range is now your master instance (bottom half). All other instances are slaves, their levels will be calculated based on the max_vol/poc of the master instance instead of local values
- set show_max_vol_sli to true for the master instance. for slave instances this is optional and can be used to check if master/slave max_vol values match and slave can read the master's value. This simply plots the max_vol value
- you can also attach all instances and set show_max_vol_sli to true in all of them - the instance with the largest max_vol should become the master
Auto/Manual Ext Max_Vol Modes:
- for auto vertical max_vol SLI mode set max_vol_sli_src in all slave instances to the max_vol of the master indicator: "VolumeProfileFree_MAX_RRB: Max Volume for Vertical SLI Mode". It can be tricky with 2+ instances
- in case auto SLI mode doesn't work - assign max_vol_sli_ext in all slave instances the max_vol value of the master indicator manually and repeat on each change
- manual override max_vol_sli_ext has higher priority than auto max_vol_sli_src when both values are assigned, when they are 0 and close respectively - SLI is disabled
- master/slave max_vol values must match on each bar at all times to maintain proper level scale, otherwise slave's levels will look larger than they should relative to the master's levels.
- Max_vol (red) is the last param in the long list of indicator outputs
- the only true max_vol/poc in this SLI mode is the master's max_vol/poc. All poc/va levels in slaves will be irrelevant and are disabled automatically. Slaves can only show VWAP levels.
- VA Levels of the master instance in this SLI mode are calculated based on the subrange, not the whole range. Cross check with the full range.
WARNING!
- auto mode max_vol_sli_src is experimental and may not work as expected
- you can only assign auto mode max_vol_sli_src = max_vol once due to some bug with unhandled exception/buffer overflow in Tradingview. Seems that you can clear the value only by removing the indicator instance
- sometimes you may see a "study in error state" error when attempting to set it back to close. Remove indicator/Reload chart and start from scratch
- volume profile may not finish to redraw and freeze in an ugly shape after an UI parameter change when max_vol_sli_src is assigned a max_vol value. Assign it to close - VP should redraw properly, but it may not clear the assigned max_vol value
- you can't seem to be able to assign a proper auto max_vol value to the 3rd slave instance
- 2x Vertical SLI works and tested in both auto/manual, 3x SLI - only manual seems to work
Notes:
- This code is 20x-30x faster (main for cycle is removed) especially on lower tfs with long history - only 2-3 sec load/redraw time vs 30-60 sec of the old Pro versions
- Instead of repeatedly calculating the total sum of volumes for the whole range on each bar, vol sums are now increased on each bar and passed to the next in the range making it a per range vs per bar calculation that reduces time dramatically
- hist_base for levels still results is ugly redraw
- if you don't see a volume profile check range settings: min_level/max_level and spacing, set spacing to 0 (or adjust accordingly based on the symbol's precision, i.e. 0.00001)
- you can view either of Buy/Sell/Total volumes, but you can't display Buy/Sell levels at the same time using a single instance (this would 2x reduce the number of levels). Use 2 indicator instances in horiz buy/sell sli mode for that.
- Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed length. Offsets control visible level parts. Side Cover hides the invisible parts.
- Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
- Custom Width - UI Style supports only width <= 4, hence this additional option
- POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
- You can't change buy/sell level colors from input (only plot transparency) - this requires 2x plot outputs => 2x reduces the number of levels to fit the max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
- All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input to change it
- There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
P.S. Gravitonium Levels Are Increasing. Unobtainium is nowhere to be found!
Links on Volume Profile and Value Area calculation and usage:
www.tradingview.com
stockcharts.com
onlinelibrary.wiley.com
Volume Profile Free Pro (25 Levels Value Area VWAP) by RRBVolume Profile Free Pro by RagingRocketBull 2019
Version 1.0
All available Volume Profile Free Pro versions are listed below (They are very similar and I don't want to publish them as separate indicators):
ver 1.0: style columns implementation
ver 2.0: style histogram implementation
ver 3.0: style line implementation
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 25 horizontal bars.
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator.
There are 3 basic methods to calculate the Value Area for a session.
- original method developed by Steidlmayr (calculated around POC)
- classical method using StdDev (calculated around the mean VWAP)
- another method based on the mean absolute deviation (calculated around the median)
POC is a high volume node and can be used as support/resistance. But when far from the day's average price it may not be as good a trend filter as the other methods.
The 80% Rule: When the market opens above/below the Value Area and then returns/stays back inside for 2 consecutive 30min periods it has 80% chance of filling VA (like a gap).
There are several versions: Free, Free Pro, Free MAX. This is the Free Pro version. The Differences are listed below:
- Free: 30 levels, Buy/Sell/Total Volume Profile views, POC
- Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
- Free MAX: 50 levels, packed to the limit
Features:
- Volume Profile with up to 25 levels (3 implementations)
- POC, Developing POC Levels
- Buy/Sell/Total/Side by Side View modes
- Side Cover
- Value Area, VAH/VAL dynamic levels
- VWAP High/Low dynamic levels with Source, Length, StdDev as params
- Show/Hide all levels
- Dim Non Value Area Zones
- Custom Range with Highlighting
- 3 Anchor points for Volume Profile
- Flip Levels Horizontally
- Adjustable width, offset and spacing of levels
- Custom Color for POC/VA/VWAP levels and Transparency for buy/sell levels
Usage:
- specify max_level/min_level for a range (required in ver 1.0/2.0, auto/optional in ver 3.0 = set to highest/lowest)
- select range (start_bar, range length), confirm with range highlighting
- select mode Value Area or VWAP to show corresponding levels.
- flip/select anchor point to position the buy/sell levels, adjust width and spacing as needed
- select Buy/Sell/Total/Side by Side view mode
- use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
- Green - buy volume of a specific price level in a range, Red - sell volume. Green + Red = Total volume of a price level in a range
There's no native support for vertical histograms in Pinescript (with price axis as base)
Basically, there are 4 ways to plot a series of horizontal bars stacked on top of each other:
1. plotshape style labeldown (ver 0 prototype discarded)
- you can have a set of fixed width/height text labels consisting of a series of underscores and moving dynamically as levels. Level offset controls visible length.
- you can move levels and scale the base width of the volume profile histogram dynamically
- you can calculate the highest/lowest range values automatically. max_level/min_level inputs are optional
- you can't fill the gaps between levels/adjust/extend width, height - this results in a half baked volume profile and looks ugly
- fixed text level height doesn't adjust and looks bad on a log scale
- fixed font width also doesn't scale and can't be properly aligned with bars when zooming
2. plot style columns + hist_base (ver 1.0)
- you can plot long horizontal bars using a series of small adjacent vertical columns with level offsets controlling visible length.
- you can't hide/move levels of the volume profile histogram dynamically on each bar, they must be plotted at all times regardless - you can't delete the history of a plot.
- you can't scale the base width of the volume profile histogram dynamically, can't set show_last from input, must use a preset fixed width for each level
- hist_base can only be a static const expression, can't be assigned highest/lowest range values automatically - you have to specify max_level/min_level manually from input
- you can't control spacing between columns - there's an equalizer bar effect when you zoom in, and solid bars when you zoom out
- using hist_base for levels results in ugly load/redraw times - give it 3-5 sec to finalize its shape after each UI param change
- level top can be properly aligned with another level's bottom producing a clean good looking histogram
- columns are properly aligned with bars automatically
3. plot style histogram + hist_base (ver 2.0)
- you can plot long horizontal bars using a series of small vertical bars (horizontal histogram) instead of columns.
- you can control the width of each histogram bar comprising a level (spacing/horiz density). Large enough width will cause bar overlapping and give level a "solid" look regardless of zoom
- you can only set width <= 4 in UI Style - custom textbox input is provided for larger values. You can set width and plot transparency from input
- this method still uses hist_base and inherits other limitations of ver 2.0
4. plot style lines (ver 3.0)
- you can also plot long horizontal bars using lines with level offsets controlling visible length.
- lines don't need hist_base - fast and smooth redraw times
- you can calculate the highest/lowest range values automatically. max_level/min_level inputs are optional
- level top can't be properly aligned with another level's bottom and have a proper spacing because line width uses its own units and doesn't scale
- fixed line width of a level (vertical thickness) doesn't scale and looks bad on log (level overlapping)
- you can only set width <= 4 in UI Style, a custom textbox input is provided for larger values. You can set width and plot transparency from input
Notes:
- hist_base for levels results in ugly load/redraw times - give it 3-5 sec to finalize its shape after each UI param change
- indicator is slow on TFs with long history 10000+ bars
- Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed width. Offsets control visible level parts. Side Cover hides the invisible parts.
- Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
- Custom Widh for levels - UI Style supports only width <= 4, hence this additional option
- POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
- You can't change buy/sell level colors (only plot transparency) - this requires 2x plot outputs exceeding max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
- Use Side by Side view to compare buy and sell volumes between each other: base width = max(total_buy_vol, total_sell_vol)
- All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input
- Sell Offset is calculated relative to Buy Offset to stack/extend sell on top of buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
- If you see "loop too long error" - change some values in UI and it will recalculate - no need to refresh the chart
- There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
- Volume Profile Range is limited to 5000 bars for free accounts
P.S. Cantaloupia Will be Free!
Links on Volume Profile and Value Area calculation and usage:
www.tradingview.com
stockcharts.com
onlinelibrary.wiley.com
Volume Profile, Pivot Anchored by DGTVolume Profile (also known as Price by Volume ) is an charting study that displays trading activity over a specified time period at specific price levels. It is plotted as a horizontal histogram on the finacial isntrumnet's chart that highlights the trader's interest at specific price levels. Specified time period with Pivots Anchored Volume Profile is determined by the Pivot Levels, where the Pivot Points High Low indicator is used and presented with this Custom indicator
Finally, Volume Weighted Colored Bars indicator is presneted with the study
Different perspective of Volume Profile applications;
Anchored to Session, Week, Month etc : Anchored-Volume-Profile
Custom Range, Interactive : Volume-Profile-Custom-Range
Fixed Range with Volume Indicator : Volume-Profile-Fixed-Range
Combined with Support and Resistance Indicator : Price-Action-Support-Resistance and Volume-Profile
Combined with Supply and Demand Zones, Interactive : Supply-Demand-and-Equilibrium-Zones
Disclaimer : Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Volume Profile Range For All AccountsVolume Profile Range For All Accounts is displaying volume from price perspective. It’s done by summing volume by the “estimated” transaction price. This version is estimating it based on public volume data so it can be used with any account.
Volume Profile is a powerful tool commonly used by PRO users, to disseminate its use also by users who operate on basic volume data, we have prepared a set of scripts:
Volume Profile For All Accounts – Analyze last 50-20000 bars.
Volume Profile From Date For All Accounts – Analyze all bars since start date.
Volume Profile Range For All Accounts – Analyze bars in a range between start and end date.
Traiding View is supporting paid users with Volume Profile on extended volume dataset. We recommend to use it, because of access to more precise data.
Script Initialization:
After adding this script to the chart, a blue dialog with ‘Set the “start date” time for “VPR”’ label will be shown. You should pick ‘start date’ on the chart by pressing point on the chart. A line will appear in that place, that can be moved later by move over and catching a rectangle dot over the line.
After ‘start date’ selection, a blue dialog with ‘Set the “end date” time for “VPR”’. You should pick the ‘end date’ on the chart by pressing point on the chart. A line will appear in that place, that can be moved later by move over and catching a rectangle dot over the line.
If picked range is too small, a red label “Range should be bigger than 50 bars” will be shown. In that case just catch the rectangle dot over the line and move it to increase the range.
Settings:
SCANNER VISUALIZATION
Start date – Start date from which bars should be taken into account during calculations. For the narrow range, the estimation may differ significantly from the Volume Profile available for Paid Traiding View users.
End date – End date to which bars should be taken into account during calculations. For the narrow range, the estimation may differ significantly from the Volume Profile available for Paid Traiding View users.
Rows – Number of rows
Width – Width of the visualization.
Position – Position of the visualization:
S_DU – At START of the area, DOWN first
S_UD – At START of the area, UP first
BE_DU – At BEFORE END of the area, DOWN first
BE_UD – At BEFORE END of the area, UP first
E_DU – At END of the area, DOWN first
E_UD – At END of the area, UP first
Color Up – Color of volume classified as move Up, or Both if separation is off.
Color Down - Color of volume classified as move Down
Color Border – Border color.
Up/Down separate – Draw separate volume classified as Up and Down
Show values – Showing volume values of the bars.
Troubleshooting:
In case of any problems, send error details to the author of the script.
Volume Profile Free Ultra SLI (100 Levels Value Area VWAP) - RRBVolume Profile Free Ultra SLI by RagingRocketBull 2019
Version 1.0
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 100 horizontal bars.
This is basically the MAX SLI version with +50 more Pinescript v4 line objects added as levels.
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator.
There are several versions: Free Pro, Free MAX SLI, Free Ultra SLI, Free History. This is the Free Ultra SLI version. The Differences are listed below:
- Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
- Free MAX SLI: 50 levels, 2x SLI modes for Buy/Sell or even higher res 150 levels
- Free Ultra SLI: 100 levels, packed to the limit, 2x SLI modes for Buy/Sell or even higher res 300 levels
- Free History: auto highest/lowest, historic poc/va levels for each session
Features:
- High-Res Volume Profile with up to 100 levels (line implementation)
- 2x SLI modes for even higher res: 300 levels with 3x vertical SLI, 100 buy/sell levels with 2x horiz SLI
- Calculate Volume Profile on full history
- POC, Developing POC Levels
- Buy/Sell/Total volume modes
- Side Cover
- Value Area, VAH/VAL dynamic levels
- VWAP High/Low dynamic levels with Source, Length, StdDev as params
- Show/Hide all levels
- Dim Non Value Area Zones
- Custom Range with Highlighting
- 3 Anchor points for Volume Profile
- Flip Levels Horizontally
- Adjustable width, offset and spacing of levels
- Custom Color for POC/VA/VWAP levels, Transparency for buy/sell levels
WARNING:
- Compilation Time: 1 min 20 sec
Usage:
- specify max_level/min_level/spacing (required)
- select range (start_bar, range length), confirm with range highlighting
- select volume type: Buy/Sell/Total
- select mode Value Area/VWAP to show corresponding levels
- flip/select anchor point to position the buy/sell levels
- use Horiz Buy/Sell SLI mode with 100 or Vertical SLI with 300 levels if needed
- use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
SLI:
use SLI modes to extend the functionality of the indicator:
- Horiz Buy/Sell 2x SLI lets you view 100 Buy/Sell Levels at the same time
- Vertical Max_Vol 3x SLI lets you increase the resolution to 300 levels
- you need at least 2 instances of the indicator attached to the same chart for SLI to work
1) Enable Horiz SLI:
- attach 2 indicator instances to the chart
- make sure all instances have the same min_level/max_level/range/spacing settings
- select volume type for each instance: you can have a buy/sell or buy/total or sell/total SLI. Make sure your buy volume instance is the last attached to be displayed on top of sell/total instances without overlapping.
- set buy_sell_sli_mode to true for indicator instances with volume_type = buy/sell, for type total this is optional.
- this basically tells the script to calculate % lengths based on total volume instead of individual buy/sell volumes and use ext offset for sell levels
- Sell Offset is calculated relative to Buy Offset to stack/extend sell after buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
- there are no master/slave instances in this mode, all indicators are equal, poc/va levels are not affected and can work independently, i.e. one instance can show va levels, another - vwap.
2) Enable Vertical SLI:
- attach the first instance and evaluate the full range to roughly determine where is the highest max_vol/poc level i.e. 0..20000, poc is in the bottom half (third, middle etc) or
- add more instances and split the full vertical range between them, i.e. set min_level/max_level of each corresponding instance to 0..10000, 10000..20000 etc
- make sure all instances have the same range/spacing settings
- an instance with a subrange containing the poc level of the full range is now your master instance (bottom half). All other instances are slaves, their levels will be calculated based on the max_vol/poc of the master instance instead of local values
- set show_max_vol_sli to true for the master instance. for slave instances this is optional and can be used to check if master/slave max_vol values match and slave can read the master's value. This simply plots the max_vol value
- you can also attach all instances and set show_max_vol_sli to true in all of them - the instance with the largest max_vol should become the master
Auto/Manual Ext Max_Vol Modes:
- for auto vertical max_vol SLI mode set max_vol_sli_src in all slave instances to the max_vol of the master indicator: "VolumeProfileFree_MAX_RRB: Max Volume for Vertical SLI Mode". It can be tricky with 2+ instances
- in case auto SLI mode doesn't work - assign max_vol_sli_ext in all slave instances the max_vol value of the master indicator manually and repeat on each change
- manual override max_vol_sli_ext has higher priority than auto max_vol_sli_src when both values are assigned, when they are 0 and close respectively - SLI is disabled
- master/slave max_vol values must match on each bar at all times to maintain proper level scale, otherwise slave's levels will look larger than they should relative to the master's levels.
- Max_vol (red) is the last param in the long list of indicator outputs
- the only true max_vol/poc in this SLI mode is the master's max_vol/poc. All poc/va levels in slaves will be irrelevant and are disabled automatically. Slaves can only show VWAP levels.
- VA Levels of the master instance in this SLI mode are calculated based on the subrange, not the whole range and may be inaccurate. Cross check with the full range.
WARNING!
- auto mode max_vol_sli_src is experimental and may not work as expected
- you can only assign auto mode max_vol_sli_src = max_vol once due to some bug with unhandled exception/buffer overflow in Tradingview. Seems that you can clear the value only by removing the indicator instance
- sometimes you may see a "study in error state" error when attempting to set it back to close. Remove indicator/Reload chart and start from scratch
- volume profile may not finish to redraw and freeze in an ugly shape after an UI parameter change when max_vol_sli_src is assigned a max_vol value. Assign it to close - VP should redraw properly, but it may not clear the assigned max_vol value
- you can't seem to be able to assign a proper auto max_vol value to the 3rd slave instance
- 2x Vertical SLI works and tested in both auto/manual, 3x SLI - only manual seems to work (you can have a mixed mode: 2nd instance - auto, 3rd - manual)
Notes:
- This code uses Pinescript v3 compatibility framework
- This code is 20x-30x faster (main for cycle is removed) especially on lower tfs with long history - only 4-5 sec load/redraw time vs 30-60 sec of the old Pro versions
- Instead of repeatedly calculating the total sum of volumes for the whole range on each bar, vol sums are now increased on each bar and passed to the next in the range making it a per range vs per bar calculation that reduces time dramatically
- 100 levels consist of 50 main plot levels and 50 line objects used as alternate levels, differences are:
- line objects are always shown on top of other objects, such as plot levels, zero line and side cover, it's not possible to cover/move them below.
- all line objects have variable lengths, use actual x,y coords and don't need side cover, while all plot levels have a fixed length of 100 bars, use offset and require cover.
- all key properties of line objects, such as x,y coords, color can be modified, objects can be moved/deleted, while this is not possible for static plot levels.
- large width values cause line objects to expand only up/down from center while their length remains the same and stays within the level's start/end points similar to an area style.
- large width values make plot levels expand in all directions (both h/v), beyond level start/end points, sometimes overlapping zero line, making them an inaccurate % length representation, as opposed to line objects/plot levels with area style.
- large width values translate into different widths on screen for line objects and plot levels.
- you can't compensate for this unwanted horiz width expansion of plot levels because width uses its own units, that don't translate into bars/pixels.
- line objects are visible only when num_levels > 50, plot levels are used otherwise
- Since line objects are lines, plot levels also use style line because other style implementations will break the symmetry/spacing between levels.
- if you don't see a volume profile check range settings: min_level/max_level and spacing, set spacing to 0 (or adjust accordingly based on the symbol's precision, i.e. 0.00001)
- you can view either of Buy/Sell/Total volumes, but you can't display Buy/Sell levels at the same time using a single instance (this would 2x reduce the number of levels). Use 2 indicator instances in horiz buy/sell sli mode for that.
- Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed length. Offsets control visible level parts. Side Cover hides the invisible parts.
- Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
- Custom Width - UI Style supports only width <= 4, hence this additional option
- POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
- You can't change buy/sell level colors from input (only transparency) - this requires 2x plot outputs => 2x reduces the number of levels to fit the max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
- You can change level transparency of line objects. Due to Pinescript limitations, only discrete values are supported.
- Inverse transp correlation creates the necessary illusion of "covered" line objects, although they are shown on top of the cover all the time
- If custom lines_transp is set the illusion will break because transp range can't be skewed easily (i.e. transp 0..100 is always mapped to 100..0 and can't be mapped to 50..0)
- transparency can applied to lines dynamically but nva top zone can't be completely removed because plot/mixed type of levels are still used when num_levels < 50 and require cover
- transparency can't be applied to plot levels dynamically from script this can be done only once from UI, and you can't change plot color for the past length bars
- All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input to change it
- Range selection/Anchoring is not accurate on charts with time gaps since you can only anchor from a point in the future and measure distance in time periods, not actual bars, and there's no way of knowing the number of future gaps in advance.
- Adjust Width for Log Scale mode now also works on high precision charts with small prices (i.e. 0.00001)
- in Adjust Width for Log Scale mode Level1 width extremes can be capped using max deviation (when level1 = 0, shift = 0 width becomes infinite)
- There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
P.S. I am your grandfather, Luke! Now, join the Dark Side in your father's steps or be destroyed! Once more the Sith will rule the Galaxy, and we shall have peace...
Volume Profile Channel [CE]Volume Profile Channel
Volume Profile Channel, Is the first of its kind tool that will plot a volume profile in any directional channel, the tool will calculate a profile and display the following, POC/VAH/VAL.
The typical profile works by on a horizontal access such that ticksize can be calculated along the y axis and data can then be used to generate a profile, the angle of a parallel channel would make this unavailable.
By cleverly using the angle at which the profile is created, a diagonal ticksize is generated and applied to the profile to create a first of its kind parallel channel volume profile tool!
User Controllable Width:
As compared to the above or below images, users have the ability to control the width this will allow them to show how much of the space the profile will draw on the chart with, using the value "0"
can be done to completely remove the profile whilst still tracking the POC,VAH,VAL
0 Width:
Users can the total number of rows,
Number Of Rows 50:
Ability to "anti-alias" the profile as well below will show a comparison of this occurring:
Unsmoothed
Smoothed
The advantage of using this is that as opposed to relying datasets of mid points or custom equal values along a parallel channel , users can now use the profile to see where the channel has the most interaction, (POC).
This allows for an objective look into the data as opposed to identifying by "eye" where traders are exchanging hands or vs using values such as the midpoint which may not necessarily always be a point of interest as the POC will be.
The VAH/VAL levels give good opportunity to see reactions at levels we may not previously be able to see in the channel with fixed values, allowing us to take positions in a more dynamic sense which may not be identifiable with fixed positions, 0.25,0.5,0.75 etc...
Volume Profile Visible Range For All AccountsVolume Profile Visible Range For All Accounts is displaying volume from price perspective. It’s done by summing volume by the “estimated” transaction price. This version is estimating it based on public volume data so it can be used with any account.
Volume Profile is a powerful tool commonly used by PRO users, to disseminate its use also by users who operate on basic volume data, we have prepared a set of scripts:
Volume Profile For All Accounts – Analyze last 50-20000 bars.
Volume Profile From Date For All Accounts – Analyze all bars since start date.
Volume Profile Range For All Accounts – Analyze bars in a range between start and end date.
Volume Profile Visible Range For All Accounts – Analyze bars in the range visible on the screen.
If after reading script description something is not clear, do not hesitate to ask. We are helping all users.
Script Settings:
| SCANNER VISUALIZATION |
Rows – Number of rows
Width – Width of the visualization.
Position – Position of the visualization:
S_DU – At START of the area (left edge of the screen), DOWN first
S_UD – At START of the area (left edge of the screen), UP first
BE_DU – At BEFORE END of the area, DOWN first
BE_UD – At BEFORE END of the area, UP first
E_DU – At END of the area, DOWN first
E_UD – At END of the area, UP first
Color Up – Color of volume classified as move Up, or Both if separation is off.
Color Down - Color of volume classified as move Down
Color Border – Border color.
Up/Down separate – Draw separate volume classified as Up and Down
Show values – Showing volume values of the bars.
Troubleshooting:
In case of any problems, send error details to the author of the script.
Volume Profile From Date For All AccountsVolume Profile From Date For All Accounts is displaying volume from price perspective. It’s done by summing volume by the “estimated” transaction price. This version is estimating it based on public volume data so it can be used with any account.
Volume Profile is a powerful tool commonly used by PRO users, to disseminate its use also by users who operate on basic volume data, we have prepared a set of scripts:
Volume Profile For All Accounts – Analyze last 50-20000 bars.
Volume Profile From Date For All Accounts – Analyze all bars since start date.
Volume Profile Range For All Accounts – Analyze bars in a range between start and end date.
Traiding View is supporting paid users with Volume Profile on extended volume dataset. We recommend to use it, because of access to more precise data.
Settings:
SCANNER VISUALIZATION
Start date – Start date from which bars should be taken into account during calculations. For the near past/small scope, the estimation may differ significantly from the Volume Profile available for Paid Traiding View users.
Rows – Number of rows
Width – Width of the visualization.
Position – Position of the visualization:
S_DU – At START of the area, DOWN first
S_UD – At START of the area, UP first
BE_DU – At BEFORE END of the area, DOWN first
BE_UD – At BEFORE END of the area, UP first
E_DU – At END of the area, DOWN first
E_UD – At END of the area, UP first
Color Up – Color of volume classified as move Up, or Both if separation is off.
Color Down - Color of volume classified as move Down
Color Border – Border color.
Up/Down separate – Draw separate volume classified as Up and Down
Show values – Showing volume values of the bars.
Troubleshooting:
In case of any problems, send error details to the author of the script.
Volume Profile For All AccountsVolume Profile For All Accounts is displaying volume from price perspective. It’s done by summing volume by the “estimated” transaction price. This version is estimating it based on public volume data so it can be used with any account.
Volume Profile is a powerful tool commonly used by PRO users, to disseminate its use also by users who operate on basic volume data, we have prepared a set of scripts:
Volume Profile For All Accounts – Analyze last 50-20000 bars.
Volume Profile From Date For All Accounts – Analyze all bars since start date.
Volume Profile Range For All Accounts – Analyze bars in a range between start and end date.
Traiding View is supporting paid users with Volume Profile on extended volume dataset. We recommend to use it, because of access to more precise data.
Settings:
SCANNER VISUALIZATION
Limit – How many last bars should be taken into account during calculations. For small values, the estimation may differ significantly from the Volume Profile available for Paid Traiding View users.
Rows – Number of rows
Width – Width of the visualization.
Position – Position of the visualization:
S_DU – At START of the area, DOWN first
S_UD – At START of the area, UP first
BE_DU – At BEFORE END of the area, DOWN first
BE_UD – At BEFORE END of the area, UP first
E_DU – At END of the area, DOWN first
E_UD – At END of the area, UP first
Color Up – Color of volume classified as move Up, or Both if separation is off.
Color Down - Color of volume classified as move Down
Color Border – Border color.
Up/Down separate – Draw separate volume classified as Up and Down
Show values – Showing volume values of the bars.
Troubleshooting:
In case of any problems, send error details to the author of the script.
Volume Profile by QTECHtradingVolume Profile by QTECHtrading for the new year 2023
This is a simple version of Volume profile
Features:
- Volume Profile for day trading lower time frame, swing trading or investing with higher time frame
- POC, Developing POC Levels, Previous Levels
- Developing Value Area, VAH/VAL dynamic levels and Previous Levels
- Buy/Sell/Total volume modes
- Auto VWAP for day trading, swing trading, or investing
- Show/Hide all levels
- Custom Initial Balance with BOX
Volume Profile Interactive RangeVolume Profile Interactive Range (VPIR) is a brand new interactive VP enables you to analyze the market in depth.
Interactive mode lets you to set the duration(source) of VP intuitively.
PoC, VA(VAH&VAL) are fully supported.
Volume Profile with Node Detection [LuxAlgo]The Volume Profile with Node Detection is a charting tool that allows visualizing the distribution of traded volume across specific price levels and highlights significant volume nodes or clusters of volume nodes that traders may find relevant in utilizing in their trading strategies.
🔶 USAGE
The volume profile component of the script serves as the foundation for node detection while encompassing all the essential features expected from a volume profile. See the sub-sections below for more detailed information about the indicator components and their usage.
🔹 Peak Volume Node Detection
A volume peak node is identified when the volume profile nodes for the N preceding and N succeeding nodes are lower than that of the evaluated one.
Displaying peak volume nodes along with their surrounding N nodes (Zones or Clusters) helps visualize the range, typically representing consolidation zones in the market. This feature enables traders to identify areas where trading activity has intensified, potentially signaling periods of price consolidation or indecision among market participants.
🔹 Trough Volume Node Detection
A volume trough node is identified when the volume profile nodes for the N preceding and N succeeding nodes are higher than that of the evaluated one.
🔹 Highest and Lowest Volume Nodes
Both the highest and lowest volume areas play significant roles in trading. The highest volume areas typically represent zones of strong price acceptance, where a significant amount of trading activity has occurred. On the other hand, the lowest volume areas signify price levels with minimal trading activity, often indicating zones of price rejection or areas where market participants have shown less interest.
🔹 Volume profile
Volume profile is calculated based on the volume of trades that occur at various price levels within a specified timeframe. It divides the price range into discrete price intervals, typically known as "price buckets" or "price bars," and then calculates the total volume of trades that occur at each price level within those intervals. This information is then presented graphically as a histogram or profile, where the height of each bar represents the volume of trades that occurred at that particular price level.
🔶 SETTINGS
🔹 Volume Nodes
Volume Peaks: Toggles the visibility of either the "Peaks" or "Clusters" on the chart, depending on the specified percentage for detection.
Node Detection Percent %: Specifies the percentage for the Volume Peaks calculation.
Volume Troughs: Toggles the visibility of either the "Troughs" or "Clusters" on the chart, depending on the specified percentage for detection.
Node Detection Percent %: Specifies the percentage for the Volume Troughs calculation.
Volume Node Threshold %: A threshold value specified as a percentage is utilized to detect peak/trough volume nodes. If a value is set, the detection will disregard volume node values lower than the specified threshold.
Highest Volume Nodes: Toggles the visibility of the highest nodes for the specified count.
Lowest Volume Nodes: Toggles the visibility of the lowest nodes for the specified count.
🔹 Volume Profile - Components
Volume Profile: Toggles the visibility of the volume profile with either classical display or gradient display.
Value Area Up / Down: Color customization option for the volume nodes within the value area of the profile.
Profile Up / Down Volume: Color customization option for the volume nodes outside of the value area of the profile.
Point of Control: Toggles the visibility of the point of control, allowing selection between "developing" or "regular" modes. Sets the color and width of the point of control line accordingly.
Value Area High (VAH): Toggles the visibility of the value area high level and allows customization of the line color.
Value Area Low (VAL): Toggles the visibility of the value area low level and allows customization of the line color.
Profile Price Labels: Toggles the visibility of the Profile Price Levels and allows customization of the text size of the levels.
🔹 Volume Profile - Display Settings
Profile Lookback Length: Specifies the length of the profile lookback period.
Value Area (%): Specifies the percentage for calculating the value area.
Profile Placement: Specify where to display the profile.
Profile Number of Rows: Specify the number of rows the profile will have.
Profile Width %: Adjusts the width of the rows in the profile relative to the profile range.
Profile Horizontal Offset: Adjusts the horizontal offset of the profile when it is selected to be displayed on the right side of the chart.
Value Area Background: Toggles the visibility of the value area background and allows customization of the fill color.
Profile Background: Toggles the visibility of the profile background and allows customization of the fill color.
🔶 RELATED SCRIPTS
Supply-Demand-Profiles
Liquidity-Sentiment-Profile
Thanks to our community for recommending this script. For more conceptual scripts and related content, we welcome you to explore by visiting >>> LuxAlgo-Scripts .
Volume Profile [TFO]This indicator generates Volume Profiles from which to display insights about recent Volume Points of Control and High Volume Nodes. Volume Profile is a way to view trading volume by the price where trades have occurred, rather than the time when they occur (as seen by traditional Volume indicators).
By selecting a Resolution Timeframe (1m in this example), we can aggregate the volume at different prices to build a Volume Profile for a specified Profile Timeframe (1D in this example). In this indicator, we make the simple assumption that a given candle's volume is distributed evenly across all points. Realistically, this is seldom the case, but it gives us a starting point to easily estimate the volume at a given price, in turn helping us to build our profiles in a trivial way.
If we do this for all Resolution Timeframe candles within a Profile Timeframe (all 1m candles in a single 1D candle, in this example), then we can successfully aggregate this data and build a full Volume Profile. And thankfully, Pine Script's new polyline feature ultimately allow us to keep more Volume Profiles on our charts. Before polylines, we would have to consider using lines or boxes to represent the individual levels within a given profile, and each script currently has a cap of 500 lines and boxes, respectively. However, one single polyline can be used to draw the complex shape of an entire profile, and we may show up to 100 polylines in a given script. This helps us keep a lot more data on our charts!
Compared to TradingView's Session Volume Profile indicator (blue/yellow), we can see that our indicator (grey) is nearly identical, which verifies that our assumption of a uniform volume distribution is enough to roughly estimate a given Volume Profile. Note in this example the Row Size was set to 200, meaning that 200 levels are used to approximate profiles from each session's high to its low.
Show VPOC will show the volume point of control of each profile, which represents the price level where the largest amount of volume was traded for a given profile. This is shown with the red lines in the following chart.
Extend Last N VPOCs will look for the most recent, user-defined number of VPOCs (not including the current session's VPOC that's still developing) and extend them to the right of the chart as points of reference. The Show Labels Above option will annotate each VPOC with its respective date above a specified timeframe. This way, if one was using Volume Profiles on intraday timeframes, there wouldn't need to be several date strings all showing the same day.
Show Previous HVNs will show high volume nodes from the previous session. The HVN Strength setting is similar to a "pivot strength" that I use in a lot of my scripts - essentially, HVNs are validated by treating them as local highs. With a HVN Strength of 10 for example, if a given level contains more volume than the 10 levels above and below it, then it is validated as a HVN.
For a cleaner look and feel, HVNs can instead be shown as levels (lines) instead of areas (boxes). With levels enabled, solid lines denote the previous session's VPOC, and dotted lines represent all other HVNs. With areas enabled instead, the tops and bottoms will extend above/below the HVN level until a point with greater volume is discovered (marking the "end" of the node).
This indicator can be computationally intensive and may crash from taking too long to execute. In these cases, it's best to disable unused features, decrease the number of Rows, and/or simply reload the chart until it populates.
Volume Profile [LuxAlgo]Displays the estimate of a volume profile, with the option to show a rolling POC (point of control). Users can change the lookback, row size, and various visual aspects of the volume profile.
Settings
Basic:
Lookback: Number of most recent bars to use for the calculation of the volume profile
Row Size: Determines the number of rows used for the calculation of the volume profile
Show Rolling POC: Determines whether to display the rolling POC of the volume profile
Style:
Width (% of the box): Determines the length of the bars relative to the Lookback value
Bar Width: Width of each bar
Flip Histogram: Flips the histogram, when enabled, the histogram base will be located at the most recent candle
Gradient: Allows to color the volume profile bars with a gradient, with a color intensity determined by the length of each bar
Rows Solid Color: Color of each bar when 'Gradient' is disabled
POC Solid Color: Color of the POC when 'Gradient' is disabled
Usage
It is very common to display volume over time in order to visualize the trading activity made over a specific candle, however this is not the only way to display volume and it can be interesting to put it in relation with the price, which is what volume profiles do.
Volume profiles are displayed as price relative histograms showing the accumulated volume within certain price areas, the number of areas are determined by the row size of the volume profile. Knowing which price's area accumulated the most volume allow highlighting areas of interest to market participants.
Most accumulated volume will be encountered in zones of equilibrium between buyers and sellers; that is zones of local price stationarity. These zones are highlighted by high volume nodes in the volume profile. Imbalance between buyers and sellers are highlighted by thinner zones of the volume profile.
The price level with the most accumulated volume is highlighted by the "point of control" (POC), displayed by the dotted line in the indicator.
The POC is often considered an important level, commonly used as support/resistance by traders. One can verify the accuracy of this use case by using the rolling POC (assuming one would use the POC over time as SR).
Indicator Limitations
Volume profiles are calculated using tick data, which is not the case of this estimate, as such you won't have an accurate representation of an actual volume profile.
The rolling POC can introduce time outs in the script computation, use lower lookback and row size value to display it.
Volume Profile Regression Channel [LuxAlgo]The Volume Profile Regression Channel calculates a volume profile from an anchored linear regression channel. Users can choose the starting and ending points for the indicator calculation interval.
Like a regular volume profile, a "line" of control (LOC), value area, and a developing LOC are displayed.
🔶 SETTINGS
Sections: The number of sections the linear regression channel is divided into for the calculation of the volume profile.
Width %: Determines the length of the profile within the channel relative to the channel length.
Value Area %: Highlights the sections starting from the POC whose accumulated volume is equal to the user-defined percentage of the total profile sections volume.
🔶 USAGES
Regular volume profiles are often constructed from a horizontal price area, this can allow highlighting price areas where most trading activity takes place.
However, when price is strongly trending a classical volume profile can sometimes be more uniform. This is where using an angled volume profile can be useful.
The line of control allows highlighting the section of the channel with the most accumulated volume, this line can be used as a potential future support/resistance. This is where an angled volume profile might be the most useful.
The developing LOC highlights the LOC location at a specific time within the profile (from left to right) and can sometimes provide an estimate of the underlying trend in the price.
🔶 DETAILS
To be computed the script requires a left and right chart time coordinates. When adding the script to their charts users can determine the left and right time coordinates by clicking on the chart.
The linear regression channel width is determined so that the channel precisely encompasses the whole price.
🔶 LIMITATIONS
Using a very large calculation interval can return timeouts. Users can reduce the calculation interval to fix that issue from occurring.
The amount of drawing objects that can be used is limited, as such using a high calculation interval can display an incomplete profile.
🔶 ACKNOWLEDGEMENTS
If you are interested in these types of scripts, @HeWhoMustNotBeNamed published a similar script where users can use a custom line angle. See his 'Angled Volume Profile' script from March 2023.
Volume Profile PremiumHello, my friends, this is a new fine-grained volume profile indicator. As is known to all, the volume profile indicator is a charting tool that shows how much volume has occurred at each price throughout the trading session. The volume profile indicates the prices favored by the market or those ignored by the market, which can give traders clues as to where prices are likely to go shortly.
(1) Indicator description
This indicator is based on the function "request.security_lower_tf". See the related usage note for details if you need it.
Support for obtaining volume from a lower timeframe than the current chart and calculating a more fine-grained volume distribution
Due to the increased complexity of the calculation, you need to set a reasonable timeframe to avoid calculation timeout.
(2) Key parameters
- Support/Resistance Clustering
Max of Lookback Forward: The maximum number of historical K-lines
Min Resolution (Minute): lower timeframe, unit: minute
Display Volume Profile: ways to display volume profile
Rows of Volume Profile: rows of volume profile
Placement of Volume Profile: location of volume profile
Width of Volume Profile: width of volume profile
Horizontal Offset: horizontal offset of volume profile
Happy trading, and enjoy your life!
————————————————————————————————————————
各位朋友大家好,这是一个具有更高细粒度的成交量分布指标。众所周知,成交量分布是一种图表分析工具(或指标),它显示了在整个交易时段内每个价格上发生了多少成交量。 成交量分布指出了受到市场青睐的价格以及被市场忽略的价格,这可以为交易者提供有关近期价格可能走向何方的线索。
(1) 指标说明
该指标基于 request.security_lower_tf 函数,详情可以查看相关使用说明
支持从比当前图表分辨率更低的时间周期获取成交量,并计算更加细粒度的成交量分布
由于增加了计算复杂度,您需要设置合理的时间周期以避免计算超时
(2) 关键参数
- Volume Profile Parameters
Max of Lookback Forward: 用于统计成交量分布的最大回顾的K线数量
Min Resolution (Minute): 细粒度的时间周期
Display Volume Profile: 展示成交量分布的方式
Rows of Volume Profile: 成交量分布的行数
Placement of Volume Profile: 成交量分布的位置
Width of Volume Profile: 成交量分布的宽度
Horizontal Offset: 成交量分布的水平偏移
祝大家交易愉快
Volume Profile with a few polylinesThe base of "Volume Profile with a few polylines" is another script of mine, Volume Profile (Maps) .
The structure of maps is used to gather the data. However, the drawings is done with polylines.
This enables coders to draw an entire volume profile with just a few polylines, while the range is broader.
This results in the benefit to draw more "lines" than with line.new() / box.new() alone.
🔶 CONCEPTS
🔹 Polylines
polyline.new creates a new polyline instance and displays it on the chart, sequentially connecting all of the points in the `points` array with line segments.
The segments in the drawing can be straight or curved depending on the `curved` parameter.
In this script, points are connected, starting from the bottom. The created line moves up until there is a price level where a volume value needs to be displayed,
at which the line goes to the left to the concerning volume value, coming back at the same price level until the line returns to its initial x-axis,
after which the line will continue to rise until all values are displayed.
A polyline can contain maximum 10000 points (10K).
Since the line has to go back and forth, each price/volume line takes 3 points.
In the case that 20K bars all have a different price, we would need 60K points, or just 6 polylines. A maximum of 100 polylines can be displayed.
The 3 highest volume values are displayed with line.new(), each with their own colour.
🔹 Maps
A map object is a collection that consists of key - value pairs
Each key is unique and can only appear once. When adding a new value with a key that the map already contains, that value replaces the old value associated with the key .
You can change the value of a particular key though, for example adding volume (value) at the same price (key), the latter technique is used in this script.
Volume is added to the map, associated with a particular price (default close, can be set at high, low, open,...)
When the map already contains the same price (key), the value (volume) is added to the existing volume at the associated price.
A map can contain maximum 50K values, which is more than enough to hold 20K bars (Basic 5K - Premium plan 20K), so the whole history can be put into a map.
🔹 Rounding function
This publication contains 2 round functions, which can be used to widen the Volume Profile
Round
• "Round" set at zero -> nothing changes to the source number
• "Round" set below zero -> x digit(s) after the decimal point, starting from the right side, and rounded.
• "Round" set above zero -> x digit(s) before the decimal point, starting from the right side, and rounded.
Example: 123456.789
0->123456.789
1->123456.79
2->123456.8
3->123457
-1->123460
-2->123500
Step
Another option is custom steps.
After setting "Round" to "Step", choose the desired steps in price,
Examples
• 2 -> 1234.00, 1236.00, 1238.00, 1240.00
• 5 -> 1230.00, 1235.00, 1240.00, 1245.00
• 100 -> 1200.00, 1300.00, 1400.00, 1500.00
• 0.05 -> 1234.00, 1234.05, 1234.10, 1234.15
•••
🔶 FEATURES
🔹 Volume * currency
Let's take as example BTCUSD, relative to USD, 10 volume at a price of 100 BTCUSD will be very different than 10 volume at a price of 30000 (1K vs. 300K)
If you want volume to be associated with USD, enable Volume * currency . Volume will then be multiplied by the price:
• 10 volume, 1 BTC = 100 -> 1000
• 10 volume, 1 BTC = 30K -> 300K
Polylines has the attributes curved & closed.
When "curved" is enabled the drawing will connect all points from the `points` array using curved line segments.
When "closed" is enabled the drawing will also connect the first point to the last point from the `points` array, resulting in a closed polyline.
They are default disabled, but can be enabled:
🔶 DETAILS
🔹 Put
When the map doesn't contain a price, it will be added, using map.put(id, key, value)
In our code:
map.put(originalMap, price, volume)
or
originalMap.put(price, volume)
A key (price) is now associated with a value (volume) -> key : value
Since all keys are unique, we don't have to know its position to extract the value, we just need to know the key -> map.get(id, key)
We use map.get() when a certain key already exists in the map, and we want to add volume with that value.
if originalMap.contains(price)
originalMap.put(price, originalMap.get(price) + volume)
-> At the last bar, all prices (source) are now associated with volume.
🔶 SETTINGS
Source : Set source of choice; default close , can be set as high , low , open , ...
Volume & currency : Enable to multiply volume with price (see Features )
Amount of bars : Set amount of bars which you want to include in the Volume Profile
🔹 Round -> ' Round/Step '
Round -> see Concepts
Step -> see Concepts
🔹 Display Volume Profile
Offset: shifts the Volume Profile (max. 500 bars to the right of last bar, see Features )
Max width Volume Profile: largest volume will be x bars wide, the rest is displayed as a ratio against largest volume (see Features )
Colours
Curved: make lines curved
Closed: connect last with first point
🔶 LIMITATIONS
• Lines won't go further than first bar (coded).
• The Volume Profile can be placed maximum 500 bar to the right of last price.
Volume Profile (Maps) [LuxAlgo]The Pine Script® developers have unleashed "maps"!
Volume Profile (Maps) displays volume, associated with price, above and below the latest price, by using maps
The largest and second-largest volume is highlighted.
🔶 USAGE
The proposed script can highlight more frequent closing prices/prices with the highest volume, potentially highlighting more liquid areas. The prices with the highest associated volume (in red and orange in the indicator) can eventually be used as support/resistance levels.
Voids within the volume profile can highlight large price displacements (volatile variations).
🔶 CONCEPTS
🔹 Maps
A map object is a collection that consists of key - value pairs
Each key is unique and can only appear once. When adding a new value with a key that the map already contains, that value replaces the old value associated with the key .
You can change the value of a particular key though, for example adding volume (value) at the same price (key), the latter technique is used in this script.
Volume is added to the map, associated with a particular price (default close, can be set at high, low, open,...)
When the map already contains the same price (key), the value (volume) is added to the existing volume at the associated price.
A map can contain maximum 50K values, which is more than enough to hold 20K bars (Basic 5K - Premium plan 20K), so the whole history can be put into a map.
🔹 Visible line/box limit
We can only display maximum 500 line.new() though.
The code locates the current (last) close, and displays volume values around this price, using lines, for example 250 lines above and 250 lines below current price.
If one side contains fewer values, the other side can show more lines, taking the maximum out of the 500 visible line limitation.
Example (max. 500 lines visible)
• 100 values below close
• 2000 values above close
-> 100 values will be displayed below close
-> 400 remaining -> 400 values will be displayed above close
Pushing the limits even further, when ' Amount of bars ' is set higher than 500, boxes - box.new() - will be used as well.
These have a limit of 500 as well, bringing the total limit to 1000.
Note that there are visual differences when boxes overlap against lines.
If this is confusing, please keep ' Amount of bars ' at max. 500 (then only lines will be used).
🔹 Rounding function
This publication contains 2 round functions, which can be used to widen the Volume Profile
Round
• "Round" set at zero -> nothing changes to the source number
• "Round" set below zero -> x digit(s) after the decimal point, starting from the right side, and rounded.
• "Round" set above zero -> x digit(s) before the decimal point, starting from the right side, and rounded.
Example: 123456.789
0->123456.789
1->123456.79
2->123456.8
3->123457
-1->123460
-2->123500
Step
Another option is custom steps.
After setting "Round" to "Step", choose the desired steps in price,
Examples
• 2 -> 1234.00, 1236.00, 1238.00, 1240.00
• 5 -> 1230.00, 1235.00, 1240.00, 1245.00
• 100 -> 1200.00, 1300.00, 1400.00, 1500.00
• 0.05 -> 1234.00, 1234.05, 1234.10, 1234.15
•••
🔶 FEATURES
🔹 Adjust position & width
🔹 Table
The table shows the details:
• Size originalMap : amount of elements in original map
• # higher: amount of elements, higher than last "close" (source)
• index "close" : index of last "close" (source), or # element, lower than source
• Size newMap : amount of elements in new map (used for display lines)
• # higher : amount of elements in newMap, higher than last "close" (source)
• # lower : amount of elements in newMap, lower than last "close" (source)
🔹 Volume * currency
Let's take as example BTCUSD, relative to USD, 10 volume at a price of 100 BTCUSD will be very different than 10 volume at a price of 30000 (1K vs. 300K)
If you want volume to be associated with USD, enable Volume * currency . Volume will then be multiplied by the price:
• 10 volume, 1 BTC = 100 -> 1000
• 10 volume, 1 BTC = 30K -> 300K
Disabled
Enabled
🔶 DETAILS
🔹 Put
When the map doesn't contain a price, it will be added, using map.put(id, key, value)
In our code:
map.put(originalMap, price, volume)
or
originalMap.put(price, volume)
A key (price) is now associated with a value (volume) -> key : value
Since all keys are unique, we don't have to know its position to extract the value, we just need to know the key -> map.get(id, key)
We use map.get() when a certain key already exists in the map, and we want to add volume with that value.
if originalMap.contains(price)
originalMap.put(price, originalMap.get(price) + volume)
-> At the last bar, all prices (source) are now associated with volume.
🔹 Copy & sort
Next, every key of the map is copied and sorted (array of keys), after which the index (idx) is retrieved of last (current) price.
copyK = originalMap.keys().copy()
copyK.sort()
idx = copyK.binary_search_leftmost(src)
Then left and right side of idx is investigated to show a maximum amount of lines at both sides of last price.
🔹 New map & display
The keys (from sorted array of copied keys) that will be displayed are put in a new map, with the associated volume values from the original map.
newMap = map.new()
🔹 Re-cap
• put in original amp (price key, volume value)
• copy & sort
• find index of last price
• fetch relevant keys left/right from that index
• put keys in new map and fetch volume associated with these keys (from original map)
Simple example (only show 5 lines)
bar 0, price = 2, volume = 23
bar 1, price = 4, volume = 3
bar 2, price = 8, volume = 21
bar 3, price = 6, volume = 7
bar 4, price = 9, volume = 13
bar 5, price = 5, volume = 85
bar 6, price = 3, volume = 13
bar 7, price = 1, volume = 4
bar 8, price = 7, volume = 9
Original map:
Copied keys array:
Sorted:
-> 5 keys around last price (7) are fetched (5, 6, 7, 8, 9)
-> keys are placed into new map + volume values from original map
Lastly, these values are displayed.
🔶 SETTINGS
Source : Set source of choice; default close , can be set as high , low , open , ...
Volume & currency : Enable to multiply volume with price (see Features )
Amount of bars : Set amount of bars which you want to include in the Volume Profile
Max lines : maximum 1000 (if you want to use only lines, and no boxes -> max. 500, see Concepts )
🔹 Round -> ' Round/Step '
Round -> see Concepts
Step -> see Concepts
🔹 Display Volume Profile
Offset: shifts the Volume Profile (max. 500 bars to the right of last bar, see Features )
Max width Volume Profile: largest volume will be x bars wide, the rest is displayed as a ratio against largest volume (see Features )
Show table : Show details (see Features )
🔶 LIMITATIONS
• Lines won't go further than first bar (coded).
• The Volume Profile can be placed maximum 500 bar to the right of last price.
• Maximum 500 lines/boxes can be displayed
Volume Profile - Custom Range, Interactive by DGTVolume Profile - Custom Range aims to display trading activity at specific price levels over user defined Custom Range of trading. Start and End Time is Interactive , they can be adjusted simply by clicking on the chart and drag the lines to specify the desired custom range. Same as is with the drawing tools available in TV
Please note, while switching between timeframes or switching to different instruments with different exchange timezones you may need to adjust the locations in case the plotting is not displied
Volume Profile - Custom Range is plotted as two horizontal histograms on the finacial isntrumnet's chart that highlights the trader's common interest at specific price levels as well as aims to reveal dominant party of who is in control, bulls or bears
You are also invated to galnce at Volume-Profile-and-Volume-Indicator , Anchored-Volume-Profile , and Price Action-Support-Resistance for different perspective of Volume Profiles
Special thanks to everyone who commented and presented their valuable suggestions
Disclaimer: Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Volume Profile Matrix [LuxAlgo]The Volume Profile Matrix indicator extends from regular volume profiles by also considering calculation intervals within the calculation window rather than only dividing the calculation window in rows.
Note that this indicator is subject to repainting & back-painting, however, treating the indicator as a tool for identifying frequent points of interest can still be very useful.
🔶 SETTINGS
Lookback: Number of most recent bars used to calculate the indicator.
Columns: Number of columns (intervals) used to calculate the volume profile matrix.
Rows: Number of rows (intervals) used to calculate the volume profile matrix.
🔶 USAGE
The Volume Profile Matrix indicator can be used to obtain more information regarding liquidity on specific time intervals. Instead of simply dividing the calculation window into equidistant rows, the calculation is done through a grid.
Grid cells with trading activity occurring inside them are colored. More activity is highlighted through a gradient and by default, cells with a color that are closer to red indicate that more trading activity took place within that cell. The cell with the highest amount of trading activity is always highlighted in yellow.
Each interval (column) includes a point of control which highlights an estimate of the price level with the highest traded volume on that interval. The level with the highest traded volume of the overall grid is extended to the most recent bar.
Volume ProfileThe "Volume Profile" Indicator is a powerful tool for traders, offering a comprehensive analysis of volume distribution over a specified number of bars. This indicator helps identify key levels of support and resistance, based on volume accumulation, and provides insights into market sentiment.
Features:
• Detailed Volume Analysis: Breaks down volume into up and down movements, total volume, and volume delta, providing a clear view of market activity.
• Customizable Settings: Adjust the number of bars, row size, and value area percentage to tailor the indicator to your trading style.
• Visual Clarity: Display volume profiles on either side of the chart, with color-coded bars for easy interpretation.
• Point of Control (POC) Lines: Highlight the highest volume price levels, with options to show total, bullish, and bearish POC lines.
• Volume Value Labels: Optionally display volume values in real terms or percentages directly on the chart.
Flexibility:
• Placement Options: Position the volume profile on the left or right side of the chart for better visual alignment with your analysis.
• Color Customization: Set distinct colors for different volume types, background, and POC lines to match your charting preferences.
• Label Styles: Choose from different label styles and display modes to best fit your needs.
Enjoy the game!