MACD Divergence indicator for Metatrader
Post on: 15 Август, 2015 No Comment
MACD Divergence indicator for Metatrader
The MACD Divergence indicator displays the traditional MACD histogram indicator panel with the addition of both Regular and Hidden divergences that are also reflected on the price action screen. The indicator sends alerts via email (with attached screenshot of the chart), via mobile notification to your mobile device (Android, iPhone, iPad), and additionally pop up message and/or sound alerts in the Metatrader platform. Thats four different ways to alert the user. The periods of the MACD as well as the colors can be customized.
Here’s the indicator in action, displaying Regular/Classical MACD Divergences :
This indicator was built for the Metatrader platform, specifically MT4 for the Forex market.
Parameters
Once you add the indicator to a chart, you get the Parameters Dialog Box. Go to the Inputs tab to configure the parameters. There are essentially three sections. The first one is related to the MACD Settings (default values are 12, 26, 9 but you can change them).
(Click on image to enlarge)
fastEMA. Period length of evaluation of the fast Exponential Moving Average component of the MACD indicator.
slowEMA. Period length of evaluation of the slow Exponential Moving Average component of the MACD indicator.
signalSMA. Period length of evaluation of the signal Simple Moving Average component of the MACD indicator.
The second session of parameters is related to the interface. That is, what you want the indicator to display, and whether you want to be alerted, via a Pop Up message box, Sound, Mobile notification, Email, when a new divergence is confirmed. There are also some other properties that you can use to specify whether you are only interested in Classic divergences or Hidden ones.
(Click on image to enlarge)
drawIndicatorTrendLines: Whether you want lines to be displayed on the Indicator panel when divergences are detected.
drawPriceTrendLines: Whether you want lines to be displayed on the price action chart when divergences are detected.
displayPopUpAlert. true or false depending on whether you want an alert dialog inside Metatrader to be displayed when a new crossover is confirmed.
displaySoundAlert. true or false depending on whether you want a sound alert to be played when a new crossover is confirmed.
soundAlertFile :The sound file to be played if displaySoundAlert is set to true. The file must be located in the /Sounds/ directory of your MetaTrader installation folder.
sendMobileAlert: true or false depending on whether you want to receive notifications in your mobile device (Android, iPhone, iPad) when an alert is issued by the indicator. Your device must be configured in MT4 via Tools -> Options -> Notifications. For more information visit this guide .
Finally the Email Settings section:
The indicator has its own implementation of an email sender engine. That means, it doesn’t use the built in engine of Metatrader, but its own. The reason for that is in order to be able to send emails with attachments (chart screen shots) and also to provide users with the ability to have email alerts sent to popular public email servers such as Gmail. Those two features cannot be accomplished with Metatrader’s email sender.
sendEmailAlert: Defines whether or not you want to receive email alerts when divergences are confirmed.
server: The public SMTP server at your disposal. smtp.gmail.com is used by default.
user: your complete user name
pass: your password
port: The Port open on your SMTP server of choice. For gmail it is 465 as of this writing.