In Think or Swim I could not find an acceptable script to show average daily volume in a watchlist, so I created this code.
The code works and displays the correct number. However, it shows 2 decimal places or “E7” for larger numbers.
Any help getting it to only show whole numbers would be appreciated.
Thanks, in advance Tony
[/CODE]
The code works and displays the correct number. However, it shows 2 decimal places or “E7” for larger numbers.
Any help getting it to only show whole numbers would be appreciated.
Thanks, in advance Tony
Code:
[CODE]# Tonys script to display the avarage dayley volume
input lookbackDays = 20;
def dailyAgg = AggregationPeriod.DAY;
def avgDailyVolume = Average(volume(period = dailyAgg), lookbackDays);
def roundedAvgDailyVolume = Round(avgDailyVolume);
#
plot AvgDailyVolumePlot = roundedAvgDailyVolume;
#end code