Simple Moving average with color change of bars

 

Hi,

 

Appreciate if any of the great coding minds here can write a code to do the following simple moving average function

 

Change the bars color 

Green - SMA 5 > SMA 15    &    SMA 5 > SMA 30

Red  -   SMA 5< SMA 15     &    SMA 5 < SMA 30

Yellow - SMA 5 > SMA 15   &   SMA 5 < SMA 30 

 

 Thanks.

 

SH. 

 
Reason: