Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Up/Down Volume Moving Average

Hello, is there a way to record the volume of a stock on up/down days and calculate a moving average of those volumes?
I thought maybe something like :
upvol=EquityPricing.volume if EquityPricing.close > EquityPricing.open else float('NaN')
which obviously doesn't work.

Any Help would be appreciated.
Thanks