Download MetaTrader 5

Compare Momentum to MACD

To add comments, please log in or register
Having a great idea? Share it on the traders' Forum!
Amine Ahsous
9411
Amine Ahsous 2015.03.28 05:33 

Hello Community :)

This is my first Topic here so i come for help .. I know there are some guys here who are very advanced .

The problem i face is i couldn't compare if Macd main/signal line is above/below Momentum .

1st 

 

I can't write .. "if(iMomentum>iMACD) " Because as you know each indicator has its own calculations .. As we see in the above picture we can know if Momentum is bigger/lower than MACD , But in MQL4 how ?? 

Amine Ahsous
9411
Amine Ahsous 2015.03.31 08:47  
No body answers .. come on guys give it a try :p
Drazen Penic
2540
Drazen Penic 2015.03.31 10:07  

  • Show the code you wrote.
  • Read documentation on iMacd() and iMomentum(). You will find examples there. 

Amine Ahsous
9411
Amine Ahsous 2015.04.02 11:34  
drazen64:

  • Show the code you wrote.
  • Read documentation on iMacd() and iMomentum(). You will find examples there. 

I know how to code an EA using Indicators .. That's not the problem 

The problem here is how to compare MACD values to Momentum values 

You can't say for example if (macdsignal>momentumsignal) . Simply because Momentum has its own calculation which is completely different than MACD calculations :) . 

Amine Ahsous
9411
Amine Ahsous 2015.04.02 11:39  

Try to make a BUY order open when Momentum crosses Signal line of MACD . 

Note : Momentum and MACD are applied to Close Price . none of them is applied to x Indicator's Data .

As we are programmers .. We shouldn't stop at any problem we face during coding , Because we may face the same problem many times again and then we never grow up our skills .

We should find a solution for this and take it as a challenge . 

ps

To add comments, please log in or register