Multi Colored Moving Average

 

I am looking for a multi colored Moving Average like the one in the picture that changes the color dynamically but not permanently, based on whatever conditions coded.  

 For example in the picture the MA line is red and then turns blue, red again, and so on. 

 

 

 
Search for the AllAverages v2.5 indicator.
Reason: