Market sessions and Volume profile - By LeviathanThis script allows you to keep track of Forex market sessions (Tokyo, London and New York), as well as Daily, Weekly and Monthly sessions. All of them are accompanied by Volume Profile options where you can view VP Histogram, Point of Control, Value Area High and Value Area Low.
Colors, lines and other design preferences are fully customizable.
* Volume Profile of shorter sessions (eg. Tokyo, London, New York) works better when using lower timeframes such as 15min, 5min, etc.
** Use timeframe higher than 15min when viewing Monthly sessions
Indicator settings overview:
SESSION TYPE
- Tokyo session (1:00 - 9:00 UTC/ GMT )
- London session (7:00 - 16:00 UTC/ GMT )
- New York session (13:00 - 22:00 UTC/ GMT )
- Daily session
- Weekly session
- Monthly session
DISPLAY
- Show Volume Profile (Show or hide Volume Profile histogram)
- Show POC (Show or hide Point Of Control line)
- Show VAL (Show or hide Value Area Low line)
- Show VAH (Show or hide Value Area High line)
- Show Live Zone (Show or hide the ongoing session)
VOLUME PROFILE SETTINGS
- Resolution (The higher the value, the more refined of a profile, but less profiles are shown on the chart)
- Smooth Volume Data (Useful for assets that have very large spikes in volume over large bars, helps create better profiles)
APPEARANCE
- Up Volume color (Pick a custom color for up/ bullish volume profile nodes)
- Down Volume color (Pick a custom color for down/ bearish volume profile nodes)
- POC color and thickness (Pick a custom color and thickness for Point Of Control line)
- VAH color and thickness (Pick a custom color and thickness for Value Area High line)
- VAL color and thickness (Pick a custom color and thickness for Value Area Low line)
- Session box thickness (Pick a custom thickness for the session box. Color is provided automatically with optimal contrast)
** Some VP elements are inspired by @LonesomeTheBlue's volume profile script
VAH
Volume/Market ProfileVolume/Market Profile is a 2 in 1 Volume Profile and Market Profile Indicator.
This indicator is my own calculations for compiling a volume profile and market profile.
The profile is progressively calculated live as the chart develops.
I have made use of both Boxes AND Lines to allow me to display a finer granularity profile by displaying up to twice the max amount of lines allowed in tradingview.
I have spent a lot of time to make sure the values are getting appended exactly as intended so that I can assure this profile is operating as precisely as possible within the limitations of the data available.
To make my calculations easier to use in other places, I have made my volume profile a function that can be extracted and used whenever you need values from a volume profile.
Feel free to read through the script if you don't understand how this profile is developed. I have made a commentary of my volume profile function to help you understand what exactly happens to compile the profiles.
As mentioned before, This indicator doubles as a market profile. To view both at the same time you will need to add the indicator on your chart twice.
I have built in comprehensive customizations to allow you to display your profiles however fits your needs.
Timeframe: The aggregation period for profiles, to see a 1 week profile, change the timeframe to 1 week.
Note: You can add custom timeframes by adding a custom timeframe in your chart timeframe dropdown menu. When you add timeframes in this area, they appear as options within indicators with the timeframe input.
Sensitivity: Allows for greater or less granularity changes. The calculation method for granularity automatically changes depending on the range of your chart.
Note: Multiply this value by 100 and that will be the max range (in ticks) of your price before the indicator automatically adjusts to make the profile less granular. (ex. If price ranges $1, and 1 tick is $0.01, granularity will be 0.01 with a sensitivity of 1+)
Value Area %: % of total volume to display as the value zone. (_% of total profile values are contained within the value zone)
Calculate as Market Profile: Uses a 1 Instead of the candle volume, to display a Market Profile. (If selected POC -> TPOC)
Display Size: Sets the # of bars from the profile axis to the profile's max value. If set negative, profile will be displayed left of axis, if positive, profile will be displayed to the right of the axis.
Display Offset: Sets the # of bars in front(or behind) the current chart bar to set the axis of the profile. If negative, the axis will be to the left of the current chart bar, if positive the axis will be right of the current chart bar.
Display Historical POC/VAH/VAL: Choose to display historical poc,vah,val lines.
Colors: I'm not explaining colors.
Enjoy!
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
Value Area POC/VAH/VALThis indicator is a Market Profiling tool used to analyse the Point of Control (POC) and Value Area (VAH/VAL) on the daily, weekly and monthly timeframes. It also optionally displays historical Value Areas to help find confluence with past data.
The Value Area is a range of prices where the majority of trading volume took place on the prior trading day. In specific, this area is the range where 70% of the prior day’s volume happened. The value area is approximately one standard deviation above and below the average highest volume price. With this knowledge, there are specific probabilities of market behavior we can understand to digest the value area. The value area gives us an idea of where the smart money is playing ball and where the institutions are guiding the market. From this data, we can derive intra-day strategies that capitalize on market behavior.
POCs and VAHs VALs - All and Non-BrokenThe "POC and VAH VAL - All and Non-Broken"
POC = Points of Control
VAH = Value Area High
VAL = Value Area Low
This indicator aims to show you on the 5 minute time frame all POCs and VAHs/VALs and Non-Broken POCs and VAHs/VALs.
(Non-Broken are POCS and VAHs/VALS where price action has not since crossed its path)
In the screen image above I have used VPVR to back test on BYBIT:BTCUSDT.
The POCs and VAHs/VALs for each day can be seen.
Also there is an option to see non-broken POCS and VAHs/VALs within the settings.
All display options are selectable within the settings.
The indicator is not as precise as using the VPVR but is a lot quicker and gives you a quick snapshot to assist with your technical analysis.
In the screen shot above are some examples highlighted with yellow circles (resistance at POC and VAHs/VALs).
Thanks goes to:
ahancock for use of his code.
Bjorn Mistiaen on StackOverFlow for his assistance.
Disclaimer:
Indicator has been coded to only show on 5 min time frame (after back testing seemed most accurate).
Only back tested on BYBIT:BTCUST.
There are some slight discrepancies.
Back tested against VPVR settings: Row Size 500, Value Area 70.
Maximum of 500 lines will only be shown.
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
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 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