VWAP Boulevard [vnhilton](OVERVIEW)
The idea of this indicator comes from traders identifying supply to mainly look for shorts. Scenarios would be gap ups or pump & dumps where huge volume is transacted, & bag-holders are present. Some traders would draw resistance lines, I myself used to draw supply zones using the volume profile on that day, & others used the day VWAP on those days. VWAP Boulevard (I believe the name comes from the trader named team3dstocks) draws day VWAP lines from the highest volume days for a given period (excluding the current day).
(FEATURES)
- Draws horizontal & vertical lines from up to 250 highest volume days out of up to 3568 days, with the ability to hide either of these lines, their thicknesses, styles
- Extend/cut horizontal lines, or extend them all the way to the right
- Show the day VWAP, volume & age for these days in labels, with the ability to show what information you want to see only
- Separate customizable color forms for the lines & labels - ordinary (1 color); volume (2 color gradient from lowest to highest volume of the highest volume days); age (2 color gradient from youngest to oldest volume of the highest volume days)
- Edit offset & size of labels, & hide them
- Hide vertical lines
From left to right: Age color; ordinary color; volume color
250 highest volume days in the past year. Very messy so it's very likely you won't be using this but the ability to draw lines from 250 highest volume days is there if needed
(DRAWDOWNS)
- This indicator will only on the daily timeframe (error message will show up if unaware of this, & can be toggled off). Unfortunately, this would mean you would have to draw the lines manually yourself if you wish to use them on intraday timeframes.
- You may also encounter the 'Pine cannot determine the referencing length of a series. Try using max_bars_back' error. This occurs when the lookback period is very high & the indicator attempts to recalculate I believe. If this happens then reload the indicator.
The logic I used to obtain the highest volume days were to put all of the volume days in a given period in 1 array, then to sort them from highest to lowest, & also store their sorted indices in an separate array as well, so that drawings for each volume day could be done from the 2 arrays.
//Volume for last N periods
var int pastVol = array.new_int(lookbackPeriodFixed)
for i = 0 to lookbackPeriodFixed - 1
array.set(pastVol, i, int(volume ))
sortedIndices = array.sort_indices(pastVol, order.descending) //All Indices of sorted volume from highest to lowest
sortedIndices2 = array.slice(sortedIndices, 0, highestVolDays) //Indices of sorted volume from highest to lowest
array.sort(pastVol, order.descending) //All Volume sorted from highest to lowest
pastVol2 = array.slice(pastVol, 0, highestVolDays) //Volume sorted from highest to lowest
//Drawings
for i = 0 to highestVolDays - 1
index := array.get(sortedIndices, i)
vol := array.get(pastVol, i)
Since these array sizes were determined from the lookback period, it would mean that the request.security() function used to obtain daily values on intraday timeframes wouldn't work for a lookback period >20 (20 * 2 values I believe, which are the day VWAP & the day volume) as TradingView has put a maximum amount of calls of 40 in 1 script. Therefore, for intraday plots to work I would have to change the logic for getting the day VWAP & day volume for the highest days, as the request.security() function doesn't work on for loops, & this would also mean that the user would only be able to draw lines from up to 20 highest volume days instead of 250. I couldn't go forward with this as I wasn't able to find the logic to pick the highest volume days & their day VWAPs & times (indexes) without using a for loop. If anyone has any solutions (including for the 'Pine cannot determine the referencing length of a series. Try using max_bars_back' error) then please let me know. I've also left commented-out code for dealing with intraday drawings for future use.
Объем
Strategy Myth-Busting #7 - MACDBB+SSL+VSF - [MYN]This is part of a new series we are calling "Strategy Myth-Busting" where we take open public manual trading strategies and automate them. The goal is to not only validate the authenticity of the claims but to provide an automated version for traders who wish to trade autonomously.
Our seventh one we are automating is the "Magic MACD Indicator: Crazy Accurate Scalping Trading Strategy ( 74% Win Rate )" strategy from "TradeIQ" who claims to have backtested this manually and achieved 427% profit with a 74% winrate over 100 trades in just a 4 months. I was unable to emulate these results consistently accommodating for slippage and commission but even so the results and especially the high win-rate and low markdown is pretty impressive and quite respectable.
This strategy uses a combination of 3 open-source public indicators:
AK MACD BB v 1.00 by Algokid
SSL Hybrid by Mihkel00
Volume Strength Finder by Saravanan_Ragavan
This is considered a trend following Strategy. AK MACD BB is being used as the primary short term trend direction indicator with an interesting approach of using Bollinger Bands to define an upper and lower range and upon the MACD going above the upper Bollinger Bands, it's indicative of an up trend, where as if the MACD is below the lower Bollinger Band, it's indicative of a down trend. To eliminate false signals, SSL Hyrbid is used as a trend confirmation filter, confirming and eliminating false signals from the MACD BB. It does this by validating the price action is above the the EMA and the SSL is positive that is a confirmation of an uptrend. When the price action is below the EMA and the SSL is negative, that is an confirmation of a downtrend. To avoid taking trades during ranged markets, VSF Buyer's Strength is used so the buyers/sellers strength and must be above 50% or the trade will not be inititiated.
Trading Rules
5 min candles but other lower time frames even below 5m work quite well too.
Best results can be found by tweaking these 2 input parameters:
Number Of bars to look back to ensure MACD isn't above/below Zero Line
Number Of bars back to look for SSL pullback
Long Entry when these conditions are true
AK MACD BB BB issues a new continuation long signal. A new green circle must appear on the indicator and these circles should not be touching across the zero level while they were previously red
SSL Hybrid price action closes above the EMA and the line is blue color and then creates a pullback . The pullback is confirmed when the color changes from blue to gray or from blue to red.
VSF Buyers strength above 50% at the time the MACD indicator issues a new long signal.
Short Entry when these conditions are true
AK MACD BB issues a new continuation short signal. A new red circle must appear on the indicator and these circles should not be touching across the zero level while they were previously green
SSL Hybrid price action closes below the EMA and the line is red color then it has to create a pullback . The pullback is confirmed when the color changes from red to gray or from red to blue.
VSF Sellers strength above 50% at the time the MACD indicator issues a new short signal.
Stop Loss at EMA Line with TP Target 1.5x the risk
If you know of or have a strategy you want to see myth-busted or just have an idea for one, please feel free to message me.
Volume With ColorVolume with color helps to quickly identify accumulation or distribution.
An accumulation day is an up day with volume greater than a user selected average.
A distribution day is a down day with volume greater than a user selected average.
This indicator will highlight those days by changing the volume bar colors for an easy visual.
Click VWAP Anchored with Standard Devation BandsSimply use it by clicking on your chart on the places you find important to determine whether you entries or exits look strong or weak.
[potatoshop] Volume Profile lower timeframeThis script is a volume profile that displays the volume of transactions in price blocks over a recent period of time.
For a more detailed representation, OHCLV values on the time frame lower than the time zone on the chart were called and expressed.
Low time frames are adjustable.
You can adjust the number of blocks and the most recent time period that you want to view.
Although it cannot be compared to the volume indicators provided for paid users of Trading-View, it has functioned by displaying transactions that are difficult to find on open source.
Displays the amount traded in each block and the percentage of the total over a given period.
POC represents the middle value of the block with the highest transaction volume as a line.
TPOC represents the block that stayed the longest regardless of the volume of transaction.
The reversal line appears when you determine the trading advantage of the rising and falling closing on a block basis and then have a different value from the neighboring blocks.
(I didn't mean it much, but I just put it in for fun.)
It represents the total volume of transactions traded in each block, and there are also check boxes in the settings window that represent the volume of transactions that closed higher and closed lower.
You can specify the color of each block.
The highest and lowest values for the set period and the total sum of each block are displayed at the bottom of the box.
Because it was made using a lot of arrays, the total transaction volume was marked separately to check the value.
When expressing the price block according to the trading volume percentage, it was a pity that the minimum pixel was 1 bar, so it could not be expressed delicately.
Although set to bar_time in Box properties xloc, 1 bar was actually the minimum unit of the X-axis value.
The logic used to place the transaction volume for each block is as follows.
1. Divide the difference between the high and low values of 1 LTF bar by the transaction volume .
2. Find the percentage of this LTF bar within each block.
3. Multiply the ratio by the transaction volume again.
4. Store the value in each block cell.
Below are the codes of the people I referred to this time.
1. ‘Time & volume point of control (TPOC & VPOC)’ by quantifytools
2. ‘Volume Profile ’ by LuxAlgo
3. ‘Volume Profile and Volume Indicator by DGT’ by dgtrd
The script is for informational and educational purposes only.
이 스크립트는 최근 일정 기간동안의 거래량을 가격 블록단위로 표시해 주는 볼륨 프로화일입니다.
좀 더 자세한 표현을 위해 차트상의 시간대보다 낮은 시간 프레임상의 OHCLV 값들을 호출하여 표현하였습니다.
낮은 시간 프레임은 조절 가능합니다..
보고 싶은 최근 일정 기간과 블럭 갯수를 조절할 수 있습니다.
트뷰 유료 사용자들을 위해 제공하는 지표와는 비교할 수는 없지만, 오픈 소스상에서는 찾기 힘든 거래량을 표시해 기능을 넣었습니다.
각 블럭에서 거래되었던 양 과 주어진 기간 동안의 총량 대비 퍼센트를 표시해 줍니다.
POC는 거래량이 가장 많았던 블럭의 중간값을 라인으로 표현해 줍니다.
TPOC는 거래량에 상관없이 가장 오랜 시간 머물렸던 블럭을 표현해 줍니다.
반전선은 블럭 단위로 상승 마감과 하락 마감의 거래량 우세를 결정한 뒤, 이웃 블럭들하고 다른 값을 가질 때 나타납니다.
(어떤 뜻을 갖고 만든 건 아니고 그냥 재미로 넣어 보았습니다.)
각 블럭에서 거래되었던 총거래량을 표현해 주며, 또한 설정창에서 상승 마감한 거래량과 하락 마감한 거래량을 표현하는 체크 박스가 있습니다.
각 블럭의 색깔을 지정하실 수 있습니다.
설정된 기간 동안의 최고값과 최저값, 각 블럭을 합친 총량을 박스 하단에 표시해 두었습니다.
어레이를 많이 사용하여 만들었기 때문에 값의 확인을 위해 전체 거래량을 따로 표시하였습니다.
가격 블럭을 거래량 퍼센트에 따라 표현할 때, 최소 픽셀이 1bar 이어서 섬세하게 표현 할 수 없어 안타까웠습니다.
박스 속성을 xloc.bar_time 로 설정하였지만 실제로는 1 bar가 X축 값의 최소 단위였습니다.
각 블록 별로 거래량을 배치 할 때 쓰인 로직은 다음과 같습니다.
1. 1 LTF bar의 하이 와 로우 값의 차이를 거래량으로 나누어 줍니다.
2. 각 블록 안에서 이 LTF bar가 차지 하는 비율을 구합니다.
3. 그 비율에 다시 거래량을 곱해 줍니다.
4. 그 값을 각 블록 셀에 저장해 줍니다.
밑에 제가 이번에 참고한 분들의 코드들입니다.
1. ‘Time & volume point of control (TPOC & VPOC)’ by quantifytools
2. ‘Volume Profile ’ by LuxAlgo
3. ‘Volume Profile and Volume Indicator by DGT’ by dgtrd
Volume Weighted Standard Deviation (VWSD)The Volume Weighted Standard Deviation indicator is a custom technical analysis tool that uses the volume of trading to calculate the standard deviation of a stock's price. This indicator takes the source of data, the length of data, and the deviation as inputs, and calculates the volume weighted standard deviation using the values.
The indicator first calculates the mean price and mean volume by using simple moving average over the given length of data. Then it calculates the squared difference between the mean price and the actual price, multiplied by the volume. This gives a volume-weighted squared difference. The indicator then calculates the square root of the sum of the volume-weighted squared differences divided by the sum of the volumes over the given length of data. This gives the volume weighted standard deviation.
The indicator then plots the standard deviation and deviation as a band around the simple moving average of the source data, providing a clear view of the volatility of the stock.
In summary, the Volume Weighted Standard Deviation indicator is a powerful tool for measuring the volatility of a stock by taking into account the volume of trading. It uses the volume of trading to calculate the standard deviation of a stock's price, giving a more accurate representation of the volatility of the stock. It can be useful for traders to identify entry and exit points and make more informed trading decisions.
Power Indicator - EMAs + VWAP + Volume BarThe Power Indicator is intended to return some exponential moving average, vwap, volume bar, and others. With this compilation, you will be able to use them as one indicator in Trading View.
The components are:
- EMA9 - Exponential Moving Average of 9 days
- EMA21 - Exponential Moving Average of 21 days
- EMA50 - Exponential Moving Average of 50 days
- EMA200 - Exponential Moving Average of 200 days
- Volume Bar - This indicator provides the volume of the candle and its strength by showing different colors. It's a way to check expressive volume in one bar.
- Vwap line
- Indicator
If you have any questions, let me know!
Custom_AVWAP_Harpal's-AnchorsAutomated VWAP Indicator written in PineScript for TradingView charts. Automatically Anchored at key swing H/L levels extracted from price and volume time-series.
Indicator takes one Argument, "LookBack (# of Periods)", and then for a given security finds three key anchors, the highest and lowest values in the 'hlc3' column (average of high low and close on the daily timeframe) in the last 'LookBack' # of days. The script displays up to three color coded time-series corresponding to a trailing Volume Weighted Average Price beginning at the anchor dates corresponding to the anchor points listed above.
BTC Net Volume (Spot) (by JaggedSoft, fixed by SLN)• WHAT:
This indicator plots the aggregated net volume delta of BTC spot pairs from 8 exchanges over the last 60 periods (default settings).
Tracks the following pairs:
"BINANCE:BTCUSDT"
"BITFINEX:BTCUSD"
"POLONIEX:BTCUSDT"
"BITTREX:BTCUSDT"
"COINBASE:BTCUSD"
"BITSTAMP:BTCUSD"
"KRAKEN:XBTUSD"
"BITGET:BTCUSDT"
"GEMINI:BTCUSD"
• HOW TO USE:
Used for confirmation when watching futures that can experience quick movements in the form of liquidation-events. If the oscillator is green or trending upward, it's confirming a positive bias. The inverse is true for a negative bias. This is especially true on higher timeframes.
Can also be used to find correlations between different tech-assets.
• NOTES:
I forked JaggedSofts indicator to fix the data-source error it was having. Let me know if you want to customize exchanges or add more pairs, maybe I can add that in the future!
This indicator replaces the outdated alternative linked here : Please only use this one
• LIMITATIONS:
Only tested with normal japanese candlesticks .
• THANKS:
to the creator of this script, JaggedSoft. It's a great indicator!
• DISCLAIMER:
Not financial Advice, use at your own risk.
Money Flow IntensityThis indicator works very similarly to Elder's Force Index (EFI) and builds on top of what I have for the Money Flow Line (see my other scripts). It combines price movements with volume to create sort of "dollar flow" pressure up and down, looking for "smart money" ("big money") to make their move.
The indicator uses a lookback period to calculate a standard deviation of the movement intensity, then creates gradients to visualize how intense the movement is relative to other movements. This helps measure the pull away from the average more easily than with the Money Flow Line alone.
Much like with EFI, high intensity moves can indicate two things:
1. Strength and conviction in the current direction OR...
2. A reversal is coming soon
You can also watch for waning volume in the current direction, indicating that a trend is losing interest and may be due for a pullback.
There is no way to know, but combining this with price action and a trend indicator can help give you some good educated guesses about what could happen next. Combine with averaging in or out and managing risk appropriately. Good luck :)
Dollar Cost VolumeWhen asset prices rise or fall greatly it can be difficult to measure the interest levels across time periods. Think of assets like BBBY, GME, CVNA, BTCUSD, etc... :)
This simple visualization multiplies a pricing option by the volume to give a "dollar cost" volume over time. With this, you can more easily measure interest levels from "smart money" ("big money") and eliminate some of the noise from large volume moves when prices are very low (or small volume moves when prices are very high).
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.
Volume-Weighted Price Levels (VWPL)Introduction:
In this script, we will be creating an indicator that plots horizontal lines on the chart for each unique price in a given range, and colors them based on the volume of that price.
Explanation:
First, we define the input "Length" as an integer. This will determine the number of bars back from the current bar to include in the range.
We then create two arrays: "price" and "vol." The "price" array will store all the unique prices in the given range, and the "vol" array will store the corresponding volumes for those prices.
Using a for loop, we iterate through the range of bars and check if the current close price is already included in the "price" array. If it is not, we add it to the array and also add the corresponding volume to the "vol" array. If it is already included, we find the index of that price in the "price" array and add the current volume to the volume stored at that index in the "vol" array.
After the for loop, we find the maximum volume in the "vol" array and use that to find the corresponding price in the "price" array. This will be the price at which we draw the horizontal line.
We then create an array of lines called "lines" and, using another for loop, we iterate through the "price" array and add a line to the "lines" array for each price. The color of each line is determined by the volume of that price, using a color gradient from blue (lowest volume) to red (highest volume).
Finally, we use an if statement to check if the current bar is the last bar in the chart, and if it is, we use another for loop to iterate through the "lines" array and delete all the lines. This is to prevent the lines from being carried over to the next bar and potentially being plotted multiple times.
Conclusion:
This script can be useful for visualizing the price levels with the highest volume in a given range, as well as seeing how volume is distributed among different price levels. It can be helpful for identifying areas of significant buying or selling pressure.
(mab) Volume IndexThis script implements the (mab) Volume Index (MVI) which is a volume momentum oscillator. The formula is similar to the formula of RSI but uses volume instead of price. The price is calculated as the average of open, high, low and close prices and is used to determine if the volume is counted as up-volume or down-volume.
I created MVI to replace OBV on my charts, because OBV is not as simple to read and find e.g. divergences. MVI is much easier to read because it is an oscillator with a minimum value of 0 and a maximum value of 100. It's easy to find divergences too. I like to display MVI over the volume bars. However, you can display it in a separate pain as well.
(mab) Money Flow - MMFThis indicator implements the (mab) Money Flow (MMF). The MMF is calculated using a formula inspired by RSI. In contrast to RSI, MMF uses the average of open, high, low and close as price source. This price is then multiplied with the volume as input for the RSI like formula to calculate the value.
Features:
- Volume weighted price momentum oscillator
- Uses average of open, close, high and low as price component to make the signal less choppy while still as fast
- EMA on MMF
- Highlighting when EMA is in oversold or overbought area
- Alarms
Note that the MMF formula is different than the formula used for other money flow indices like MFI or CMF.
Why do we need another money flow indicator if there are already many established ones? Well I used and tested many money flow indicators including MFI and CMF among others. However, none of them showed the results I was looking for. MFI for example uses a simpler formula for the calculation, which results in a different reading that isn't showing divergences as clearly as I would like. CMF on the other hand has no defined maximum or minimum (similar to MACD) so that it's difficult to determine overbought and oversold values. The MMF is an oscillator with a minimum value of 0 and a maximum value of 100 like RSI. The usage of the average of open, close, high and low as price element makes it less choppy compared to RSI while it still reacts as fast to movements.
Volume Cross ━ (For Volume Crop) [whvntr]This fulfills a request from user: iTibu to make an oscillator to go along with one of my indicators named: " Volume Crop ━ Hidden Volume Divergence ". It essentially does the same thing, without the Midline Tool , so you can better understand where the crosses are happening. Again, the hidden MACD Divergence circles formula originated from TheLark. I converted these values to volume instead of price.
Disclaimer: using this indicator, or any indicator anywhere, involves risk when trading and isn't a guarantee of 100% accurate results.
Wicks percentagesThis indicator shows the percentage of the upper and lower wicks in reference to the entire candle.
Is recommended to use with white background.
Volume Crop ━ Hidden Volume Divergence [whvntr] Volume Divergence
• Formula originated from: "Hidden Price Divergence" (circles) by TheLark. I did two things to harness its
effectiveness:
• Firstly, I developed a unique way to filter out the divergence signals that were appearing on both sides of the
midline. This filter will be known as the "Midline Tool" . It filters out a lot of the false signals commonly
associated with oscillators.
• Then, I modified the default format from Price to Volume.
• The midline formula "Midline Tool" was developed by me . It adjusts in the thousands since it's volume.
Let me know in the comments if you would rater have a smaller step value than 10,000. How does it work?
Crossover then Crossunder, the arrows only appear during the first sign of hidden volume divergence once
crossing the midline. Normally, these signs appear on both side of the midline both bearish and bullish no
matter if it's on an oversold or overbought side of the spectrum... Also, let
me know in the comments if you would like for me to release an oscillator version of this
indicator for co-witnessing.
Features:
• Volume divergence
• Midline Tool©
• Disclaimer: This indicator does not constitute investment advice. Trade at your own risk with the investments
you can afford to lose because all financial investments have risks and this is not a
guarantee that the volume divergence will be 100% all the time.
CVD - Cumulative Volume Delta (Chart)█ OVERVIEW
This indicator displays cumulative volume delta (CVD) as an on-chart oscillator. It uses intrabar analysis to obtain more precise volume delta information compared to methods that only use the chart's timeframe.
The core concepts in this script come from our first CVD indicator , which displays CVD values as plot candles in a separate indicator pane. In this script, CVD values are scaled according to price ranges and represented on the main chart pane.
█ CONCEPTS
Bar polarity
Bar polarity refers to the position of the close price relative to the open price. In other words, bar polarity is the direction of price change.
Intrabars
Intrabars are chart bars at a lower timeframe than the chart's. Each 1H chart bar of a 24x7 market will, for example, usually contain 60 bars at the lower timeframe of 1min, provided there was market activity during each minute of the hour. Mining information from intrabars can be useful in that it offers traders visibility on the activity inside a chart bar.
Lower timeframes (LTFs)
A lower timeframe is a timeframe that is smaller than the chart's timeframe. This script utilizes a LTF to analyze intrabars, or price changes within a chart bar. The lower the LTF, the more intrabars are analyzed, but the less chart bars can display information due to the limited number of intrabars that can be analyzed.
Volume delta
Volume delta is a measure that separates volume into "up" and "down" parts, then takes the difference to estimate the net demand for the asset. This approach gives traders a more detailed insight when analyzing volume and market sentiment. There are several methods for determining whether an asset's volume belongs in the "up" or "down" category. Some indicators, such as On Balance Volume and the Klinger Oscillator , use the change in price between bars to assign volume values to the appropriate category. Others, such as Chaikin Money Flow , make assumptions based on open, high, low, and close prices. The most accurate method involves using tick data to determine whether each transaction occurred at the bid or ask price and assigning the volume value to the appropriate category accordingly. However, this method requires a large amount of data on historical bars, which can limit the historical depth of charts and the number of symbols for which tick data is available.
In the context where historical tick data is not yet available on TradingView, intrabar analysis is the most precise technique to calculate volume delta on historical bars on our charts. This indicator uses intrabar analysis to achieve a compromise between simplicity and accuracy in calculating volume delta on historical bars. Our Volume Profile indicators use it as well. Other volume delta indicators in our Community Scripts , such as the Realtime 5D Profile , use real-time chart updates to achieve more precise volume delta calculations. However, these indicators aren't suitable for analyzing historical bars since they only work for real-time analysis.
This is the logic we use to assign intrabar volume to the "up" or "down" category:
• If the intrabar's open and close values are different, their relative position is used.
• If the intrabar's open and close values are the same, the difference between the intrabar's close and the previous intrabar's close is used.
• As a last resort, when there is no movement during an intrabar and it closes at the same price as the previous intrabar, the last known polarity is used.
Once all intrabars comprising a chart bar are analyzed, we calculate the net difference between "up" and "down" intrabar volume to produce the volume delta for the chart bar.
█ FEATURES
CVD resets
The "cumulative" part of the indicator's name stems from the fact that calculations accumulate during a period of time. By periodically resetting the volume delta accumulation, we can analyze the progression of volume delta across manageable chunks, which is often more useful than looking at volume delta accumulated from the beginning of a chart's history.
You can configure the reset period using the "CVD Resets" input, which offers the following selections:
• None : Calculations do not reset.
• On a fixed higher timeframe : Calculations reset on the higher timeframe you select in the "Fixed higher timeframe" field.
• At a fixed time that you specify.
• At the beginning of the regular session .
• On trend changes : Calculations reset on the direction change of either the Aroon indicator, Parabolic SAR , or Supertrend .
• On a stepped higher timeframe : Calculations reset on a higher timeframe automatically stepped using the chart's timeframe and following these rules:
Chart TF HTF
< 1min 1H
< 3H 1D
<= 12H 1W
< 1W 1M
>= 1W 1Y
Specifying intrabar precision
Ten options are included in the script to control the number of intrabars used per chart bar for calculations. The greater the number of intrabars per chart bar, the fewer chart bars can be analyzed.
The first five options allow users to specify the approximate amount of chart bars to be covered:
• Least Precise (Most chart bars) : Covers all chart bars by dividing the current timeframe by four.
This ensures the highest level of intrabar precision while achieving complete coverage for the dataset.
• Less Precise (Some chart bars) & More Precise (Less chart bars) : These options calculate a stepped LTF in relation to the current chart's timeframe.
• Very precise (2min intrabars) : Uses the second highest quantity of intrabars possible with the 2min LTF.
• Most precise (1min intrabars) : Uses the maximum quantity of intrabars possible with the 1min LTF.
The stepped lower timeframe for "Less Precise" and "More Precise" options is calculated from the current chart's timeframe as follows:
Chart Timeframe Lower Timeframe
Less Precise More Precise
< 1hr 1min 1min
< 1D 15min 1min
< 1W 2hr 30min
> 1W 1D 60min
The last five options allow users to specify an approximate fixed number of intrabars to analyze per chart bar. The available choices are 12, 24, 50, 100, and 250. The script will calculate the LTF which most closely approximates the specified number of intrabars per chart bar. Keep in mind that due to factors such as the length of a ticker's sessions and rounding of the LTF, it is not always possible to produce the exact number specified. However, the script will do its best to get as close to the value as possible.
As there is a limit to the number of intrabars that can be analyzed by a script, a tradeoff occurs between the number of intrabars analyzed per chart bar and the chart bars for which calculations are possible.
Display
This script displays raw or cumulative volume delta values on the chart as either line or histogram oscillator zones scaled according to the price chart, allowing traders to visualize volume activity on each bar or cumulatively over time. The indicator's background shows where CVD resets occur, demarcating the beginning of new zones. The vertical axis of each oscillator zone is scaled relative to the one with the highest price range, and the oscillator values are scaled relative to the highest volume delta. A vertical offset is applied to each oscillator zone so that the highest oscillator value aligns with the lowest price. This method ensures an accurate, intuitive visual comparison of volume activity within zones, as the scale is consistent across the chart, and oscillator values sit below prices. The vertical scale of oscillator zones can be adjusted using the "Zone Height" input in the script settings.
This script displays labels at the highest and lowest oscillator values in each zone, which can be enabled using the "Hi/Lo Labels" input in the "Visuals" section of the script settings. Additionally, the oscillator's value on a chart bar is displayed as a tooltip when a user hovers over the bar, which can be enabled using the "Value Tooltips" input.
Divergences occur when the polarity of volume delta does not match that of the chart bar. The script displays divergences as bar colors and background colors that can be enabled using the "Color bars on divergences" and "Color background on divergences" inputs.
An information box in the lower-left corner of the indicator displays the HTF used for resets, the LTF used for intrabars, the average quantity of intrabars per chart bar, and the number of chart bars for which there is LTF data. This is enabled using the "Show information box" input in the "Visuals" section of the script settings.
FOR Pine Script™ CODERS
• This script utilizes `ltf()` and `ltfStats()` from the lower_tf library.
The `ltf()` function determines the appropriate lower timeframe from the selected calculation mode and chart timeframe, and returns it in a format that can be used with request.security_lower_tf() .
The `ltfStats()` function, on the other hand, is used to compute and display statistical information about the lower timeframe in an information box.
• The script utilizes display.data_window and display.status_line to restrict the display of certain plots.
These new built-ins allow coders to fine-tune where a script’s plot values are displayed.
• The newly added session.isfirstbar_regular built-in allows for resetting the CVD segments at the start of the regular session.
• The VisibleChart library developed by our resident PineCoders team leverages the chart.left_visible_bar_time and chart.right_visible_bar_time variables to optimize the performance of this script.
These variables identify the opening time of the leftmost and rightmost visible bars on the chart, allowing the script to recalculate and draw objects only within the range of visible bars as the user scrolls.
This functionality also enables the scaling of the oscillator zones.
These variables are just a couple of the many new built-ins available in the chart.* namespace.
For more information, check out this blog post or look them up by typing "chart." in the Pine Script™ Reference Manual .
• Our ta library has undergone significant updates recently, including the incorporation of the `aroon()` indicator used as a method for resetting CVD segments within this script.
Revisit the library to see more of the newly added content!
Look first. Then leap.
Accumulated Put/Call Ratio V2This is an updated version of the Accumulated P/C Ratio. Some changes include:
- Pinescript privacy changed from protected to open.
- Utilizes the "request.security_lower_tf" function for weekly and monthly charts.
- Now acquires and sums raw put volume (ticker: PVOL) and call volume (ticker: CVOL) separately, then divides the aggregate put to aggregate call to get the P/C ratio, as opposed to the original version which directly sums the put call ratio (ticker: PCC). Mathematically this calculation makes more sense, but the major drawback of this change seems to be that PVOL and CVOL don't have as much historical data as PCC.
The way to interpret the indicator is the same as the original version - higher values are bullish while lower values are bearish. A solid (0 transparency) bar means that the value is beyond 3 standard deviations within a particular period.
Price Weighted Volume MA (PWVMA)Title: "Price Weighted Volume Moving Average Indicator for TradingView"
Abstract: This script presents a TradingView indicator that displays the price weighted volume moving average (PWVMA) of a financial asset. The PWVMA is a technical analysis tool that helps traders visualize the relationship between price and volume over a specified period of time. The script offers two PWVMA calculation methods: the standard volume moving average (VMA) and the exponentially smoothed volume moving average (EVMA). The user can choose between these methods and customize the length and reset (session weighting) parameters of the moving average. The PWVMA is plotted on the chart alongside the volume data for easy comparison and analysis.
Introduction: In financial markets, volume is an important factor that can provide insights into the strength of a trend or the intensity of buying or selling pressure. The PWVMA is a variant of the volume moving average (VMA) that takes into account the price of the asset in the calculation. This makes the PWVMA more sensitive to price changes and helps traders understand the underlying dynamics of the market.
Methodology: The PWVMA is calculated by dividing the sum of the product of volume and price over a specified period by the sum of the price over the same period. In the VMA method, this calculation is performed using a simple moving average. In the EVMA method, the calculation uses an exponentially smoothed moving average, which gives greater weight to more recent data points.
Implementation: The script is implemented in TradingView's PineScript language and can be easily added to any chart on the platform. The user can choose between the VMA and EVMA methods and adjust the length and reset (session weighting) parameters as needed. The PWVMA is plotted on the chart alongside the volume data, allowing traders to compare and analyze the relationship between the two.
Conclusion: The PWVMA is a useful technical analysis tool that helps traders understand the relationship between price and volume in the market. This script provides a convenient and customizable implementation of the PWVMA for use in TradingView.
(I love using openai to write my descriptions)
LiquidationsFirst, thanks to the following Tradingview community members for providing open source indicators that I used to develop this indicator!
Liquidations by volume (spot/futures) - @Thomas_Davison
Pivot and liquidation lines - @lmatl
Let me know if either of you do not approve and I will remove the indicator.
This indicator uses pivot points, volume and a liquidation percentage to determine potential liquidation levels. These are not exact but can give traders an idea of potential support or resistance levels.
Pivot points: Currently the pivot points are set to look left 5 bars and right 2 bars. This will determine the high and lows in the chart.
Volume: Assuming that high volume bars are where more leverage is used, this indicator uses the average volume over a 1000 bar period to determine to determine a baseline. I have arbitrarily set 100x lines to 20% above the average volume, 50x lines 10% above, 25x lines 5% above, 10x lines 2.5% above and 5x lines 1.25% above.
Liquidation: Finally, we are making a few assumptions on how liquidations are calculated. The following table includes the percentage a position can decline before being liquidated.
Short: Long:
100x 0.51% 0.49%
50x 1.55% 1.47%
25x 3.70% 3.38%
10x 5.11% 4.67%
5x 6.705% 6.115%
Let me know if there are any questions or if anyone has any improvements!
Volume Weighted Exponential Moving Average Suite (VWEMA)This is a volume weighted exponential moving average (EMA) script that allows users to customize various parameters to fit their specific needs.
The script includes four different EMA styles: EMA, DEMA, TEMA, and EHMA. Users can choose which style they would like to use by selecting it in the input field. The script also allows users to customize the length of the EMA, with options for both a maximum and minimum length. Users can also choose to use a manual length or to use the dominant cycle within a range as the length.
In addition to these options, the script also includes the ability to turn on or off volume weighting and a daily reset feature that resets the EMA every day. There is also an option to turn on deviation bands, which show the standard deviation of the selected EMA.
Overall, this script offers a wide range of customization options to help users find the best EMA settings for their needs. It is an advanced tool that can be very helpful for traders looking to optimize their EMA strategy.
Cumulative length instead of cycle length
Double EMA Volume Weighted
Triple EMA Volume Weighted
EHMA Volume Weighted
Higher time frame
Deviation Bands