i have the NSE bhavcopy.  Need to calculate 20day moving average of closing price.  then give a daywise report on how many stocks are above / below 20 day moving average

i have the NSE bhavcopy.  Need to calculate 20day moving average of closing price.  then give a daywise report on how many stocks are above / below 20 day moving average