% 20day average volume

Hi there, I’ve just started learning scripting and was trying to recreate a watchlist condition that I found in one of your workbooks. The title was % 20day average volume, I managed to script this a true/false condition but cant work out how to make it show as a percentage. Any help would be much appreciated.

Hi Richard,

A true/false formula will have a condition, eg > 1 for more than 100% of the average. If you remove the condition then the watchlist column would show the value, as per this example:

VOL() / MA(VOL(), BARS=20, CALC=Close)

You can then change the watchlist Column Type to Percentage, and highlight in green those > 100% and red for < 50% of the average under Custom Labels: