What value does the HMA return when it changes color?

 

I am trying to code an HMA EA but I can't figure out what value it returns when it changes from one color to the other.

Any assistance will be highly appreciated.

 

It returns whatever value is calculated for that particular shift.

I don't know about HMA in particular, but usually is 2 buffers, 2 different colours . When the calculated value is rising it will be put in one buffer, the other left at EMPTY_VALUE. And Vice-versa.

 
GumRai:

It returns whatever value is calculated for that particular shift.

I don't know about HMA in particular, but usually is 2 buffers, 2 different colours . When the calculated value is rising it will be put in one buffer, the other left at EMPTY_VALUE. And Vice-versa.


Thanks for coming to my rescue.

I have attached the Indicator I am trying to get the return value when the color change using iCustom().

What will be the proper inputs to get two different values for the two different colors.

 
I don't know exactly what you mean. but here is corrected code ( for 625)
Files:
 
GumRai:
I don't know exactly what you mean. but here is corrected code ( for 625)

Thank you for the updated version, I just want a code that opens a buy when the color changes to green and a sell when the color changes to Red using the return value from iCustom()
 
Siladeh: I just want a code that opens a buy when the color changes to green and a sell when the color changes to Red using the return value from iCustom()
  1. Figure out which buffer is green and which is red.
  2. Detailed explanation of iCustom - MQL4 forum
 
WHRoeder:
  1. Figure out which buffer is green and which is red.
  2. Detailed explanation of iCustom - MQL4 forum

Thank you. I will definitely do that
Reason: