That probably isn't doing what you want. It is normalizing 1 or 0 (true or false) to 5 decimal places.
What exactly do you want? Your code is comparing 2 moving averages.
May I ask why you want to normalize the moving average?
That is simple.
If price is above your moving average it has, and if price is below moving average it has not.
If you want to know that for 50 bars you can use
To get the price do
Or you can substitute iLow and iHigh with your moving average of course.
Then you have the bar index number of the lowest and highest bars out of 50 last bars.
And then you can compare these min and max values to the same bars of your moving average and see if there was a crossover or not.