Indicators: MACD Divergence

 

MACD Divergence:

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.

Author: Alain Verleyen

 

Forum

Market Condition Evaluation based on standard indicators in Metatrader 5

newdigital, 2013.02.12 16:45

Or ... to make it shorter - we can see the rules from the image:

  

Forum

Market Condition Evaluation based on standard indicators in Metatrader 5

newdigital, 2013.02.12 16:51

There are many indicators which can be used for it. I personally prefer MACD. First of all - because MACD is Moving Average Convergence/Divergence indicator. And because there are some good MACD divergence indicators but for MT4 sorry. If someone creates MACD divergence for MT5 and place it to CodeBase or to Market for low price - it will be very good (and it will be very popular indicator for MT5).

I used MACD divergence for real trading for many months with very good results.

This is the rules for MACD divergence (taken from 'Achelis - Technical Analysis from A to Z'):



 
I only see now that a similar indicator was already published in codebase. Anyway my version has been totally rewritten and is almost 2 times faster. Though Gozilla version has 1 more feature, as it includes histogram for difference between MACD Main & Signal.
 

Hello angevoyageur,

Thank you very much for your indicator. I'm very happy to have it added on my screen.

May I make a small formatting comment? On smaller time frames the alert format is fine, but on e.g. H1 chart the alert line writes '16385 minutes chart'. I looked at the code to try to correct it, but it seems that it refers in line 319 to 'Period()'. As the culprit there?

Cheers. 

 
zeno:

Hello angevoyageur,

Thank you very much for your indicator. I'm very happy to have it added on my screen.

May I make a small formatting comment? On smaller time frames the alert format is fine, but on e.g. H1 chart the alert line writes '16385 minutes chart'. I looked at the code to try to correct it, but it seems that it refers in line 319 to 'Period()'. As the culprit there?

Cheers. 

Thanks you for the feedback. You can modify line 319 to get the following :

   Alert(message,Symbol()," , ",EnumToString(Period())," minutes chart");

I will publish to correction as soon as possible.

 

the signals  come out three bars after they are formed.

how can i correct?

thanks

 
santoroma:

the signals  come out three bars after they are formed.

how can i correct?

thanks

What are you talking about ? The divergence must be established before you can say there is a divergence.
 
angevoyageur:
What are you talking about ? The divergence must be established before you can say there is a divergence.

if the divergence is established now, for example, this indicator give the signal 3 THREE  bars later.

clear?

 

to late is to late 

 
santoroma:

if the divergence is established now, for example, this indicator give the signal 3 THREE  bars later.

clear?

 

to late is to late 

So friendly.

The signal is given at closing of a candle, 1 candle in the past (2 if you count open candle and not 3). It's normal and it's how it have to work. Divergence is based on research of extremum (top/bottom). If you have a way to detect an extremum on the current candle, I suggest you to learn programming and provide us, for free, this great innovation.

Thank you for your input.

 
angevoyageur:

So friendly.

The signal is given at closing of a candle, 1 candle in the past (2 if you count open candle and not 3). It's normal and it's how it have to work. Divergence is based on research of extremum (top/bottom). If you have a way to detect an extremum on the current candle, I suggest you to learn programming and provide us, for free, this great innovation.

Thank you for your input.

thank you for your useless answers
 
santoroma:
thank you for your useless answers

Really ? If I am wrong show it, but you probably don't even understand what I am talking about.

I am more than angry with people who come here from nowhere to download code for free, and still complain about this or that, without any argument, without any thanks.

Reason: