Unlocking the MACD Histogram: Multi-Color Indicator for MetaTrader 5

Mike 2010.08.24 19:12 44 0 0
Attachments

Author: traderak20, inspired by the original MACD.mq5 from MetaQuotes, Copyright 2009, MetaQuotes Software Corp.

If you're looking to enhance your trading toolkit, the MACD Histogram is a great addition. This nifty indicator visually represents the difference between the MACD and Signal lines, giving you a clearer picture of market momentum.

You can customize the MACD line using various price types, while for the Signal line, you can choose between a Simple Moving Average (SMA) or an Exponential Moving Average (EMA). Plus, the histogram feature allows you to switch between single and multi-color displays, adding a bit of flair to your charts.

Note: This indicator requires the MovingAverages.mqh file, which is included by default in your terminal data folder under MQL5\\Include.

If you're interested in debugging, you can easily toggle error messages on or off by adjusting the following code in the source:

bool   ShowErrorMessages=false;      // turn on/off error messages for debugging

MACD Histogram, multi-color

Update History:

  • Fixed a bug with the histogram colors;

Version History:

2010 09 26: v03

  • Introduced MODE_SMMA and MODE_LWMA as new MA methods for the Signal line;
  • Rearranged ENUM_APPLIED_PRICE to be the last input parameter in the list;

2010 08 24: v02B

  • First publication of the indicator;
List
Comments 0