Trading signal: MACD Divergence

Description

This signal was created by Eric Lefort, the famous French author and trader. This signal enables to take position when a divergence is detected between close prices and the MACD indicator.

 
Category : Trend reversal or trend resumption
Components : MACD technical analysis indicator
Time frame(s) : All
Usable for buy signals : Yes
Usable for short sell signals : Yes
More exactly, this signal analyses the trend defined by two consecutive highs or lows and then compares it to the trend defined by two consecutive highs or lows on the MACD. When these trends are opposed, there is a divergence between quotes and MACD. There are normal divergences and inverted divergences. Given there are 2 market directions and two types of divergences, four different cases of divergence will be available with this signal:

Normal bullish divergence : Inverted bullish divergence
Normal bearish divergence : Inverted bearish divergence
To select normal divergences, set the parameter ONone1Normal2Inverse3All to 2. The other options and available parameters and their meaning are listed below:

StartTime : Start of the period of activation of the signal (e.g.: 900 for 9 a.m.)
EndTime : End of the period of activation of the signal (e.g.: 1845 for 18.45 p.m.)
MessageBox : 1 = send a message when a signal appears
PlaySound : 1 = play a sound when a signal appears
SendEmail : 1 = send an email when a signal appears
EMAfast : Number of periods for the fast Exponential Moving Average
EMAslow : Number of periods for the slow Exponential Moving Average
EMA : Number of periods for the MACD signal line
smoothH : Width (in candles) of the quote highs
smoothL : Width (in candles) of the quote lows
ONone1Normal2Inverse3All : 0 = no divergence, 1 = normal divergence, 2 = inverted divergence, 3 = all divergences
DistanceMaxH : Maximum number of bars between two highs
DistanceMaxL : Maximum number of bars between two lows
DifferEntry : Entry delayed by the selected number of bars
StrengtRepulsionTicks : Optional filter: minimum strength of the signal required, expressed in ticks above the low (or below the high), to validate the signal.
With this signal, you will detect practically all the divergences corresponding to your criteria and you will never again say "what a pity, I didn’t see that divergence".

When to open a position?

It depends on the situation. An illustration of each of the four cases is presented below. Please note that the trend line on the MACD chart is in dark red and the signal’s direction is indicated by a green spike:

SignalRadar tables in NanoTrader.

Classic bearish divergence

A sell signal will appear if the quotes give a new high, which is higher than the previous high, whilst the MACD gives a new high, which is less high than the previous high.

This situation indicates that the bullish trend is weakening, making it a good time to close a long position or to take a short position against the trend.

 
SignalRadar tables in NanoTrader.

Classic bullish divergence

A buy signal will appear if quotes give a new low, which is lower than the previous low, whilst MACD gives a new low, which is less low than the previous low.

This situation indicates that the bearish trend is weakening, making it a good time to close a short position or to take a long position against the trend.

 
SignalRadar tables in NanoTrader.

Inverted bearish divergence

Inverted divergences indicate an opportunity to enter a current trend, either to strengthen an existing position or to take advantage of a new impulse.

A sell signal appears if quotes give a new high, which is less high than the previous high, whilst the MACD gives a new high which is higher than the previous high.

This situation potentially announces a new bearish impulse of quotes.

 
SignalRadar tables in NanoTrader.

Inverted bullish divergence

A buy signal appears if quotes give a new low, which is less slow than the previous low, whilst the MACD gives a new low, which is lower than the previous low.

This situation potentially announces a new bullish impulse of quotes.