More detailed volume from lower timeframe

E

ecpipo

New member
Hello, I can't remember where but I once found a thinkscript that displayed volume bars as follows :

(On a 5m chart for example)
. the total amount of accumulated buy volume from a lower timeframe (1m)
. the total amount of accumulated sell volume from a lower timeframe (1m)
All on the same 5m histogram. (1 bar is split in 2 colors, red and green)

Can anybody point me to the right script ?
Thank you
 
markos

markos

Well-known member
VIP
@ecpipo give this a try...

https://tos.mx/WKaLYw


Code:
#Shared by Jerry in TheoChat 8-2017
#HINT: This study color codes volume by amount of volume on up-tick versus amount of volume on down-tick

declare lower;

def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def Buying = V*(C-L)/(H-L);
def Selling = V*(H-C)/(H-L);

# Selling Volume
 Plot SV = selling;
 SV.setPaintingStrategy(PaintingStrategy.Histogram);
 SV.SetDefaultColor(Color.Red);
 SV.HideTitle();
 SV.HideBubble();
 SV.SetLineWeight(5);

# Buying Volume
# Plot BV = Buying;
# Note that Selling + Buying Volume = Volume.
 Plot BV =  volume;
 BV.setPaintingStrategy(PaintingStrategy.Histogram);
 BV.SetDefaultColor(Color.Dark_Green);
 BV.HideTitle();
 BV.HideBubble();
 BV.SetLineWeight(5);
 
E

ecpipo

New member
It isn't pulling data from a lower timeframe
BUT
it looks like it does exactly what I want

Thank you @markos !
 

Similar threads

Top