Add a Colored MA to an existing Indicator

Hello,

I am not familiar with the tradovate coding language and I would like to modify an existing community indicator titled “p2f - Lonesome Cumulative Delta”. This indicator allows you to plot a moving average of the CVD values (either an SMA or EMA) and I would like to add the ability to define two different colors for the MA of the CVD values so that the MA is one color is if in an uptrend and a different color is if in a downtrend. Does anyone knows a simple way to do this? Here is the link to the original indicator:

Thanks!