After hashing out the details in the comment section of this previous post…. https://www.hahn-tech.com/ans/day-dollar-volume-scanner/
…we have the following code. Basically this is set to work on any intraday time frame. The concept being the lower the time frame used, the more accurate the results.
Here is the code:
def volumeDollars = Round(volume * hlc3, 0);
def newDay = GetDay() <> GetDay()[1];
rec todaysVolumeDollars = if newDay then volumeDollars else todaysVolumeDollars[1] + volumeDollars;
AddLabel(yes, Concat("Total Vol Dollars: ", todaysVolumeDollars), Color.WHITE);
already been asked.