MQL4 - automated forex trading   /  

Code Base

Code Base  Indicators  FX5_MACD_Divergence To post a new code, please log in or register

This library is for
MetaTrader 4
Download MT 4 - 5.5 Mb

Mobile trading!
Buy a license and be mobile in your trading!

Name:
FX5_MACD_Divergence
Author: FX5 (2007.06.14 11:29)
Rating: 8.8
Downloaded: 20601
Download:
 FX5_MACD_Divergence_V1.1.mq4 (12.4 Kb) View
 FX5_MACD_Divergence_V1.0.mq4 (12.1 Kb) View


After the success of the original indicator, I decided to write more indicators for detecting divergence between price and other indicator.



This indicator will plot divergence lines on the MACD indicator and will give buy and sell signal by displaying green and red arrows. It also has a built-in alert function. As the original indicator, bullish divergence is plotted in green lines while bearish divergence is plotted in red. If the divergence is classic the line will be solid and if the type is reversed the line will be interrupted.



I hope you gets the most benedfit from this indicator.

Changes to verion 1.1:

- This version is directed to traders who do not want repainted singals. The signals are not repainted buy they are delayed one candle.

 

19 comments: 1 2   To post a new comment, please log in or register
hi...i am using the indicator for sometime now, could you tell me which timeframe its best used on, i check all the timeframes, but find 5 mins comfortable. Also, there are some hidden signals given, which are not the classic MACD divergence, how relaible are those, would apprectiate your reply.
thanks
14.08.2007 20:38 ashishbhatia

"Changes to verion 1.1: This version is directed to traders who do not want repainted singals. The signals are not repainted buy they are delayed one candle. "

Is it not possible to have a version which has the best best of both worlds? I.e. One that doesn't repaint, whilst not being delayed by a candle.

Thanks.
15.06.2007 23:27 fx_geezer
Okay, you got me there. It was too late when i looked at the results I guess ;) But finally I decided to stick to the histogram version so I made the needed corrections. Thanks for replying and posting these indicators! They are very very useful!
14.06.2007 17:45 SnaiPear
SnaiPear wrote:
FX5: I don't know then what it's called, but thake a look at this screenshot! It's the simple "MACD" indicator from the indicators list of MT4.
I compared the signals and they are not the same on your version and this what I call "oscillator".

The indicator in you chart is the regular MACD, which is used in my indicator. The diffirance is in shape only. My indicator plots MACD as a line instead of the histogram in your chart.

If you are more comportable with the histogram, you can modify the code to change how do you want MACD to appear.

Change the following code:

   SetIndexStyle(2, DRAW_LINE);

to:

   SetIndexStyle(2, DRAW_HISTOGRAM);

and you will have it done :-)

14.06.2007 17:10 FX5
FX5: I don't know then what it's called, but thake a look at this screenshot! It's the simple "MACD" indicator from the indicators list of MT4.
I compared the signals and they are not the same on your version and this what I call "oscillator".
14.06.2007 11:31 SnaiPear
Zulu wrote:
repainting one candle.

As I said, divergence is not an immedaite signal and we have to wait until we see the begining of the price reversal.

I consulted with some traders before the releasing of this indicator, and they prefered repainting than delaying the signal. After all this indicator is considered an aiding tool not a stand alone system.

However, I will release a version which will dely the signal one candle, but will not repaint. It is up to you to choose which version you like.

14.06.2007 02:15 FX5
SnaiPear wrote:
This is a very good indicator, I use the OsMA version for a long time. Now it's available to MACD, but I would really like to see it for the MACD Oscillator too if it is possible and maybe you have time for it, please! I looked into the code and would make it myself but the truth is I'm not really a programmer and couldn't do it myself :( Your work is really appreciated (at least by me, if that counts :)) and thank you very much!

What do you mean by MACD oscillator, if the MACD indicator itself is an oscillator ??

14.06.2007 02:01 FX5
repainting one candle.
13.06.2007 20:59 Zulu
This is a very good indicator, I use the OsMA version for a long time. Now it's available to MACD, but I would really like to see it for the MACD Oscillator too if it is possible and maybe you have time for it, please! I looked into the code and would make it myself but the truth is I'm not really a programmer and couldn't do it myself :( Your work is really appreciated (at least by me, if that counts :)) and thank you very much!
13.06.2007 17:54 SnaiPear