Download MetaTrader 5

MACD indicator

To add comments, please log in or register
Sergey Golubev
Sergey Golubev  

We are continuing discussion about the indicators.

We have the following thread:

Now we are talking about MACD.

Sergey Golubev
Sergey Golubev  

"Technical Analysis from A to Z":

The MACD ("Moving Average Convergence/Divergence") is

a trend following momentum indicator that shows the relationship between two moving averages of prices.

The MACD was developed by

Gerald Appel, publisher of Systems

and Forecasts.

The MACD is the difference between

a 26-day and 12-day exponential moving average.

A 9-day exponential moving average,

called the "signal" (or "trigger") line

is plotted on top of the MACD to show

buy/sell opportunities. (Appel specifies

exponential moving averages as percentages.

Thus, he refers to these three moving averages

as 7.5%, 15%, and 20% respectively.)[/CODE]

Appel, Gerald. The Moving Average Convergence-Divergence Method. Great Neck, NY: Signalert, 1979.


The MACD proves most effective

in wide-swinging trading markets.

There are three popular ways

to use the MACD: crossovers,

overbought/oversold conditions,

and divergences.[/CODE]


The basic MACD trading rule is

to sell when the MACD falls below its

signal line. Similarly, a buy signal occurs

when the MACD rises above its signal line.

It is also popular to buy/sell when

the MACD goes above/below zero.[/CODE]

[CODE]Overbought/Oversold Conditions

The MACD is also useful as an

overbought/oversold indicator.

When the shorter moving average

pulls away dramatically from the

longer moving average (i.e., the MACD rises),

it is likely that the security price is

overextending and will soon return

to more realistic levels.

MACD overbought and oversold

conditions exist vary from security

to security.


A indication that an end to the current

trend may be near occurs when

the MACD diverges from the security.

A bearish divergence occurs when

the MACD is making new lows while

prices fail to reach new lows.

A bullish divergence occurs when

the MACD is making new highs

while prices fail to reach new highs.

Both of these divergences are most

significant when they occur

at relatively overbought/oversold levels.


The MACD is calculated by

subtracting the value of a 26-day

exponential moving average from

a 12-day exponential moving average.

A 9-day dotted exponential

moving average of the MACD

(the "signal" line) is then

plotted on top of the MACD.
Sergey Golubev
Sergey Golubev  


eSignal MACD: elite section post.

MACD and PPO. PPO_Lnx and MACD_Lnx (elite section):

- indicators old version,

- indicators new version,

- explanation is here and here.

MACD_LSMA_EMA indicator, MACD_DEMA and DEMA_RLH2 are on this post (elite section).

MACD_T3 indicator: elite section post.

MACD indicator's versions with alert: here, here, here (email and alert), here (BB_MACD_withAlert.mq4) and here (alert,sound and email).

MTF MACD versions are here, here, here (2 indicators), here, here (MTF ZeroLagMACD), here (MACD# MTF by cja), here (MTF_MACD_Bars by cja), here, here (MTF_zlagMACD_v3 with automatic multiplier), here (mtf MACD by lukas1), here (OsMACD (MACD&OsMA); OsMA+ mtf OsMA coloredline and MTF_MACD/OsMACD), here (macd alpha and MACD__MTF), here (MTF MACD Line), here (MACD_HULL), here (macd sidebar 4 colors), here (#MTF_BB_MACD), here (mod v3 cja's 4in1 macd), here (bbmacd v1.3).

MACD colour histogram: many indicators are on this thread.

MACD 2 Colour HISTOGRAM and OsMA Color 1S: the thread.

OsMA Color and MACD HISTO are here.

Standard MACD Indicators: many variations of standard MAD is on this thread: MACD 2 Colour HISTOGRAM for a Black or dark background, MACD_2Colour HISTO for a white or light background, two macd lines indicator, 2 lines & histogram MACD for any timeframe.

MACD_4CZ : 4color up/dn over/under Zero - this thread.

MACD colored lines indicator: this post.

MACD indicator on price chart: the thread.

How Plot MACD Line on Price Chart: the thread.

3 color MACD indicator is here and here.

Guppy MACD is on this thread.

Bb Macd dots is here.

MACD Dot indicator is here.

MACD Adjustable is here.

66-macd: indicators for Metatrader 3.

Full Macd Divergence with Alert Indicator is on this thread.

Sergey Golubev
Sergey Golubev  


MTF MACD with two lines and histogram: the thread.

MACD+OsMA v1.1 is on this thread.

MACD 2 lines is on this thread.

Digital MACD is on this post.

Many Jurik MACD indicators are on this thread.

G#MACD_MTF is here (and on many other threads as part of some trading systems.

FLATTRAND_w_MACD_mtf filter is on this page.

MACD Color Histogram Alert indicator is on this post.

MTF MACD in Color with 3 lines with alert is on this post.

Sergey Golubev
Sergey Golubev  


Simple MACD w/ Semi-Martingale MM is here.

MACD Code: good idea to code MACD as the same with different platforms and different coding sources as ebooks and so on. Just to compare many MACD codes explanation to code the right one. The thread is here.

MACD Parabolic SAR: the idea is here.

CCI + MACD: the idea is on this thread.

Schaff Trend Cycle: the thread about what is the connected between Schaff Trend Cycle and MACD and some ideas about it.

Multi-indics indicator: multi- indicators indicator is here.

Combination of bollinger bands and macd: somewhere on this thread.

Sergey Golubev
Sergey Golubev  

Trading Systems:

MACD(5,34,5) for asctrend M5 system:

- elite section thread (all the attachments are on the 1st post);

- some image with description.

Better MACD Divergence Signals is here.

Farewell setup: trading system is here.

Fruity Pebbles Trading System with many MACD indicators converted from VT.

Sergey Golubev
Sergey Golubev  


GridMACD is here (fixed version)..

- Explanation about this EA/settings is here.

- GridMACD with trailing stop version development thread.

MACD histogram EA is here.

Simple MACD EAs:

- Automated MACD Trader: public thread.

- SIMPLE-MACD-EA: public thread.

TimeBasedEA: buy and sell specific currency pair at specific time based on MACD_Sample EA is here.

MACD-WDD EA: public thread.

MACD_signal EA: on this post.

EA with StepMA and MACD: the thread.

based.on MACD300 pip/month article as reference on 4H-TF-GBPJPY>+88% backtest: EA based on MACD.

Sergey Golubev
Sergey Golubev  

More to follow.

(reserved post).


MACD with any MA

I modified MACD a little bit so you can choose mode sma, ema, smma, or lwma.


Where did you get MACD indicatator with two lines like the above chart ?


OSMA Indicator Problem


I found the OSMA color indicator but it is showing different results from MT4 OSMA.

Image and indicator attached.

Can someone fix this for me



mt4_osma.mq4 3 kb