MA Candles

 

I use an indicator called MA_Candles on a 5 min chart, where

MA1 =5 and MA=8. I have set blue for the color of a rising market and red for a falling market.

Can some one please explain the math that is involved in making these calculations.

Thanks