TradingView
vace117
5 jan 2022 23:16

Buy/Sell Volume Totals for Period 

Bitcoin / TetherUSBinance

Beskrivning

This indicator can be used to help you tell the difference between Wyckoff Accumulation and Distribution.

The idea is to add up all the Buy Volume and all the Sell Volume separately from the beginning of the Trading Range (TR) for each candle. You can define the Start and End dates in the settings of the indicator.

The indicator will show you 3 numbers of interest:
  • GREEN = Total Buy Volume from beginning of date range
  • RED = Total Sell Volume from beginning of date range
  • YELLOW = Ratio of Total Buy / Total Sell Volume from beginning of date range


When the Total Buy Volume exceeds the Total Sell Volume in the TR, the indicator will color the background in GREEN color, to indicate possible accumulation. Otherwise the background will be RED, to indicate possible distribution.

You can float your cursor over any candle to see the current Volume Totals at that candle from the beginning of the TR (set by you in settings to a specific date).


Here's a few examples of the indicator in action:

1) Accumulation


2) Distribution


3) Possible Re-distribution


Please note that this indicator is meant to be used in combination with other analysis techniques from the Wyckoff Methodology!
Kommentarer
harmoniesman
How can you get your script? Thank you?Especially like your script?Looking forward to your reply
mundusmodus
This indicator is so great! I actually wanted this and you made it! Thank you! One question, I have a 15 minute chart and the whole section is green until the end of the default date range, but if I change to the 1 hour or 1 day chart I get the different colors. Does this mean that in the 15 minute periods there are more buys than sell as far as the default date?
vace117
@mundusmodus, That's a great question! I am thinking about this myself right now, b/c I was also somewhat surprised when I noticed this.

My current theory is that the difference is due to the way I calculate Buy and Sell Volumes for each candle. TradingView gives us the total volume for each candle, so I needed to find some way to split that into Buy and Sell parts. But how can we do that when each trade obviously has a Buyer and a Seller for the exact same amount of asset?

The most direct way would be to see if the trades are being executed at Bid or Ask prices on the exchange. When a market is experiencing more buying volume than selling volume, it means there are more traders buying at the Ask price, which has a tendency to push the price up.

When a market is experiencing more selling volume than buying volume, it means there are more traders selling at the bid price, which has a tendency to push the price down.

I think this principle is described rather well here:
thebalance.com/buying-and-selling-volume-1031027

Unfortunately, this data is not provided by the exchanges, so we cannot calculate Buy/Sell ratio in each candle in PineScript that way. This is rather unfortunate, since I think this method would produce better accuracy.

So what's the alternative? I took the approach that is kind of similar to how the Accumulation/Distribution indicator does it:
investopedia.com/terms/a/accumulationdistribution.asp

I think this is consistent with Wyckoff's First Law:
"The law of supply and demand determines the price direction. When demand is greater than supply, prices rise, and when supply is greater than demand, prices fall."

So what my indicator is doing is calculating the Buy/Sell ratio based on the position of the closing price of each candle inside the entire range of that candle. This is what introduces the dependency on selected Time Frame (TF). Depending on which trades got included in which candle, the results can be different.

Does this mean that lower TFs are less reliable than higher TFs? I think so, but I am not 100% sure of this yet.
mundusmodus
@vace117, Thanks you so much for your explanation ! I went back and we did have red spots on the 15m in some areas. I see the different way you are calculating this, is brilliant, despite not having the info from the exchanges. Thank you so much!
A_Traders_Edge
@vace117, @LucF Hi Luc, hate to drag you in on this but could you PLEASE shed some light on the subject when time presents itself? Im referring to the comments directly above me. I noticed the same discrepancies and could have sworn Ive seen you address it before. Either way, thanks for your time.
LucF
@chasinalts, There are two things at play here:

1. The script infers buy/sell volume values using the position of the close in the bar, so results will vary with the chart's timeframe, as the bar structure of the chart's bars making up any given period of time will also vary. As the author points out, without historical tick data, buy/sell volume can only be inferred using approximations. There's nothing inherently wrong with this way of doing it, but like all approximations, it entails compromises.

2. While the volume of different intraday timeframes for the same time period can be compared to each other, comparing intraday volume with daily volume will yield discrepancies on many instruments. They happen because in many cases, intraday volume does not contain certain type of transactions that are only reported at the end of the day.
romanowsky
@LucF, could you elaborate on this: "intraday volume does not contain certain type of transactions that are only reported at the end of the day"?
LucF
@romanowsky, Feed information (i.e., transactions tallied) can vary quite a bit between timeframes, exchanges/brokers, sectors, etc. This affects all the data in feeds: time, price and volume. Simply put, feeds are a jungle and we should be wary of assumptions ) I provide a summary discussion of the matter in my "Volume X-ray" thing here: tradingview.com/script/tPsEizhp-Volume-X-ray-LucF/ Apologies to @vace117 for linking to one of my pubs. Hope you don't mind.
WreckedRick
@vace117, could you achieve this by determining the % change from last period/candle and bringing that into the equation with the buys/sells?
Madcaptains
Thanks for this indicator. I’m playing around with it to see if I want to keep using it. Many times, what the indicators show as an accumulation turns out to be exactly that and the market goes up. Some other times though, It says accumulation and the market goes down. Below is an example with META. Its a redistribution but the indicator shows green.

How should I interpret that one? Thx
Mer