Download MetaTrader 5

Indicators: MACD_Histogram

To add comments, please log in or register


The indicator displays divergences between a price chart and MACD histogram signal line.

The divergences are shown on a chart as line segments. The trade signals are displayed as colored arrows, also it shows alerts.

Author: Nikolay Kositsin


Aron Radoschofski
Aron Radoschofski  


i can not use this indicators because i have a little problem with the SmoothAlgotitms.

The problem is in the code ...

I get the error: "Can not be used for static array Allocated" at this point in the code:


/ / bPriceSeries (symbol, timeframe, int rates_total, applied_price, bar set, price_)

/ / + --------------------------------- +


/ / ----

    uint bar;

    double series [1];

------->!!!    ArraySetAsSeries (series, true);    !!!!<----------

can anyone help me with this problem???

Biantoro Kunarto
Biantoro Kunarto  

Try this:

    uint bar;

    double series [];  <---- change

    ArraySetAsSeries (series, true);
Aron Radoschofski
Aron Radoschofski  
Thanks Dude :) it works...
Sergey Golubev
Sergey Golubev  

A Quicker Trade Signal Using MACD

  • The MACD and Signal line crossover gives traditional buy/sell signals.
  • Histogram is the difference between the MACD and Signal line.
  • We can enter when Histogram begins to get smaller rather than wait for a cross.
Most technical traders have experience using the more popular oscillators, RSI, CCI, and MACD, etc. But many traders I’ve taught are not aware of the alternative way to use the MACD. In this article we will discuss how to use MACD’s histogram to open trades and show how in many cases we can get a quicker entry than the traditional MACD method.

What Does the Histogram Represent?

The green histogram or “bar chart” included in the background of the MACD displays the difference between the MACD and Signal line. When the MACD is above the Signal line, the bar is positive. When the MACD is below the Signal line, the bar is negative. The actual height of the bar is the difference between the MACD and signal line itself.

MACD’s Histogram Construction

The chart above shows what the Histogram represents. The first label shows how the MACD is higher than the Signal line. This creates a positive green bar that has a height equal to the difference of the two lines. The second example the MACD is below the Signal line. This creates a negative green bar that has a height equal to the difference between the two lines. We can also see that when the Blue and Red lines cross, the histogram flips from one side to the other.

How to Enter Based On the Histogram

So how can we read the histogram to generate trade signals? We first want to track the histogram as it moves away from the zero line, in other words, track it as its bars grow larger. The actual signal comes when the histogram no longer gets larger and produces a smaller bar. Once the histogram prints a smaller bar, we look to trade in the direction of the histogram’s decline. We can see an example of this in the chart below:

MACD Histogram Entry Logic

The Sell signal on the left was created by four growing bars in a row followed by a fifth bar that closed smaller. Five bars later, we see the MACD line crossing below the Signal line which is a traditional MACD signal. This later signal would have missed a majority of the move that the Histogram signal would have caught. Therefore, using the histogram as a signal can earn us a greater number of pips.

The Buy signal on the right is a similar story. We saw four bars growing consecutively until a 5th bar was created that equaled the 4th. We want to wait until a bar is smaller, so the trigger would have been presented after the 6th bar closed. This buy trade came several bars before the MACD/Signal cross and gave us a better entry as well.
Once we are in the trade, we can use sound Money Management to close out the trade appropriately.

And The Rest is Histogram

This entry strategy is fairly straight forward and can quickly be adopted by a technical trader.
To add comments, please log in or register