IHopeToLearn
New member
Hi,
Is there any way to combine these two chart labels into One?
Difficult to look at because they jump out of position
also take up double the space. THANKS
Please see video:
Here's the code:
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);
def totVol = Round(Buying, 0) + Round(Selling, 0) ;
def buyPercent = ( Round(Buying, 0) / totVol ) * 100;
def sellPercent = ( Round(Selling, 0) / totVol ) * 100;
#Total Volume for Regular Trading Day
#AddLabel(yes, " " + "Total Vol: " + volume (period = AggregationPeriod.DAY)+ " ", Color.WHITE);
#Volume of Current Bar
#AddLabel(yes, " " + "CurrentBar Vol: "+ volume + " ", Color.GREEN);
#Volume of the Last Bar
#AddLabel(yes, " " + "LastBar Vol: " + volume[1]+ " ", Color.LIGHT_ORANGE);
#PreMarket Volume
input startTime = 0600;
input endTime = 0829;
def startCounter = SecondsFromTime(startTime);
def endCounter = SecondsTillTime(endTime);
def targetPeriod = if startCounter >= 0 and endCounter >= 0 then 1 else 0;
rec volumeTotal = if targetPeriod and !targetPeriod[1] then volume else if targetPeriod then volumeTotal[1] + volume else volumeTotal[1];
#AddLabel(yes, " " + Concat("PreMrket Vol: ", volumeTotal)+ " ", Color.VIOLET);
# Declare variables
def BuyingVolume = if close > open then volume else 0;
def SellingVolume = if open > close then volume else 0;
#Seller Total
AddLabel(yes, "" + Round(sellPercent, 0) + "% S", if Selling > Buying then Color.LIGHT_RED else Color.BLACK);
#Buyer Total
AddLabel(yes, "" + Round(buyPercent, 0) + "% B", if Buying > Selling then Color.GREEN else Color.BLACK);
#Volume color coded by amount of volume on up-tick versus amount of volume on down-tick
Is there any way to combine these two chart labels into One?
Difficult to look at because they jump out of position
also take up double the space. THANKS
Please see video:
Here's the code:
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);
def totVol = Round(Buying, 0) + Round(Selling, 0) ;
def buyPercent = ( Round(Buying, 0) / totVol ) * 100;
def sellPercent = ( Round(Selling, 0) / totVol ) * 100;
#Total Volume for Regular Trading Day
#AddLabel(yes, " " + "Total Vol: " + volume (period = AggregationPeriod.DAY)+ " ", Color.WHITE);
#Volume of Current Bar
#AddLabel(yes, " " + "CurrentBar Vol: "+ volume + " ", Color.GREEN);
#Volume of the Last Bar
#AddLabel(yes, " " + "LastBar Vol: " + volume[1]+ " ", Color.LIGHT_ORANGE);
#PreMarket Volume
input startTime = 0600;
input endTime = 0829;
def startCounter = SecondsFromTime(startTime);
def endCounter = SecondsTillTime(endTime);
def targetPeriod = if startCounter >= 0 and endCounter >= 0 then 1 else 0;
rec volumeTotal = if targetPeriod and !targetPeriod[1] then volume else if targetPeriod then volumeTotal[1] + volume else volumeTotal[1];
#AddLabel(yes, " " + Concat("PreMrket Vol: ", volumeTotal)+ " ", Color.VIOLET);
# Declare variables
def BuyingVolume = if close > open then volume else 0;
def SellingVolume = if open > close then volume else 0;
#Seller Total
AddLabel(yes, "" + Round(sellPercent, 0) + "% S", if Selling > Buying then Color.LIGHT_RED else Color.BLACK);
#Buyer Total
AddLabel(yes, "" + Round(buyPercent, 0) + "% B", if Buying > Selling then Color.GREEN else Color.BLACK);
#Volume color coded by amount of volume on up-tick versus amount of volume on down-tick