There is hardly any difference between your request and the previous so this is very close to being a duplicate question. But I decided to approve this question and created a solution which is designed to serve the interests of the majority of our viewers. Which means I have adjusted the color and the way the values are displayed so that it will work on a wide variety of settings which users of Thinkorswim may adjust to control the "look and feel" of the platform.
This solution works equally well as both a custom watchlist column or a chart study.
There are no such things as "filters" in custom watchlists on Thinkorswim. We can display values, but we cannot filter the contents of the watchlist based on those values. So if you refer to this solution as a "filter", that terminology is a bit misleading. The official term for this, as given by Thinkorswim, is a "Custom Quote Field". But most folks tend to understand it more clearly when it is described as a "custom watchlist column".
input length = 14;
def priorBarSignal = volume[1] > Average(volume[1], length);
AddLabel(yes, if priorBarSignal then Concat("Prior Vol > Avg: ", volume[1]) else Concat("Prior Vol < Avg: ", volume[1]), if priorBarSignal then Color.GREEN else Color.GRAY);
For those interested in adapting this to show the signal based on the current bar instead of the previous then you can user the other solution which I have included below:
input length = 14;
def priorBarSignal = volume > Average(volume, length);
AddLabel(yes, if priorBarSignal then Concat("Vol > Avg: ", volume[1]) else Concat("Vol < Avg: ", volume[1]), if priorBarSignal then Color.GREEN else Color.GRAY);