Range Detect SystemTechnical analysis indicator designed to identify potential significant price ranges and the distribution of volume within those ranges. The system helps traders calculate POC and show volume history. Also detecting breakouts or potential reversals. System identifies ranges with a high probability of price consolidation and helps screen out extreme price moves or ranges that do not meet certain volatility thresholds.
⭕️ Key Features
Range Detection — identifies price ranges where consolidation is occurring.
Volume Profile Calculation — indicator calculates the Point of Control (POC) based on volume distribution within the identified range, enhancing the analysis of market structure.
Volume History — shows where the largest volume was traded from the center of the range. If the volume is greater in the upper part of the range, the color will be green. If the volume is greater in the lower part, the color will be red.
Range Filtering — Includes multi-level filtering options to avoid ranges that are too volatile or outside normal ranges.
Visual Customization — Shows graphical indicators for potential bullish or bearish crossovers at the upper and lower range boundaries. Users can choose the style and color of the lines, making it easier to visualize ranges and important levels on the chart.
Alerts — system will notify you when a range has been created and also when the price leaves the range.
⭕️ How it works
Extremes (Pivot Points) are taken as a basis, after confirming the relevance of the extremes we take the upper and lower extremes and form a range. We check if it does not violate a number of rules and filters, perform volume calculations, and only then is the range displayed.
Pivot points is a built-in feature that shows an extremum if it has not been updated N bars to the left and N bars to the right. Therefore, there is a delay depending on the bars specified to check, which allows for a more accurate range. This approach allows not to make unnecessary recalculations, which completely eliminates the possibility of redrawing or range changes.
⭕️ Settings
Left Bars and Right Bars — Allows you to define the point that is the highest among the specified number of bars to the left and right of this point.
Range Logic — Select from which point to draw the range. Maximums only, Minimums only or both.
Use Wick — Option to consider the wick of the candles when identifying Range.
Breakout Confirmation — The number of bars required to confirm a breakout, after which the range will close.
Minimum Range Length — Sets the minimum number of candles needed for a range to be considered valid.
Row Size — Number of levels to calculate POC. *Larger values increase the script load.
% Range Filter — Dont Show Range is than more N% of Average Range.
Multi Filter — Allows use of Bollinger Bands, ATR, SMA, or Highest-Lowest range channels for filtering ranges based on volatility.
Range Hit — Shows graphical labels when price hits the upper or lower boundaries of the range, signaling potential reversal or breakout points.
Range Start — Show points where Range was created.
Profile
Weekly Profiles [TFO]This Weekly Profiles indicator was built to overlay historical data to show how prior weeks of price action have unfolded under specified input conditions.
When "Show Historical Weekly Profiles" is enabled, the indicator draws out how prior weeks have traded. This is done by tracking weekly price movements, measuring the percent change from each week's respective weekly open price, and translating that percent change to the current week's open price to visually describe how price fluctuated in those previous weeks.
With "Show Weekly Profile Table" enabled, we can observe some basic statistics on the weekly profiles that have been collected, such as the average range and which days have made the high/low of the week from the given dataset.
There are also options to refine the dataset by specifying which days have made the high/low of the week, which will only show profiles that meet said criteria. For instance, by enabling "Low of Week" and selecting "Monday", the indicator will show every weekly profile that made its low on a Monday. In the following chart, we can again use the table to observe that we currently have 14 such weeks on NQ1! (from the data available on our current chart timeframe and TradingView plan), whose average range is 3.65% from the week's low to the week's high, and from those 14 weeks, the high of the week was made on a Friday 10 times or 71% of the time.
The "Profile Resolution" option specifies the interval at which to show changes in price (given that it is greater than or equal to the current chart timeframe). In the below chart, the Profile Resolution is set to 4 hours. As such, it simplifies the profiles by tracking the close price of each 4 hour candle (again as a percent change from each profile's respective open price). The larger Profile Resolution can make it easier to observe commonalities between profiles, such as the below chart of NQ1! that highlights a noticeable price decrease during the New York morning session across several of the available weekly profiles.
There is also an option to "Highlight Closest Profiles" which does exactly that. Essentially, all weekly profiles are given a score according to how close the current week's price action is matching each profile up until the current point in time. For example, if one were observing this indicator on a Wednesday afternoon, each profile would be scored according to how close price is to each profile, starting from the weekly open, up until the Wednesday afternoon of each profile. Everything after that point in time is disregarded since it hasn't happened yet and can't be measured. With this in mind, profiles with greater similarity to the current week are highlighted with deeper colors, and profiles with lesser similarity are given lighter, more transparent colors.
The "Randomize Colors" option will use various colors for the weekly profiles for easier visual differentiation (especially where there are several profiles crowding each other), as opposed to otherwise having one color for all profiles. Lastly, there are basic styling options to control the table position, table size, and the line width of all weekly profiles.
Rolling Price Activity Heatmap [AlgoAlpha]📈 Rolling Price Activity Heatmap 🔥
Enhance your trading experience with the Rolling Price Activity Heatmap , designed by AlgoAlpha to provide a dynamic view of price activity over a rolling lookback period. This indicator overlays a heatmap on your chart, highlighting areas of significant price activity, allowing traders to spot key price levels at a glance.
🌟 Key Features
📊 Rolling Heatmap: Visualize historical price activity intensity over a user-defined lookback period.
🔄 Customizable Lookback: Adjust the heatmap lookback period to suit your trading style.
🌫️ Transparency Filter: Fine-tune the heatmap’s transparency to filter out less significant areas.
🎨 Color Customization: Choose colors for up, down, and highlight areas to fit your chart’s theme.
🔄 Inverse Heatmap Option: Flip the heatmap to highlight less active areas if needed.
🛠 Add the Indicator: Add the Indicator to favorites. Customize settings like lookback period, transparency filter, and colors to fit your trading style.
📊 Market Analysis: Watch for areas of high price activity indicated by the heatmap to identify potential support and resistance levels.
🔧 How it Works
This script calculates the highest and lowest prices within a specified lookback period and divides the price range into 15 segments. It counts the number of candles that fall within each segment to determine areas of high and low price activity. The script then plots the heatmap on the chart, using varying levels of transparency to indicate the strength of price activity in each segment, providing a clear visual representation of where significant trading occurs.
Stay ahead of the market with this powerful visualization tool and make informed trading decisions! 📈💼
Pivot Point Profile [LuxAlgo]The Pivot Point Profile indicator groups and displays data accumulated from previous pivot points, providing a comprehensive method for prioritizing and displaying areas of interest directly given by swing highs and lows.
Users have access to common settings present in other profile-type indicators.
🔶 USAGE
The Pivot Point Profile is particularly helpful in identifying highly active reversal zones that have been visited multiple times by price. Because of this, we could generally expect these areas to serve as future points of interest, often acting as support or resistance when re-visited.
The profile displays data associated with both Pivot Highs and Pivot Lows. Each row consists of pivot high and pivot low counts side-by-side, forming the total width of the row.
By analyzing the row as a whole, we can gain a better understanding of WHERE to look for interactions.
By analyzing the pivot counts independently, we can gain a better understanding of WHAT to expect when returning to these areas.
For example:
If a row in the profile contains entirely Pivot Lows, this could be seen as an indication to look for buyers to hold that level for a continuation upwards. A break of this level could be interpreted as a lack of interest from previous buyers at this level, indicating a further move down.
🔹 Concentrated Areas
Each row in the profile displays the current count of high pivots and low pivots within the selected lookback. The largest count for each pivot direction is identified as a "Concentrated Area (CA)", these CAs are highlighted over the chart with a line displaying the average of all pivots within that CA. The CA Average is the average of all pivot points (in the majority direction) within the given row.
These can hold more importance as potential support/resistance areas.
Note: The CA Threshold can be manually adjusted to highlight all rows based on a user-selected value.
🔶 DETAILS
🔹 Calculation
The idea behind the Pivot Point Profile is a new analysis method for pivot points, taking the idea of a volume profile and adapting it to display pivot points instead of volume. By using this data, in theory, we should be able to better prioritize zones to anticipate reversals, as well as identify key levels to watch for buyer & seller interactions to use as confirmations in direction.
The (vertical) width of each row is the product of the script's "Row Size", this is the number of rows that the profile will consist of. With a max of 250, the profile can be decently granular. That being said, A more granular profile will have fewer overlapping pivot points. By decreasing the row size (Using fewer rows in the profile) you will increase the tolerance for grouping pivot points. Potentially leading to a more comprehensive Profile. Inversely, By reducing the tolerance for grouping, you will better visualize only similar highs and lows but may have noisier data to sift through.
The Profile is calculated based on a "Lookback" parameter, using only the lookback amount of previous high and low pivots to calculate the profile. Configuring this parameter alongside "Pivot Length", will allow for great control over the frame of reference of the profile.
Note: This indicator is capable of utilizing the full chart history of pivot points, this can be done by enabling the "Use Full Chart History" setting, this will cause the script will calculate from everything it has access to on your current chart.
🔹 Display
The Pivot Point Profile display can be customized to fit a various range of chart styles and visual needs. The specific settings to adjust these can be located in the "Profile Display" Section of the User Inputs.
Profile Width: Sets the Left to Right Width of the Profile. This is the maximum width that the profile will occupy and will scale to fit within this width.
Profile Offset: Sets the distance of the Profile's Axis from the current chart candle. This moves the entire profile left and right to enable to user to set the distance between the profile and the current candle.
Direction: Changes the display direction of the profile, allowing for "Left", "Right", or "Center" display styles.
🔶 SETTINGS
🔹 Pivot Point Parameters
Pivot Type: Choose between "Fractal Pivots" or "SMC Structure" to use as the basis for pivots.
Length: Sets the length for the pivot calculations.
🔹 Profile Calculations Parameters
Lookback: Sets the number of pivots to calculate within, in increments of high and low pairs. (Setting this to 1 = 1 Pivot High & 1 Pivot Low)
Use Full Chart History: Disregards the set lookback and instead uses all available chart data to calculate from.
Row Size: Sets the total number of rows to calculate the profile with.
🔹 Profile Display
Profile Width: Sets the max left & right width (in bars) that the profile will occupy.
Profile Offset: Sets the distance of the profile axis from the last chart bar.
Direction: Sets the display direction
🔹 Concentrated Areas
Highlight CAs: Extends the rows left from concentrated areas.
CA Threshold: Manually set the threshold for determining concentrated areas, when disabled, only the largest rows will be displayed.
CA Averages: Toggles the concentrated area averages for each pivot direction.
Note: CA Averages can be displayed independently without CA Highlights being displayed, and vice versa.
Volume Positive & Negative Levels [ChartPrime]Volume Positive & Negative Levels
Overview:
The Volume Positive & Negative Levels indicator by ChartPrime is designed to provide traders with a clear visualization of volume activity across different price levels. By plotting volume levels as histograms, this tool helps identify significant areas of buying (positive volume) and selling (negative volume) pressure, enhancing the ability to spot potential support and resistance zones.
Key Features:
⯁ Lookback Period:
- The `lookbackPeriod` parameter, set to 500 bars, determines the range over which the volume analysis is conducted, ensuring a comprehensive view of the market’s volume activity. The maximum lookback period is 500 bars or the bars currently visible on the chart, whichever is smaller.
⯁ Dynamic Volume Calculation:
- Volume is calculated dynamically based on the price action, with positive volume indicating buying pressure (close > open) and negative volume indicating selling pressure (close < open).
⯁ Color Coding for Clarity:
- Positive Volume: Represented with a distinct color (`#ad9a2c`), making it easy to identify areas of buying interest.
- Negative Volume: Highlighted with another color (`#ad2cad`), simplifying the detection of selling pressure.
Volume Threshold and Bins:
- The indicator allows users to set a volume threshold (`volume_level`) to highlight significant volume levels, with the default set at 70.
- The number of bins (`numBins`) defines the granularity of the volume profile, with a higher number providing more detail.
⯁ Volume Profile Visualization:
- The volume profile is plotted as a histogram, with the height of each bar proportional to the volume at that price level. This visualization helps in quickly assessing the strength of volume at various price points.
⯁ Interactive Labels and Threshold Indicators:
- Labels: The indicator uses labels to mark significant volume levels, providing quick reference points for traders.
- Threshold Lines: Lines are drawn at specified volume thresholds, with colors and widths dynamically adjusted based on the volume levels.
⯁ User Inputs:
- Volume Threshold (`volume_level`): Sets the minimum volume required to highlight significant levels.
- Number of Bins (`numBins`): Determines the resolution of the volume profile.
- Line Width (`line_withd`): Specifies the width of the lines used in the visualization.
The Volume Positive & Negative Levels indicator is a powerful tool for traders looking to gain deeper insights into market dynamics. By providing a clear visual representation of volume activity across different price levels, it helps traders identify key support and resistance zones, spot trends, and make more informed trading decisions. Whether you are a day trader or a swing trader, this indicator enhances your ability to analyze volume data effectively, improving your overall trading strategy.
Open Liquidity Heatmap [BigBeluga]Open Liquidity Heatmap is an indicator designed to display accumulated resting liquidity on the chart.
Unlike any other liquidity heatmap, this aims to accumulate liquidity at specific levels that build up over time, showing larger areas of liquidity.
🔶 FEATURES
The indicator includes the following settings:
Lookback : Used to determine the range calculation of the heatmap.
Leverage : Leverage of the liquidation (Counted as % in price, Example: 4.5 will return a distance from price of 4.5%, indicating any possible resting liquidity in this range).
Levels : Amount of levels to display (Each level is counted as liquidity resting on the chart; fewer levels will return a bigger area of liquidity sitting on the chart).
Mode : Apply a color gradient from the minimum liquidation to the maximum liquidity level. Set the maximum color gradient value (Counted as volume).
Offset : Automatically determine the offset range of the Volume Profiles. Manual offset of the Volume Profiles.
🔶 CALCULATION
for i = 0 to step - 1
float plotter = na
switch i
0 =>
plotter := hs
=>
plotter := hs - diff * ( i )
cls.hm.gnL(plotter)
cls.vp.put(plotter, 0)
We calculate levels like a normal volume profile with steps, from the highest point within the lookback to the lowest one. Each level will contain the corresponding amount of volume that the candle has closed in that range.
As we can see in the image above, we add liquidity each time the distance in % from price is between two levels.
Unlike many liquidity indicators that provide a single candle liquidity heatmap, this aims to add up liquidity (volume) in already present levels.
This can be extremely useful to see which levels are likely to be more liquid and tend to get a bigger reaction to the price.
Imagine it like a range of levels that each time price revisits that area, a new position area is added; we add volume in that area each time price visits that zone. Liquidity builds up in those zones, causing a bigger reaction to the price once the price visits it.
This indicator is not the same as a single candle heatmap like many others. What is a single candle heatmap?
A single candle heatmap is when a level is created on every new candle, coloring the level based on the total volume of it.
This indicator, on the contrary, aims to provide a more specific use by adding up liquidity each time price visits it.
🔶 BASIC DEMOSTRATION
This is a basic demonstration of how we can spot high liquidity points overall using confluence:
We see the POC of the liquidation in a low volume area of the normal volume profile adding up as confluence.
Resistance from the POC Volume Profile suggesting price will go lower.
Major long open liquidity down.
As we can see, price takes out all the long liquidity and right after pumping, indicating that all the major liquidity got taken out.
Some key note to take is that a POC in the liquidation heatmap in a low volume area of the normal Volume Profile add confluence of a possible big reaction in that zone.
In the forex market, we suggest to use a low distance from price (Leverage) while in a crypto market you can use the one that fit the best the current timeframe.
🔶 CONCLUSION
This indicator aims to show open resting liquidity that had built up over time, showing the most amount of liquidation in specific areas in an aggregated way unlike many liquidation heatmap indicators that show single-level liquidation.
🔶 RELATED SCRIPT
Volume Footprint Voids [BigBeluga]Volume Footprint Voids is a unique tool that uses lower timeframe calculation to plot different styles of single candle POC.
This indicator is very powerful for scalping and finding very precise entry and exits, spotting potential trapped traders, and more.
Unlike many other volume profiles, this aims to plot single candle profiles as well as their own footprints.
🔶 FEATURES
The script includes the following settings:
Windows: Plotting style and calculations
Coloring modes
Display modes
lower-timeframe calculations
🔶 CALCULATION
In the image above we can see how the script calculates each level position that will serve as a calculation process to see how much volume/closes there are within the levels.
In the image above, we can have a more clear example of how we count each candle close.
We use the prior screenshot as an example, after setting each level we will use the lower-timeframe input to measure the amount of closes within the ranges.
Depending on the lot size, the box will be larger or smaller, usually the POC will always have the highest box size.
NOTE: Size is the starting point, always from the low of the candle.
To find more voids, select a closer LTF to the current one you're using.
To find fewer voids, select a timeframe away from your current one.
Due to Pine Script limitations, we are only able to plot a certain amount of footprints, and we can't plot the whole history chart.
POC will be the largest block displayed, indicating the time point of control
Gray areas are closes above the average
Black are Void or imbalance that price will fill in the future, like FVG
The image above shows an incorrect size input that will lead to bad calculations, while on the other side, a correct size input that will lead to a clear vision and better calculation.
🔶 WINDOWS
The "▲▼" Mode will display delta buyers and delta sellers coloring with voids as black.
It also offers a gradient mode for a beautier visualization
The "Total Volume" mode will display the net volume within the lot size (closes within the levels).
This is useful to spot possible highest net volume within the same highest lot size.
The "POC + Gaps" will show both POC and Gaps as the highest block while all the rest will be considered as the smaller block.
This is useful to see where the highest lot were and if there are higher or lower imbalances within the candle
The last option "Gaps" will simply display the gaps as the highest block, while the POC as the lowest block.
This is useful to have a better view of the gaps areas
🔶 EXAMPLE
This is one of the most basic examples of how this script can be used. POC at the bottom creating a strong support area as price holds and creates higher voids gap that price fills while rising.
🔶 SETTINGS
Users have full control over the script, from colors to choosing the lower-timeframe inputs to disabling the lot size.
Intraday Volume Profile [BigBeluga]The Intraday Volume Profile aims to show delta volume on lower timeframes to spot trapped shorts at the bottom or trapped longs at the top, with buyers pushing the price up at the bottom and sellers at the top acting as resistance.
🔶 FEATURES
The indicator includes the following features:
LTF Delta precision (timeframe)
Sensibility color - adjust gradient color sensitivity
Source - source of the candle to use as the main delta calculation
Color mode - display delta coloring in different ways
🔶 DELTA EXAMPLE
In the image above, we can see how delta is created.
If delta is positive, we know that buyers have control over sellers, while if delta is negative, we know sellers have control over buyers.
Using this data, we can spot interesting trades and identify trapped individuals within the candle.
🔶 HOW TO USE
In the image above, we can see how shorts are trapped at the bottom of the wick (red + at the bottom), leading to a pump also called a "short squeeze."
Same example as before, but with trapped longs (blue + at the top).
This can also work as basic support and resistance, for example, trapped shorts at the bottom with positive delta at the bottom acting as strong support for price.
Users can have the option to also display delta data within the corresponding levels, showing Buyers vs Sellers for more precise trading ideas.
NOTE:
User can only display the most recent data for the last 8 buyers and sellers.
It is recommended to use a hollow candle while using this script.
Volume Profile PlusThis indicator provides a high-resolution and high-precision implementation of Volume Profile with flexible range settings. Its key features include:
1. Support for a high resolution of up to 2,500 rows.
2. Capability to examine lower timeframe bars (default 5,000 intra-bars) for enhanced precision.
3. Three range modes — "Visible Range", "Anchored Range", and "All Range".
4. Highlighting of Point of Control and Value Area.
5. Extensive customization options allowing users to configure dimensions, on-chart placements, and color schemes.
🔵 Settings
The settings screen, along with the explanations for each setting, is provided below:
🔵 High Resolution using Polyline
Inspired by @fikira, this indicator utilizes the newly introduced `polyline` type in PineScript to plot the volume profile. It employs a single polyline instance to represent the entire histogram. With each polyline instance supporting up to 10,000 points and each histogram row requiring 4 points, this indicator can accommodate 2500 rows, resulting in a significantly higher resolution compared to conventional volume profile indicators that use `line`s or `box`es to draw the histogram.
🔵 High Precision Data-binning using Lower Timeframe Data
Conventional volume profile indicators often face one or both of the following limitations:
1. They only consider volume within the chart's current timeframe.
2. They assign each bar's total volume to a single price bucket based on the bar's average price, rather than distributing volume across multiple price buckets.
As a result, when the number of bars in the chart is low, those indicators may provide imprecise results, making it difficult to accurately identify significant volume nodes and the point of control.
To address these limitations and enhance accuracy, this indicator examines data from lower timeframes and distributes the volume to fine-grained price buckets. It intelligently selects an appropriate lower timeframe to ensure precise output while complying with a maximum specified number of bars to maintain good performance.
🔵 Three Range Modes
This indicator offers users the flexibility to choose from three range modes:
1. Visible Range (Default Mode): In this mode, the volume profile calculation begins at the time of the left-most bar displayed in the current viewport. As the user scrolls through the viewport, the volume profile updates automatically.
2. Anchored Range: This mode allows the user to set the start time either by using the datetime input boxes or by dragging the anchor line on the chart.
3. All Range: In this mode, the volume profile calculation is based on all the historical bars available in the chart.
Heat profileA trader once told me that top wicks equals sell interest and bottom wicks equals buy interest. If that's true then this indicator tries to organize and visualize this idea.
It uses transparent boxes to give the impression of a heat map. Due to limitations of my own skill and possibly pinescript it is not possible to render it in a useful manner using different colors that depicts buy and sell interests respectively. This means it works more like a volume profile in that it mixes the buy and sell interest together in the heat map. This can still be helpful because it help traders focus their attention on areas other than the current price candle.
In my limited time of using it, it seems like on the large timeframes the highlighted areas is where the price wants to go, and on small time frames the darkest areas is where the price wants to go. But i will leave it up to any user to spot and use their own patterns with the indicator.
Last but not least, the indicator only uses the last 50 candles, which can be too little on a small timeframe. Unfortunately the way i have done it this limitation is hardcoded in the script due to how pinescript works, by editing the code you can increase it. (Put max_boxes_count = x after overlay = true. Maximum number is 500)
Hope you enjoy. Have a nice day.
OI Visible Range Ladder [Kioseff Trading]Hello!
This Script “OI Visible Range Ladder” calculates open interest profiles for the visible range alongside an OI ladder for the visible period!
Features
OI Profile Anchored to Visible Range
OI Ladder Anchored to Visible Range
Standard POC and Value Area Lines, in Addition to Separated POCs and Value Area Lines for each category of OI x Price
Configurable Value Area Targets
Curved Profiles
Up to 9999 Profile Rows per Visible Range
Stylistic Options for Profiles
Up to 9999 volume profile levels (Price levels) can be calculated for each profile, thanks to the new polyline feature, allowing for less aggregation / more precision of open interest at price.
The image above shows primary functionality!
Green profiles = Up OI / Up Price
Yellow profiles = Down OI / Up Price
Purple profiles = Up OI / Down Price
Red profiles = Down OI / Down Price
The image above shows POCs for each OI x Price category!
Profiles can be anchored on the left side for a more traditional look.
The indicator is robust enough to calculate on “small price periods”, or for a price period spanning your entire chart fully zoomed out!
That’s about it :D
This indicator is Part of a series titled “Bull vs. Bear” - a suite of profile-like indicators.
Thanks for checking this out!
If you have any suggestions please feel free to share!
lib_profileLibrary "lib_profile"
a library with functions to calculate a volume profile for either a set of candles within the current chart, or a single candle from its lower timeframe security data. All you need is to feed the
method delete(this)
deletes this bucket's plot from the chart
Namespace types: Bucket
Parameters:
this (Bucket)
method delete(this)
Namespace types: Profile
Parameters:
this (Profile)
method delete(this)
Namespace types: Bucket
Parameters:
this (Bucket )
method delete(this)
Namespace types: Profile
Parameters:
this (Profile )
method update(this, top, bottom, value, fraction)
updates this bucket's data
Namespace types: Bucket
Parameters:
this (Bucket)
top (float)
bottom (float)
value (float)
fraction (float)
method update(this, tops, bottoms, values)
update this Profile's data (recalculates the whole profile and applies the result to this object) TODO optimisation to calculate this incremental to improve performance in realtime on high resolution
Namespace types: Profile
Parameters:
this (Profile)
tops (float ) : array of range top/high values (either from ltf or chart candles using history() function
bottoms (float ) : array of range bottom/low values (either from ltf or chart candles using history() function
values (float ) : array of range volume/1 values (either from ltf or chart candles using history() function (1s can be used for analysing candles in bucket/price range over time)
method tostring(this)
allows debug print of a bucket
Namespace types: Bucket
Parameters:
this (Bucket)
method draw(this, start_t, start_i, end_t, end_i, args, line_color)
allows drawing a line in a Profile, representing this bucket and it's value + it's value's fraction of the Profile total value
Namespace types: Bucket
Parameters:
this (Bucket)
start_t (int) : the time x coordinate of the line's left end (depends on the Profile box)
start_i (int) : the bar_index x coordinate of the line's left end (depends on the Profile box)
end_t (int) : the time x coordinate of the line's right end (depends on the Profile box)
end_i (int) : the bar_index x coordinate of the line's right end (depends on the Profile box)
args (LineArgs type from robbatt/lib_plot_objects/24) : the default arguments for the line style
line_color (color) : the color override for POC/VAH/VAL lines
method draw(this, forced_width)
draw all components of this Profile (Box, Background, Bucket lines, POC/VAH/VAL overlay levels and labels)
Namespace types: Profile
Parameters:
this (Profile)
forced_width (int) : allows to force width of the Profile Box, overrides the ProfileArgs.default_size and ProfileArgs.extend arguments (default: na)
method init(this)
Namespace types: ProfileArgs
Parameters:
this (ProfileArgs)
method init(this)
Namespace types: Profile
Parameters:
this (Profile)
profile(tops, bottoms, values, resolution, vah_pc, val_pc, bucket_buffer)
split a chart/parent bar into 'resolution' sections, figure out in which section the most volume/time was spent, by analysing a given set of (intra)bars' top/bottom/volume values. Then return price center of the bin with the highest volume, essentially marking the point of control / highest volume (poc) in the chart/parent bar.
Parameters:
tops (float ) : array of range top/high values (either from ltf or chart candles using history() function
bottoms (float ) : array of range bottom/low values (either from ltf or chart candles using history() function
values (float ) : array of range volume/1 values (either from ltf or chart candles using history() function (1s can be used for analysing candles in bucket/price range over time)
resolution (int) : amount of buckets/price ranges to sort the candle data into (analyse how much volume / time was spent in a certain bucket/price range) (default: 25)
vah_pc (float) : a threshold percentage (of values' total) for the top end of the value area (default: 80)
val_pc (float) : a threshold percentage (of values' total) for the bottom end of the value area (default: 20)
bucket_buffer (Bucket ) : optional buffer of empty Buckets to fill, if omitted a new one is created and returned. The buffer length must match the resolution
Returns: poc (price level), vah (price level), val (price level), poc_index (idx in buckets), vah_index (idx in buckets), val_index (idx in buckets), buckets (filled buffer or new)
create_profile(start_idx, tops, bottoms, values, resolution, vah_pc, val_pc, args)
split a chart/parent bar into 'resolution' sections, figure out in which section the most volume/time was spent, by analysing a given set of (intra)bars' top/bottom/volume values. Then return price center of the bin with the highest volume, essentially marking the point of control / highest volume (poc) in the chart/parent bar.
Parameters:
start_idx (int) : the bar_index at which the Profile should start drawing
tops (float ) : array of range top/high values (either from ltf or chart candles using history() function
bottoms (float ) : array of range bottom/low values (either from ltf or chart candles using history() function
values (float ) : array of range volume/1 values (either from ltf or chart candles using history() function (1s can be used for analysing candles in bucket/price range over time)
resolution (int) : amount of buckets/price ranges to sort the candle data into (analyse how much volume / time was spent in a certain bucket/price range) (default: 25)
vah_pc (float) : a threshold percentage (of values' total) for the top end of the value area (default: 80)
val_pc (float) : a threshold percentage (of values' total) for the bottom end of the value area (default: 20)
args (ProfileArgs)
Returns: poc (price level), vah (price level), val (price level), poc_index (idx in buckets), vah_index (idx in buckets), val_index (idx in buckets), buckets (filled buffer or new)
history(src, len, offset)
allows fetching an array of values from the history series with offset from current candle
Parameters:
src (int)
len (int)
offset (int)
history(src, len, offset)
allows fetching an array of values from the history series with offset from current candle
Parameters:
src (float)
len (int)
offset (int)
history(src, len, offset)
allows fetching an array of values from the history series with offset from current candle
Parameters:
src (bool)
len (int)
offset (int)
history(src, len, offset)
allows fetching an array of values from the history series with offset from current candle
Parameters:
src (string)
len (int)
offset (int)
Bucket
Fields:
idx (series int) : the index of this Bucket within the Profile starting with 0 for the lowest Bucket at the bottom of the Profile
value (series float) : the value of this Bucket, can be volume or time, for using time pass and array of 1s to the update function
top (series float) : the top of this Bucket's price range (for calculation)
btm (series float) : the bottom of this Bucket's price range (for calculation)
center (series float) : the center of this Bucket's price range (for plotting)
fraction (series float) : the fraction this Bucket's value is compared to the total of the Profile
plot_bucket_line (Line type from robbatt/lib_plot_objects/24) : the line that resembles this bucket and it's valeu in the Profile
ProfileArgs
Fields:
show_poc (series bool) : whether to plot a POC line across the Profile Box (default: true)
show_profile (series bool) : whether to plot a line for each Bucket in the Profile Box, indicating the value per Bucket (Price range), e.g. volume that occured in a certain time and price range (default: false)
show_va (series bool) : whether to plot a VAH/VAL line across the Profile Box (default: false)
show_va_fill (series bool) : whether to fill the 'value' area between VAH/VAL line (default: false)
show_background (series bool) : whether to fill the Profile Box with a background color (default: false)
show_labels (series bool) : whether to add labels to the right end of the POC/VAH/VAL line (default: false)
show_price_levels (series bool) : whether add price values to the labels to the right end of the POC/VAH/VAL line (default: false)
extend (series bool) : whether extend the Profile Box to the current candle (default: false)
default_size (series int) : the default min. width of the Profile Box (default: 30)
args_poc_line (LineArgs type from robbatt/lib_plot_objects/24) : arguments for the poc line plot
args_va_line (LineArgs type from robbatt/lib_plot_objects/24) : arguments for the va line plot
args_poc_label (LabelArgs type from robbatt/lib_plot_objects/24) : arguments for the poc label plot
args_va_label (LabelArgs type from robbatt/lib_plot_objects/24) : arguments for the va label plot
args_profile_line (LineArgs type from robbatt/lib_plot_objects/24) : arguments for the Bucket line plots
args_profile_bg (BoxArgs type from robbatt/lib_plot_objects/24)
va_fill_color (series color) : color for the va area fill plot
Profile
Fields:
start (series int) : left x coordinate for the Profile Box
end (series int) : right x coordinate for the Profile Box
resolution (series int) : the amount of buckets/price ranges the Profile will dissect the data into
vah_threshold_pc (series float) : the percentage of the total data value to mark the upper threshold for the main value area
val_threshold_pc (series float) : the percentage of the total data value to mark the lower threshold for the main value area
args (ProfileArgs) : the style arguments for the Profile Box
h (series float) : the highest price of the data
l (series float) : the lowest price of the data
total (series float) : the total data value (e.g. volume of all candles, or just one each to analyse candle distribution over time)
buckets (Bucket ) : the Bucket objects holding the data for each price range bucket
poc_bucket_index (series int) : the Bucket index in buckets, that holds the poc Bucket
vah_bucket_index (series int) : the Bucket index in buckets, that holds the vah Bucket
val_bucket_index (series int) : the Bucket index in buckets, that holds the val Bucket
poc (series float) : the according price level marking the Point Of Control
vah (series float) : the according price level marking the Value Area High
val (series float) : the according price level marking the Value Area Low
plot_poc (Line type from robbatt/lib_plot_objects/24)
plot_vah (Line type from robbatt/lib_plot_objects/24)
plot_val (Line type from robbatt/lib_plot_objects/24)
plot_poc_label (Label type from robbatt/lib_plot_objects/24)
plot_vah_label (Label type from robbatt/lib_plot_objects/24)
plot_val_label (Label type from robbatt/lib_plot_objects/24)
plot_va_fill (LineFill type from robbatt/lib_plot_objects/24)
plot_profile_bg (Box type from robbatt/lib_plot_objects/24)
Buying Selling Volume StrategyFirst I would like to give the original credit and thanks to @ceyhun for his amazing volume script.
The way I decided to convert it into a strategy is divided into multiple types.
First, I decided in order to smooth out the values and make it more accurate to adapt the values to multiple timeframes.
After that I took the initial values from the buyers and sellers , and made a rest operation between them to have a flat difference between the power of both sides.
WIth that later on I decided to to apply a volatility filter,in this case bollinger bands, in order to find out potential leading trends.
At the same time in order to filter even more, I decided to make use as well for weekly VWAP values of the asset used.
Lastly I added a dynamic risk management into it , based on the ATR Daily values of the asset values.
As for the rules used, for example for long, I am looking that the price of the asset is above the weekly VWAP, after that I am checking that the MTF volume rest operation is both bullish and above the upper side of the bollinger.
For short we would want the asset to be below the weekly VWAP, and the volume to be bearish and above the upper side of bollinger.
The exit is either based on daily ATR values multipliers, or if we have a reverse condition.
If you have any questions, please let me know !
TGIF StatsTGIF - "Thank God it's Friday"
After a heavily bearish week (tuesday, wednesday and thursday) price sometimes looks for some retracement on fridays. Vice versa for bullish weeks.
This script shows how often that specific scenario happens and displays that data in a table.
The user has the option to input a starting year for the statistic and is able to filter between bearish or bullish weeks.
*disclaimer : if paired with a higher timeframe pd array taught by ICT the stats should be better, that's not included in the code though*
⚠️ Open Source ⚠️
Coders and TV users are authorized to copy this code base, but a paid distribution is prohibited. A mention to the original author is expected, and appreciated.
⚠️ Terms and Conditions ⚠️
This financial tool is for educational purposes only and not financial advice. Users assume responsibility for decisions made based on the tool's information. Past performance doesn't guarantee future results. By using this tool, users agree to these terms.
Open Interest Suite [Aggregated] - By LeviathanThis script is an all-in-one indicator that uses aggregated Open Interest data to plot OI candles, Open Interest Delta, OI x rVOL, and OI RSI. It also includes tools such as an OI Distribution profile, large OI increase/decrease coloring, a Stats Screener, and much more.
You can select and have the script plot the following:
- Open Interest in the form of OHLC candles
- Open Interest Delta in the form of a histogram
- Open Interest x Relative Volume in the form of a histogram
- Open Interest RSI in the form of a line
Additional features include:
- OI Distribution Profile (It shows the distribution of open interest in the visible range on y axis. This makes it easier to identify when Open Interest is relatively high or low and at which values most of the action took place)
- Stats screener (The screener includes the real-time net Open Interest value, Rekt Longs/Rekt Shorts based on large OI decreases and Aggressive Longs/Shorts based on large OI increases)
- Coloring (You can color OI Delta nodes, background and chart candles based on large OI increases/decreases)
- more
Instructions for the settings will be provided in the tooltips shortly.
Full credit goes to @KioseffTrading for the profile generation code.
Open Interest Profile [Fixed Range] - By LeviathanThis script generates an aggregated Open Interest profile for any user-selected range and provides several other features and tools, such as OI Delta Profile, Positive Delta Levels, OI Heatmap, Range Levels, OIWAP, POC and much more.
The indicator will help you find levels of interest based on where other market participants are opening and closing their positions. This provides a deeper insight into market activity and serves as a foundation for various different trading strategies (trapped traders, supply and demand, support and resistance, liquidity gaps, imbalances,liquidation levels, etc). Additionally, this indicator can be used in conjunction with other tools such as Volume Profile.
Open Interest (OI) is a key metric in derivatives markets that refers to the total number of unsettled or open contracts. A contract is a mutual agreement between two parties to buy or sell an underlying asset at a predetermined price. Each contract consists of a long side and a short side, with one party consenting to buy (long) and the other agreeing to sell (short). The party holding the long position will profit from an increase in the asset's price, while the one holding the short position will profit from the price decline. Every long position opened requires a corresponding short position by another market participant, and vice versa. Although there might be an imbalance in the number of accounts or traders holding long and short contracts, the net value of positions held on each side remains balanced at a 1:1 ratio. For instance, an Open Interest of 100 BTC implies that there are currently 100 BTC worth of longs and 100 BTC worth of shorts open in the market. There might be more traders on one side holding smaller positions, and fewer on the other side with larger positions, but the net value of positions on both sides is equivalent - 100 BTC in longs and 100 BTC in shorts (1:1). Consider a scenario where a trader decides to open a long position for 1 BTC at a price of $30k. For this long order to be executed, a counterparty must take the opposite side of the contract by placing a short order for 1 BTC at the same price of $30k. When both long and short orders are matched and executed, the Open Interest increases by 1 BTC, indicating the introduction of this new contract to the market.
The meaning of fluctuations in Open Interest:
- OI Increase - signifies new positions entering the market (both longs and shorts).
- OI Decrease - indicates positions exiting the market (both longs and shorts).
- OI Flat - represents no change in open positions due to low activity or a large number of contract transfers (contracts changing hands instead of being closed).
Typically, we monitor Open Interest in the form of its running value, either on a chart or through OI Delta histograms that depict the net change in OI for each price bar. This indicator enhances Open Interest analysis by illustrating the distribution of changes in OI on the price axis rather than the time axis (akin to Volume Profiles). While Volume Profile displays the volume that occurred at a given price level, the Open Interest Profile offers insight into where traders were opening and closing their positions.
How to use the indicator?
1. Add the script to your chart
2. A prompt will appear, asking you to select the “Start Time” (start of the range) and the “End Time” (end of the range) by clicking anywhere on your chart.
3. Within a few seconds, a profile will be generated. If you wish to alter the selected range, you can drag the "Start Time" and "End Time" markers accordingly.
4. Enjoy the script and feel free to explore all the settings.
To learn more about each input in indicator settings, please read the provided tooltips. These can be accessed by hovering over or clicking on the ( i ) symbol next to the input.
Tick Profile HeatmapThis is a market internal TICK heatmap with the intent of displaying areas of price associated to stronger reactions with NYSE TICK (by default).
This code is based off of a variation of a Volume Profile coded originally by colejustice who originally used code from LuxAlgo . The full-width volume bars that colejustice setup were replaced with full-width bars representative of TICK breaking +/- $500, the current cumulative value representing the "heat" is comprised of hlc3 by default but that can be changed. In a future update I may add additional logic here to capture highs and lows in the heatmap specifically, and perhaps additional colors.
As with other traditional profiling studies, this indicators purpose is to visualize correspondence to specific price levels, allowing rapid assessment where the most TICK activity is occurring, and where it hasn't been. This information may provide areas of support and resistance and regions where price may move quickly repeatedly.
All of the same input guidance that colejustice provided is the same for those pre-existing inputs:
Inputs are set up such that you can customize the lookback period, number of rows, and width of rows for most major timeframes individually. Timeframes between those available will use the next lower timeframe settings (e.g., 2m chart will use the 1m settings.)
Zero usage of volume is present in this indicator, only TICK data so please don't confuse it with volume studies.
Linear Regression Volume ProfileLinear Regression Volume Profile plots the volume profile fixated on the linear regression of the lookback period rather than statically across y = 0. This helps identify potential support and resistance inside of the price channel.
Settings
Linear Regression
Linear Regression Source: the price source in which to sample when calculating the linear regression
Length: the number of bars to sample when calculating the linear regression
Deviation: the number of standard deviations away from the linear regression line to draw the upper and lower bounds
Linear Regression
Rows: the number of rows to divide the linear regression channel into when calculating the volume profile
Show Point of Control: toggle whether or not to plot the level with highest amount of volume
Usage
Similar to the traditional Linear Regression and Volume Profile this indicator is mainly to determine levels of support and resistance. One may interpret a level with high volume (i.e. point of control) to be a potential reversal point.
Details
This indicator first calculates the linear regression of the specified lookback period and, subsequently, the upper and lower bound of the linear regression channel. It then divides this channel by the specified number of rows and sums the volume that occurs in each row. The volume profile is scaled to the min and max volume.
Aggregated Volume Profile Spot & Futures ⚉ OVERVIEW ⚉
Aggregate Volume Profile - Shows the Volume Profile from 9 exchanges. Works on almost all CRYPTO Tickers!
You can enter your own desired exchanges, on/off any others, as well as select the sources of SPOT, FUTURES and others.
The script also includes several input parameters that allow the user to control which exchanges and currencies are included in the aggregated data.
The user can also choose how volume is displayed (in assets, U.S. dollars or euros) and how it is calculated (sum, average, median, or dispersion).
WARNING Indicator is for CRYPTO ONLY.
______________________
⚉ SETTINGS ⚉
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Data Type — Choose Single or Aggregated data.
• Single — Show only current Volume.
• Aggregated — Show Aggregated Volume.
Volume By — You can also select how the volume is displayed.
• COIN — Volume in Actives.
• USD — Volume in United Stated Dollar.
• EUR — Volume in European Union.
• RUB — Volume in Russian Ruble.
Calculate By — Choose how Aggregated Volume it is calculated.
• SUM — This displays the total volume from all sources.
• AVG — This displays the average price of the volume from all sources.
• MEDIAN — This displays the median volume from all sources.
• VARIANCE — This displays the variance of the volume from all sources.
• Delta Type — Select the Volume Profile type.
• Bullish — Shows the volume of buyers.
• Bearish — Shows the volume of sellers.
• Both — Shows the total volume of buyers and sellers.
Additional features
The remaining functions are responsible for the visual part of the Volume Profile and are intuitive and I recommend that you familiarize yourself with them simply by using them.
________________
⚉ NOTES ⚉
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
If you have any ideas what to add to my work to add more sources or make calculations cooler, suggest in DM .
Also I recommend exploring and trying out my similar work.
Price ProfileThe indicator shows number of candles present in the horizontal box areas for the given time window. You can set up:
1) Start time
2) Stop time
3) Number of horizontal bars
Visible Range Mean Deviation Histogram [LuxAlgo]This script displays a histogram from the mean and standard deviation of the visible price values on the chart. Bin counting is done relative to high/low prices instead of counting the price values within each bin, returning a smoother histogram as a result.
Settings
Bins Per Side: Number of bins computed above and below the price mean
Deviation Multiplier: Standard deviation multiplier
Style
Relative: Determines whether the bins length is relative to the maximum bin count, with a length controlled with the width settings to the left.
Bin Colors: Bin/POC Lines colors
Show POCs: Shows point of controls
Usage
Histograms are generally used to estimate the underlying distribution of a series of observations, their construction is generally done taking into account the overall price range.
The proposed histogram construct N intervals above*below the mean of the visible price, with each interval having a size of: σ × Mult / N , where σ is the standard deviation and N the number of Bins per side and is determined by the user. The standard deviation multipliers are highlighted at the left side of each bin.
A high bin count reflects a higher series of observations laying within that specific interval, this can be useful to highlight ranging price areas.
POCs highlight the most significant bins and can be used as potential support/resistances.
.srb suiteThe essential suite Indicator.
that are well integrated to ensure visibility of essential items for trading.
it is very cumbersome to put symbol in the Tradingview chart and combine essential individual indicators one by one.
Moreover even with such a combination, the chart is messy and visibility is not good.
This is because each indicator is not designed with the others in mind.
This suite was developed as a composite-solution to that situation, and will make you happy.
designed to work in the same pane with open-source indicator by default.
Recommended visual order ; Back = .srb suite, Front = .srb suite vol & info
individually turn on/off only what you need on the screen.
BTC-agg. Volume
4 BTC-spot & 4 BTC-PERP volume aggregated.
It might helps you don't miss out on important volume flows.
Weighted to spot trading volume when using PERP+spot volume .
If enabled, BTC-agg.Vol automatically applied when selecting BTC-pair.
--> This is used in calculations involving volumes, such as VWAP.
Moving Average
1 x JMA trend ribbon ; Accurately follow short-term trend changes.
3 x EMA ribbon ; zone , not the line.
MA extension line ; It provide high visibility to recognize the direction of the MA.
SPECIAL TOOLS
VWAP with Standard Deviation Bands
VWAP ruler
BB regular (Dev. 2.0, 2.5)
BB Extented (Dev. 2.5, 3.0, 3.5)
Fixed Range Volume Profile ; steamlined one, performace tuned & update.
SPECIAL TOOLS - Auto Fibonacci Retracement - New GUI
'built-in auto FBR ' has been re-born
It shows - retracement Max top/ min bottom ; for higher visibility
It shows - current retracement position ; for higher visibility
The display of the Fib position that exceeds the regular range is auto-determined according to the price.
tradingview | chart setting > Appearance > Top margin 0%, Bottom margin 0% for optimized screen usage
tradingview | chart setting > Appearance > Right margin 57
.srb suite vol & info --> Visual Order > Bring to Front
.srb suite vol & info --> Pin to scale > No scale (Full-screen)
Visual order ; Back = .srb suite, Front = .srb suite vol & info
1. Fib.Retracement core is from tradingview built-in FBR ---> upgrade new-type GUI, and performance tuned.
2. Fixed-range volume-profile core is from the open-source one ---> some update & perf.tuned.
---------------------------------------------------------------------------------------------------------------------------------------
if you have any questions freely contact to me by message on tradingview.
but please understand that responses may be quite late.
Special thanks to all of contributors of community.
The script may be freely distributed under the MIT license.
Naked Intrabar POCThis indicator with an unfortunate and very non PC sounding name approximates (!) the intrabar point of control (POC) either from time or volume at price.
Due to pine limitations, bin size and the sample lower time frame selection will have at least some effect on the accuracy of the approximation. The trade off is between accuracy and historical availability, however bar replay can be used to view prior historical states beyond what is visible from the current real time bar.
In order for all intrabar POC circles to be visible, you will need to manually set the visual order of the indicator by bringing it to the front.
Since the POC represents a price point around which the highest market participation occurred, the exposed global variable intrabar_poc may (or may not) be interesting as an alternative to ohlc based source input.