Compare close prices to simple moving averages - Is stock is moving above SMA5?

We've added a new view to all our data tables called 'Close to Moving Average s' which will provide the following columns:

Close price to 5-Day Simple Moving Averages (%)

Close price to 7-Day Simple Moving Averages (%)

Close price to 10-Day Simple Moving Averages (%)

Close price to 20-Day Simple Moving Averages (%)

Close price to 50-Day Simple Moving Averages...