tradephoric
New member
Average Daily Volume (30 day) code for a custom watchlist:
When a stock has been trading for less than 30 days it displays NaN. Is there a way to show the average daily volume for however many days a new stock has been trading?
Example:
IPO XYZ has been trading for 2 days....
Day 1 Volume = 2 million
Day 2 Volume = 1 million
Average daily volume should display 1.5 million
Code:
Plot ADV = Average(Volume(period = "day" )[1], 30) ;
When a stock has been trading for less than 30 days it displays NaN. Is there a way to show the average daily volume for however many days a new stock has been trading?
Example:
IPO XYZ has been trading for 2 days....
Day 1 Volume = 2 million
Day 2 Volume = 1 million
Average daily volume should display 1.5 million