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