Download MetaTrader 5

HAMA indicator returns EMA instead of colors

To add comments, please log in or register
Find out how social trading can improve your profits
filipefr
58
filipefr 2015.02.08 14:24 
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
Carl Schreiber
6580
Carl Schreiber 2015.02.08 15:25  
An indicator can only return double values not colors. The bar's color you have to find yourself by comparing the various return values.
Keith Watford
Moderator
9603
Keith Watford 2015.02.08 21:49  
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 

To add comments, please log in or register