Premarket volume label in charts

tradeimbalances

New member
Hi

Many discussions on Volume.

I have a specific labels I would like to have in my volume sub chart.

Has anyone ever seen a volume label that just adds up all the premarket volumes
1. label for the post market of the prior day
2. label for the premarket of that day only
3. Total of post and pre market volume also

If I go back to prior charts in the weeks then the calculation is only based on that days transactions.

Has anyone looked at this?

Thank you in advance.

Cheers
 

s1111

Active member
Hi

Many discussions on Volume.

I have a specific labels I would like to have in my volume sub chart.

Has anyone ever seen a volume label that just adds up all the premarket volumes
1. label for the post market of the prior day
2. label for the premarket of that day only
3. Total of post and pre market volume also

If I go back to prior charts in the weeks then the calculation is only based on that days transactions.

Has anyone looked at this?

Thank you in advance.

Cheers
Here you go


# Box Volume Stats
# Version 1.2
# Created by: Enigma
# Created: 05/18/17
# Modified by: Surya Kiran C ## Included rVolume label and Changed length as input. ## Additionally Pre-Market, 1Hr Volume, AfterHour Volume labels are added.


declare on_volume;

input length = 30;
input ShowDayAvg = yes;
input ShowTodayVolume = yes;
input ShowPercentOfDayAvg = yes;
input UnusualVolumePercent = 200;
input ShowBarAvg = yes;
input ShowCurrentBar = yes;

input PreMktVol = yes;
input RTH1HrVol = yes;
input PostMktVol = yes;


def VolDayAvg = (fold index = 1 to length + 1 with Avg = 0 do (Avg + volume(period = "DAY")[index])) / length;
def AvgBars = (fold index2 = 1 to length + 1 with Bar = 0 do (Bar + volume[index2])) / length;

def Today = volume(period = "DAY");
def PercentOfDayAvg = Round((Today / VolDayAvg) * 100, 0);

def CurVol = volume;


def offset = 1;
def ADV = Average(volume, length)[offset];
def rVol = volume / ADV;

# Labels

#if GetAggregationPeriod() >= AggregationPeriod.DAY then 0 else if 1HrRTHVol then 1 else 0,

AddLabel(ShowDayAvg, length + "Day Avg: " + Round(VolDayAvg, 0) + " ", Color.LIGHT_GRAY);
AddLabel(ShowTodayVolume, "Today: " + Today + " ", (if PercentOfDayAvg >= UnusualVolumePercent then Color.GREEN else if PercentOfDayAvg >= 100 then Color.ORANGE else Color.LIGHT_GRAY));
AddLabel(ShowPercentOfDayAvg, PercentOfDayAvg + "%", (if PercentOfDayAvg >= UnusualVolumePercent then Color.GREEN else if PercentOfDayAvg >= 100 then Color.ORANGE else Color.WHITE) );
AddLabel(ShowBarAvg, "Avg" + length + "Bars: " + Round(AvgBars, 0) + " ", Color.LIGHT_GRAY);
AddLabel(ShowCurrentBar, "Cur Bar: " + CurVol + " ", (if CurVol >= AvgBars then Color.GREEN else Color.ORANGE));

AddLabel(yes, "rVol :" + Round(rVol, 2));
#AddLabel(yes, "ADV :" + ADV);
#AddLabel(yes, asPercent(rVol)); # remove "#" infront of Addlabels to select prefer choice
#AssignPriceColor(if rVol >= 1 then color.dark_red else if rVol <=.5 then Color.black else color.Gray);

#Pre, 1Hr RTH, AfterHours Volumes.
##if GetAggregationPeriod() >= AggregationPeriod.DAY then 0 else if PreMktVol then 1 else 0

input PrestartTime = 0400;
input PreendTime = 0929;

def PreMkt = SecondsFromTime(PrestartTime) >= 0 and SecondsTillTime(PreendTime) >= 0;
def PreVolMins = if PreMkt and !PreMkt[1] then volume
else if PreMkt then PreVolMins[1] + volume
else PreVolMins[1];
AddLabel(if GetAggregationPeriod() >= AggregationPeriod.DAY then 0 else if PreMktVol then 1 else 0, "PreMktVol = " + PreVolMins + " ", Color.Gray);
# End Volume PreMarket

input RTH1HrstartTime = 0930;
input RTH1HrendTime = 1029;

def RTH1Hr = SecondsFromTime(RTH1HrstartTime) >= 0 and SecondsTillTime(RTH1HrendTime) >= 0;
def RTH1HrMins = if RTH1Hr and !RTH1Hr[1] then volume
else if RTH1Hr then RTH1HrMins[1] + volume
else RTH1HrMins[1];
AddLabel(if GetAggregationPeriod() >= AggregationPeriod.DAY then 0 else if RTH1HrVol then 1 else 0, "RTH1HrVol = " + RTH1HrMins + " ", Color.Gray);
#End Volume RTH First 60 Mins

input PoststartTime = 1600;
input PostendTime = 1959;

def PostMkt = SecondsFromTime(PoststartTime) >= 0 and SecondsTillTime(PostendTime) >= 0;
def PostVolMins = if PostMkt and !PostMkt[1] then volume
else if PostMkt then PostVolMins[1] + volume
else PostVolMins[1];
AddLabel(if GetAggregationPeriod() >= AggregationPeriod.DAY then 0 else if PostMktVol then 1 else 0, "PostMktVol = " + PostVolMins + " ", Color.Gray);
# End Volume PostMarket
 

tradeimbalances

New member
Hi

Thank you.

I have this working in TOS.

Just need clarification.

What does RTH1Hr stand for?

What settings would you use for
1. Pre start time - 400 - what does this do?
2. Pre end Time - 929 - what does this do?
3. rt h1 hrstart time - 930 - what does this do?

Checked AMC ( 5628566 Nasdaq site vs 4348959 ) and Tap (1067573 vs 855918 )Fridays PM volume and have differences with what NASDAQ reports on there site - do I need to change the settings ?

Cheers
 
Last edited:

s1111

Active member
Hi

Thank you.

I have this working in TOS.

Just need clarification.

What does RTH1Hr stand for?

What settings would you use for
1. Pre start time - 400 - what does this do?
2. Pre end Time - 929 - what does this do?
3. rt h1 hrstart time - 930 - what does this do?

Checked AMC ( 5628566 Nasdaq site vs 4348959 ) and Tap (1067573 vs 855918 )Fridays PM volume and have differences with what NASDAQ reports on there site - do I need to change the settings ?

Cheers

I didn't change any setting . Pre market starts at 4 am to 9:29 am , after 9:30 am it's regular trading hours.
Pth = premarket trading hour volume
Rth1 = regular trading hour, and 1st hour after opening
Postmartvol = Volume after market closed at 4pm
You can turn on and off labels you don't want to see . I only use this for premarket volume. Hope this helps , happy trading.
 
Last edited:

Similar threads

Top