I hope all is well. I have been working on some code that calculates the total volume from the 9:30am open. However, the code gives me the total volume on the day. How does one modify the code to only calculate from 9:30am est.
Volume from open
def totaldayvolume = volume(period = “DAY”);
plot data = if IsNaN(close[-1]) then totaldayvolume else Double.NaN;
Marked as spam
I have no idea the difference between what you are requesting and what the code you posted already does.
the code above includes premarket volume, I would like to exclude the premarket volume from the total volume
No, it does not include extended session hours. Add the volume candles on the intraday and compare to the daily. The don't match but it is NOT because the daily chart includes extended hours (even when including extended session data they totals do not match). I suspect it includes trading volume from the dark pools, something not included on intraday charts. I have submitted a request to TDA Support asking to explain this in detail.
Please log in to post questions.