Rolling Volume Structure: HVN & SentimentTitle:
Rolling Volume Structure: HVN & Sentiment
Description:
This indicator visualizes the distribution of volume over price levels for a user-defined rolling period. It is designed to identify structural market nodes (HVN/LVN) and correlate them with Pivot Points to filter out market noise.
NOTE: This script utilizes a mathematical array binning algorithm to calculate the profile efficiently on the chart timeframe, avoiding the runtime timeouts often associated with standard iterative volume profiles.
How it works (Technical Methodology)
Binning Algorithm: The script calculates the price range (Highest High - Lowest Low) of the lookback period and divides it into a fixed number of vertical bins defined by the Resolution input.
Volume Allocation: It iterates through historical bars once. The volume of each bar is assigned to the corresponding price bin based on the bar's closing price.
Sentiment Approximation: Since tick-level Bid/Ask data is not available for historical bars in standard Pine Script strategies, this indicator estimates directional volume based on candle polarity:
If Close > Open: Volume is categorized as "Up Volume" (Buying Sentiment).
If Close < Open: Volume is categorized as "Down Volume" (Selling Sentiment).
Disclaimer: This is a standard approximation for structural analysis and does not represent true tick-data delta.
Why this Combination? (Originality & Synergy)
This script addresses the problem of validating structural levels. Traders often use Pivots and Volume Profiles separately. This script combines them programmatically to provide context:
Pivot Confluence: A Pivot Point is only plotted if it aligns with significant volume structure.
HVN Validation: A pivot occurring within a High Volume Node (HVN) suggests a high-liquidity reversal zone, whereas a pivot in a Low Volume Node (LVN) may indicate a liquidity void or a "weak" high/low.
The Dashboard summarizes these metrics (Position relative to Value Area, Net Sentiment, and Trend), removing the need for multiple separate indicators.
Educational Use for Beginners
If you are new to Volume Profile, think of the market structure in these simple terms:
Value Area (VA): This is the "Fair Price" zone where 70% of trading happened. If price is inside here, the market is balanced. If price breaks out, it may be starting a trend.
HVN (High Volume Nodes - Colored Boxes): Think of these as "Traffic Jams". Price often slows down, bounces, or gets stuck here because there are many orders. They act as Support or Resistance.
LVN (Low Volume Nodes - Gray Strips): Think of these as "Empty Highways". Because there is little volume here, price tends to move through these zones very quickly to get to the next HVN.
Features
HVN (High Volume Nodes): Colored boxes highlighting areas of high accumulation.
LVN (Low Volume Nodes): Gray strips highlighting gaps or acceleration zones.
Value Area (VA): Displays the VAH, VAL, and PoC (Point of Control).
Volume-Filtered Pivots: Plots pivots only when supported by the profile structure.
Sentiment Coloring: The profile bins are colored based on the net bullish/bearish candle volume.
Settings
Rolling Period: The lookback window size (default 150 bars).
Resolution: Precision of the profile bins (higher = more detail, lower = smoother).
HVN Thresholds: Percentage of PoC volume required to identify a node.
Global Text Size: Adjusts labels and dashboard for 4K or standard screens.
Credits: The core binning logic is adapted from generic open-source array management concepts for custom volume profiles.
Pivot-points
Pivot Points Standard w/ Future PivotsPivot Points Standard with Future Projections
This indicator displays traditional pivot point levels with an added feature to project future pivot levels based on the current period's price action.
Key Features:
Multiple Pivot Types: Choose from Traditional, Fibonacci, Woodie, Classic, DM, and Camarilla pivot calculations
Flexible Timeframes: Auto-detect or manually select Daily, Weekly, Monthly, Quarterly, Yearly, and multi-year periods
Future Pivot Projections: Visualize potential pivot levels for the next period based on current price movement
Custom Price Scenarios: Test "what-if" scenarios by entering a custom close price to see resulting pivot levels
Customizable Display: Adjust line styles, colors, opacity, and label positioning for both historical and future pivots
Historical Pivots: View up to 200 previous pivot periods for context
Future Pivot Options:
The unique future pivot feature calculates what the next period's support and resistance levels would be using the current period's High, Low, Open, and either the current price or a custom price you specify for the closing value. Future pivots are displayed with customizable line styles (solid, dashed, dotted) and opacity to distinguish them from historical levels.
Use Cases:
Plan entries and exits based on projected support/resistance
Scenario analysis with custom price targets
Identify key levels before the period closes
Multi-timeframe pivot analysis
Works on all timeframes and instruments.
Support & Resistance Trendlines with PP + Fib. Channel█ Support & Resistance Trendlines with Pivot Points + Fibonacci Channel
This script automatically draw support and resistance trend lines based on pivot points and add a fibonacci channel.
It will show potential patterns with the help of support and resistance lines as well as breakout target and pullback entry with the fibonacci extension and retracement levels.
It is based on atolelole's script, I only made it more configurable so please check out his script.
I added the possibility to change values and add additional retracement and extension levels.
I also made it customizable with the possibility to change lines color, width and style.
Pivot Order Blocks// How it Works \\
Order Blocks based on pivot reversal candle
When a pivot High or Pivot Low is found and confirmed, a box will be plotted on the open and close values of that pivot candle
// Settings \\
In the settings you have the ability to change the distances required to confirm an pivot High or Low
These are the lengths where the script checks to see if it is at its local high or low.
You also have the ability to change the amount of candles the box stretches over as well as the colors of the bullish and bearish boxes
// Use Case \\
Pivot points often provide Support and Resistance points on their own,
one way of marking up order blocks is by taking the pivot candle and marking that up as a resistance area where you could be looking for price to reverse
// Suggestions \\
Happy for anyone to make any suggestions on changes which could improve the script,
// Terms \\
Feel free to use the script, If you do use the script could you please just tag me as I am interested to see how people are using it. Good Luck!
Logging in Pine ScriptI'm building quite a lot of pretty complicated indicators/strategies in Pine Script. Quite often they don't work from the 1 try so I have to debug them heavily.
In Pine Script there are no fancy debuggers so you have to be creative. You can plot values on your screens, check them in the data window, etc.
If you want to display some textual information, you can plot some info as labels on the screen.
It's not the most convenient way, so with the appearance of tables in Pine Script, I decided to implement a custom logger that will allow me to track some useful information about my indicator over time.
Tables work much better for this kind of thing than labels. They're attached to your screen, you can nicely scale them and you can style them much better.
The idea behind it is very simple. I used few arrays to store the message, bar number, timestamp, and type of the message (you can color messages depend on the type for example).
There is a function log_msg that just append new messages to these arrays.
In the end, for the last bar, I create the table and display the last X messages in it.
In parameters, you can show/hide the entire journal, change the number of messages displayed and choose an offset. With offset, you can basically scroll through the history of messages.
Currently, I implemented 3 types of messages, and I color messages according to these types:
Message - gray
Warning - yellow
Error - red
Of course, it's a pretty simple example, you can create a much fancier way of styling your logs.
What do you think about it? Is it useful for you? What do you use to debug code in Pine Script?
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as good as in historical backtesting.
This post and the script don’t provide any financial advice.
Chonky Pivot Pointsstandard pivot points re-written with circle plots.
Only shows the current pivot points. P, R1/R2, S1/S2
I don't use R3, R4 etc. so I didnt include them but feel free to modify the code.
You can change the resolution in indicator settings, default is set to Monthly.
Also to change the size of the circles all at once, you can input a number 1-4 in the inputs section.










