@rad14733
I was able to set average (voume, 30)
plot vol = Average(volume, 30);
AddLabel(yes, vol, Color.BLACK);
AssignBackgroundColor(Color.YELLOW);
and aggregation period is set to D.
When I check out xbio ticker & insert it on my graph, I see horserider's volume labels reads 30D Avg: 820,000 & on the column that I have made using above script.. it reads 6,281,157. Could you advise how I can have horserider's label (30D Average) switched into a column. Thanks again for genuine effort & guiding me.
Edit: I had to replace "def" with "plot"
#Volume Data
def volLast30DayAvg = (volume(period = "DAY")[1] + volume(period = "DAY")[2] + volume(period = "DAY")[3] + volume(period = "DAY")[4] + volume(period = "DAY")[5] + volume(period = "DAY")[6] + volume(period = "DAY")[7] + volume(period = "DAY")[8] + volume(period = "DAY")[9] + volume(period = "DAY")[10] + volume(period = "DAY")[11] + volume(period = "DAY")[12] + volume(period = "DAY")[13] + volume(period = "DAY")[14] + volume(period = "DAY")[15] + volume(period = "DAY")[16] + volume(period = "DAY")[17] + volume(period = "DAY")[18] + volume(period = "DAY")[19] + volume(period = "DAY")[20] + volume(period = "DAY")[21] + volume(period = "DAY")[22] + volume(period = "DAY")[23] + volume(period = "DAY")[24] + volume(period = "DAY")[25] + volume(period = "DAY")[26] + volume(period = "DAY")[27] + volume(period = "DAY")[28] + volume(period = "DAY")[29] + volume(period = "DAY")[30]) / 30;
def today = volume(period = "DAY");
It provides same data/numbers of 30D average volume.
Edit II: upon reviewing the numbers (30D average volume) are showing up in a manner of value instead of what default volume column shows in the scanner. Eg: xbio 30DAV is showing 820545.07 instead of 820,545. Could you advise how to round them please