Buying Selling Volume low lag

Originally written by @ceyhun
I added a low lag filter to key components to smooth the bars. The user can adjust the parameters 'fast' and 'slow' to tune.

The original comments of ceyhun are below repeated:

Buying Selling Volume

-Buy Volume
-Sell Volume
-Buy Volume Percent %
-Sell Volume Percent %
-Volume Index

-Buy Sell Volume-
BuyVolume>SellVolume=Blue barcolor
SellVolume>BuyVolume=Purple barcolor

-Volume Index-
VolumeIndex>length and close > open =Cyan barcolor
VolumeIndex>length and close < open =Gray barcolor
VolumeIndex<=length = Yellow barcolor
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?


+4 Rispondi
MistaGreat SnachGainsAndGo
@SnachGainsAndGo, bro pls could you help me out on how this indicator works?
good job
+2 Rispondi
Pls can anyone help me with how this volume indicator works I really wanna understand it
capam MistaGreat
@MistaGreat, a very good question and sorry for the delay. The below description is for the moving average version. In the version above I used low lag filters to try to eliminate the lag. Lines 14-18 describe the main filter.

Lines 20 & 21 are for setting the fast and slow filters. These are adjustable and the user can optimize based on the ticker data he chooses. Lines 22-27 are the main calculations to get the volume incorporated into the filtered data.

I suggest you track some of @ceyhun's work as he uses this concept in several of his scripts.

Good luck.

An N-day volume weighted moving average (VWMA) is the average of the past N days closing prices,
each weighted in proportion to the volume on that day. So if p1 is today’s closing price,
p2 yesterday’s, etc, and v1, v2, etc similarly the volumes, then the VWMA for today is

v1 * p1 + v2 * p2 + ... + vN * pN
VWMA = ---------------------------------
v1 + v2 + ... + vN
The effect is to give greater significance to days with greater volume, making the average
tend towards those days’ closing prices more. If all volumes are about the same then the
VWMA becomes a simple moving average (see Simple Moving Average).

A true VWMA, the kind frequently specified for dividend reinvestment plans and other things
needing an average price around a particular period, takes every price level and the volume
transacted at that level. Chart doesn’t have the data needed for that and the calculation
above instead effectively attributes all volume to the closing price.
+1 Rispondi
MistaGreat MistaGreat