Session TPO Market ProfileIntroduction
Wikipedia: A Market Profile is an intra-day charting technique (price vertical, time/activity horizontal) devised by J. Peter Steidlmayer, a trader at the Chicago Board of Trade (CBOT), ca 1959-1985. Steidlmayer was seeking a way to determine and to evaluate market value as it developed in the day time frame. The concept was to display price on a vertical axis against time on the horizontal, and the ensuing graphic generally is a bell shape--fatter at the middle prices, with activity trailing off and volume diminished at the extreme higher and lower prices. In this structure he recognized the 'normal', Gaussian distribution he had been introduced to in college statistics.
Important : The market profile tool is designed to be used on the 30min timeframe, however, you can modify its parameters and use it on lower timeframes (15/10/5min)
This indicators displays the following information
Session open
TPO
Value area calculation zone
POC
Highlight of Single prints
Session High/Low
The current price (TPO Profile is often used isolated without any candlesticks on it)
Parameters
Session beginning configuration (not coded with a session input yet)
Number of candles to use for calculation (default 13 for a single session)
Extend yesterday's levels (VAH/VAL/POC)
Show/Hide Market profile calculation area (background color)
Bars number (number of rows that will be used to draw the profile)
Show/Hide TPO's
TPO Colors customization (For in/out of VA, VAL/VAH/POC/High/Low levels and single prints)
Show/Hide High/Low levels
Show/Hide VAL/VAH/POC Levels as lines
Enable/Disable Single prints highlighting
Value area size (as percent)
Show/Hide current price (corresponding to a line scaled on the "close" price)
Additional Notes
Each session is drawn when the day is over
To use as much space as possible, TPO's are not directly drawn on the area of their calculation (which can be confusing if you use candlesticks directly over it)
This script will probably be updated in the future (especially concerning its implementation which is a bit spaghetti coded for now) .
If you have interesting suggestions about new features that are usual within market profile tools and missing from this script , don't hesitate to suggest it.
POC
Market Profile Fixed ViewSome instruments does not provide any volume information, therefore, as a fixed volume profile user, I needed a fixed market profile indicator to use the same principles, regardless of whether the volumes are available or not.
This script draws a market profile histogram corresponding to price variations within a specific duration, you only need to specify Start and End date/time values to see the histogram on your chart.
Details
Two lines corresponding to highest/lowest prices are displayed around the histogram
The redline corresponds to the POC (point of control)
Options
Start calculation
End calculation
Bars number (histogram resolution, currently locked to a max value of 50 bars)
Display side/Width (allows to modify size of bars, to the left or to the right)
Bars/Borders/POC Color customization
Notes
This script will probably be updated (to add VAH/VAL zones, and maybe other options). However, some common market profile attributes have not been implemented yet since I don't really use them)
Market Profile Visible RangeSup TV, 2 important points .
1) surprisingly, it's the first MP Visible Range script on TV;
2) This one doesn't use any bagging/binning*, instead each row represents the time spent on the actual minimal price steps (aka ticks).
The script will be further extended with usual market profile related functionally in future updates. At this point we have:
- Profile itself (each row represents how many bars touch the given price);
- Mode of the profile (called POC)**;
* Still it will be introduced in future when I will find / design the proper aggregating technique. It is vital for processing very wide price ranges (for example, 500 days on ES futures).
** The script correctly calculates POC by finding all the modes in the data & choosing the closest one to data's midrange.
For this kind of technical instrument finally it was more convenient to use Pine Script 5 (btw it's my first Pine 5).
Basically this script is a side-effect of another R&D I'm doing, the stuff is useful tho so let's go.
By choosing length we both specify the amount of data to be processed & the profile's location screen-wise. It's pretty cool and & useful, on my screen it's always almost touching the left side and still always visible.
The code is heavily commented in order to be understood fast, nothing fantastic, just a lil patience required this time.
Rationale
Market & volume profiles are well known concepts, lotta info available, the most important point of all that is that MP is just another way of visualizing data that lets you notice things you don't usually notice on sequential charts. From my side I can only add that it's better to use your own brain for thinking and reconsidering using volume profile in all the cases, especially on decentralized markets (unless you're aggregating ALL the volume data from everywhere, including options, OTC etc).
Here is it, for you
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.
Low Timeframe POCI have recently made a High Timeframe POC script (HFT POC) which is pretty popular. Thanks for this!
There are many requests to include lower timeframes in this script, that is why I created this script. I could have incorporated all the timeframe POC's into one indicator but I went this route to keep things more organized between all the different timeframes.
Currently included: Daily, 6H, 3H and 1H
/* DEFINITION */
Point Of Control (= POC) is a price level at which the heaviest volumes were traded.
/* HOW TO TRADE WITH THIS INDICATOR */
The basis for POC is determining bias on whichever timeframe you choose.
1. Identify a POC on the timeframe of your choosing.
/* If you choose the lowest timeframe (1H here) then always make sure to look at the higher timeframes to see how it is trading against a HTF POC.
2. When the price is moving away from the POC (either to the upside or downside) this can confirm or invalidate a trade.
3. You can now enter the trade on bias or wait for a retest of the same POC.
/* EXAMPLE TRADES /*
Here is a screenshot of some of the trades that are possible using these Low Timeframe POC's and some common sense.
s3.tradingview.com
High Timeframe POCBecause the big Bitcoin crash I have been looking a lot at high timeframe metrics. I never spent much time learning POC so I decided to create a little script for determining these on higher timeframes.
Currently included: Monthly, 3 months and 6 months.
/* DEFINITION */
Point Of Control (= POC) is a price level at which the heaviest volumes were traded.
Value Area High/Low (=VAH/VAL) is a range of prices where the majority of trading volume took place. Naturally, Value Area High being the top price level and Value Area Low being the lowest. POC always is between the two.
/* HOW TO TRADE WITH THIS INDICATOR */
The basis for POC is determining bias on whichever timeframe you choose.
1. Identify a POC on the timeframe of your choosing.
/* If you choose a "low" timeframe (monthly here) then make sure to look at the higher timeframes to see how it is playing against a higher timeframe POC.
2. When the price is moving away from the POC (either to the upside or downside) this will confirm or invalidate the trade.
3. You can now enter the trade on bias or wait for a retest of the same POC.
/* EXAMPLE TRADES /*
Here is a screenshot of some of the trades that are possible solely using the POC and some common sense.
s3.tradingview.com
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 [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.
Chart Champions - Part 2 - CCV IBs POCsThank you for sparing you time to read my indicator.
This indicator has been created as a suite of 3. This was to ensure that those with only the Free Trading View account could benefit (with their restriction to 3 indicators). Please ensure you install each indicator and read each indicator write up to fully understand what has tried to achieved.
Chart Champions – Part 1 –Lvls nPOC VWAPS
This indicator is broken down into:
• Levels
• VWAPS
• Naked Point of Control
Levels
It displays the levels to the right of the price Axis to enable the user to have a cleaner chart.
The below levels will automatically appear:
dOpen – pdHigh – pdLow – pdEQ – pwEQ
Optional Levels include:
mOpen – pmOpen – pdOpen – dbyOpen – wOpen – pwOpen
VWAPs
Optional VWAPs
Daily (including pdVWAP close) – Weekly – Monthly
Naked Points of Control (nPOC)
To view the nPOC move the chart back in time to pick up the nPOCs.
Chart Champions – Part 2 – CCV IBs POC
This indicator is broken down into:
• Chart Champions Value
• Initial Balance
• Points of Control
Chart Champions Value (CCV)
CCV is based on the 80% rule of the dOpen opening outside of the pdVAH/pdVAL. Please do you own research to fully understand how this trading strategy works (readily avaliable online).
Initial Balance (IB)
IB is based on the first 60 minutes of the market opening. It captures the highest and lowest points within that 60 minutes. Please do you own research to fully understand how this trading strategy works (readily avaliable online).
Points of Control (POCs)
POC are the price levels where the most volume was traded.
Developing POC (dPOC) will constantly move with volume/price action through out the day.
Optional POCs
Previous Day POC (pdPOC) – Day Before Yesterday POC (dbyPOC)
Chart Champions – Part 3 – Sessions - Manual Input
This indicator is broken down into:
• Manual Inputs (daily, weekly, monthly)
• IGOR SessionsTtimes
• Pre + Market Openings
Manual Input
Daily x3
Weekly x 3
Monthly x 3
This allows the trader to put in specific levels.
IGOR Session Times
This is a user specific requirement to highlight cetain times during the day, displayed at the bottom of the chart in the colour strip.
Pre + Market Openings
This allows the user to see when pre market trading has started and with the live maket has started, displayed at the top of the chart in colours.
A huge thank you goes out to:
Stackoverflow users AnyDozer and Bjorn.
TV user ahancock for allow me use of this code.
Disclaimer the lower the timeframe the more information it processes.
Trading Ideas - Chart Champions Value - Points of Interest Trading Ideas is based on having visual Points of Interest.
The indicator displays:
- dOpen : Daily Open
- dPOC: Developing Point of Control
- pdPOC : Previous Day Point of Control
- dbyPOC : Day Before Yesterday Point of Control
Initial Balance (High, low, mid points for the first hour (UTC 0000)
- IB High : Initial Balance High
- IB Mid : Initial Balance Middle
- IB Low : Initial Balance Low
Chart Champions Value ( CCV ) is based on Daniel - Chart Champions theory explained in his educational videos.
That if the previous day is a range day and price action (PA) closes:
Above the previous days Value Area High (pdVAH) then there is an 80% chance of it retracing back to previous days Value Area Low (pdVAL)
Below the previous days Value Area Low (pdVAL) then there is an 80% chance of it going back up to the previous days Value Area High (pdVAH)
The CCV check can be ticked on and off for a quick visual to see if the setup could potentially be in play (if green then CCV could be play for that day).
Settings/Configuration
The calculated Value Area (VA) can be amended.
It is recommend to change the resolution to that of your symbol. For example BTC resolution 1, XRP resolution 0.00001.
As seen below having key Points of Interest can make you think twice before going into a trade:
My thanks go to:
ahancock for allowing usage of his script.
AnyDozer and Bjorn Mistiaen on Stack Overflow for all their assistance.
Any feedback will be gratefully received.
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
Leledc levels (IS) LeveLeledc - Exhaustion levels (InSilico)
Method for zero confirmation support/resistance level detection using Leledc Exhaustion Bars
Study is extension/mod of glaz script ,its implementing simple but unorthodox use-case for "Leledc Exhaustion Bars"
More information on core function in source scripts page ->
P.s Written quickly and spontaneously
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