MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Source code library - Expert Advisors, Indicators and Scripts

The Freelance service is a place where you can order trading robots
To post a new code, please log in or register

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2007.06.05 11:54

FX5_Divergence - indicator for MetaTrader 4

| English Spanish Portuguese

votes: 4

Divergence is a powerful tool for detecting price reversal points from support and resistance zones. It usually gives us a relatively early signals compared to those given by moving average indicators. It can be successfully applied to many technical indicators and end up with good results.

This indicator will plot divergence lines between the price and OsMA indicator. It will give buy/sell signal according to the type of divergence that was detected. The indicator also is capable of drawing divergence lines for the whole history prices located within a specific chart.

Bullish divergence will be plotted with green lines on both price and OsMA idicator windows.

Bearish divergence will be plotted with red lines on both price and OsMA idicator windows.

I hope this indicator prove to be a useful tool.

Changes to Version 1.5:

  • A bug was fixed in updating divergence lines as the live quotes flow;
  • A sound Alert feature was added to the indicator and can be enabled or disabled from indicator settings;
  • Classical divergence is plotted in Solid Style (continues) lines, while hidden divergence is plotted in Dot Style (interuppted) lines.

Changes to version 2.0:

  • The code was rebuilt from scratch to make the indicator runs much faster.
  • The indicator now doesn't repaint any of its signals.
  • Some improvements in the signal identification algorithms.

Version 2.1:

  • I attached the last file by mistake. This is the one I wanted to attach. It is the last version. I am designating it version 2.1.

Last comments | Go to discussion (41)
raden.batman | 13 May 2012 at 21:14

How to detect that arrow?

I want to use for ea

and, is there anyone have version 3 at mq4 format?

thank you

grayghost | 7 Nov 2013 at 23:32
Thank you very much for these excellent divergence indicators. Could you make one that draws regular an hidden divergences for Schaff Trend Cycle?
wattaman | 6 Jan 2014 at 09:47

3 questions please:

  1. Is this 100% different from the other 2 divergence indicators you have or it combines them into one?
  2. Can you add the mail function as well, please?
  3. Can you make the arrow (up/down) to show one candle earlier? I'm using this indicator on H4 and it seems that it is displaying the arrow/alert one candle to late.
Thank you.
resnis | 7 Feb 2014 at 14:32

Hi, I've got an error when I'm trying to start it!

alireza abdolrazagh ghamsari
a-gh2014 | 27 Feb 2014 at 08:41

Dear Friend

your indicator is perfectttt!!!would you tel me how I can insert an alert in Buy&Sell signal in below indicator like your indicator