Download MetaTrader 5
To add comments, please log in or register
Are you a good trader? Become a signals provider and make even more money!
siladeh
51
siladeh 2014.04.18 06:09 

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.

Keith Watford
Moderator
7876
Keith Watford 2014.04.18 07:51  

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.

siladeh
51
siladeh 2014.04.18 09:24  
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.

Keith Watford
Moderator
7876
Keith Watford 2014.04.18 09:47  
I don't know exactly what you mean. but here is corrected code ( for 625)
siladeh
51
siladeh 2014.04.18 10:35  
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()
whroeder1
13596
whroeder1 2014.04.18 11:29  
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
siladeh
51
siladeh 2014.04.18 12:08  
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
/
To add comments, please log in or register