I would recommend starting with the simplest strategy as possible and then adding complexity one layer at a time until it "breaks".
What I can do is provide you a super simple explaination/demonstration. From what I can tell, you are trying to trade on a "color change", which is really just when the indicator has a peak or trough. Thus, you need to identify when there is a peak or trough. If you think about it, a peak occurs when the most recent value is below the previous value which is above the value before that (looks like this ^ ). Vice-versa for a trough. This can be programmed like this:
if (EMA_Color[0] < EMA_Color[1] && EMA_Color[1] > EMA_Color[2])
// peak identified - go short or whatever you want it to do
if (EMA_Color[0] > EMA_Color[1] && EMA_Color[1] < EMA_Color[2])
// trough identified - do something else, like go long

Comment