HAMA indicator returns EMA instead of colors

 
I'm developing an EA which uses HAMA indicator (attached). But the indicator returns an EMA for me, but I want that it returns the bar color (e.g. yellow or green), so I can classify market condition. How can I do this?
Files:
hama.mq4  4 kb
 
An indicator can only return double values not colors. The bar's color you have to find yourself by comparing the various return values.
 
filipefr:
I'm developing an EA which uses HAMA indicator (attached). But the indicator returns an EMA for me, but I want that it returns the bar color (e.g. yellow or green), so I can classify market condition. How can I do this?

The indicator that you attached does not have yellow or green colors.

use  iCustom calls for buffers 2 and 3 

if buffer 2 is > buffer 3, it is one color else it is the other color 

Reason: