MQL4 - automated forex trading   /  

Code Base

Code Base  Indicators  FX5_Divergence To post a new code, please log in or register

This library is for
MetaTrader 4
Download MT 4 - 5.5 Mb

Mobile trading!
Buy a license and be mobile in your trading!

Name:
FX5_Divergence
Author: FX5 (2007.06.05 13:54)
Rating: 7.6
Downloaded: 12401
Download:
 FX5_Divergence_V2.0.mq4 (12.2 Kb) View
 FX5_Divergence_v1.5.mq4 (14.6 Kb) View
 FX5_Divergence_v1.1.mq4 (12.6 Kb) View
 FX5_Divergence_V2.1.mq4 (11.3 Kb) View

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.

 

36 comments: 1 2 3 4   To post a new comment, please log in or register
Hello.
Excellent Idicator.
But the Divergence generally calculated on the specified time.
Otherwise the Indicator displays false signals sometimes.
Please, add the interval at the code (as parametr) for looking-for the divergense.

Best regards.
29.07.2007 01:29 GSB

hi

could you make a divergence indicator stohastic 14,3,3 ?i think its better than osma divergence..

than you

12.07.2007 01:43 zioncity
Zulu wrote:
The signal apears not on the last candle, but on the preavious candle, so it's REPAINT the ONE VERY IMPORTANT CANDLE. Please make a divergence without the comfirmative candle.

more power to you FX5

Hello Zulu,

The last version doesn't repaint any of the signals, however the signal is delyed one candle so it can be verified. Divergence is not an immidiate signal. It just tells us that the trend is about to reverse and we shouldn't enter untill we see evidance on this reversal, and that is why I delayed the signal in the final version.

14.06.2007 02:07 FX5
The signal apears not on the last candle, but on the preavious candle, so it's REPAINT the ONE VERY IMPORTANT CANDLE. Please make a divergence without the comfirmative candle.

more power to you FX5
13.06.2007 19:45 Zulu
fx_geezer wrote:
Thanks FX5, really appreciate it. Look forward to testing the new version. Have you already attached it to this site? Because I can't seem to find it.

I attached the new version yesterday, but it has to be apporved by the moderator of this site before it can show up on this page. It will propably be available tommorow.
02.06.2007 16:41 FX5
Thanks FX5, really appreciate it.  Look forward to testing the new version.   Have you already attached it to this site?  Because I can't seem to find it.
02.06.2007 03:42 fx_geezer
fx_geezer wrote:
Hi,

You say the indicator doesn't repaint. Unfortunately you are mistaken. The indicator DOES repaint. It will show an arrow, but if the price starts going in the opposite direction, the arrow will disappear (especialy if you change timeframes and switch back again).

Lets hope the next version doesn't repaint hey. Since repainting indicators are pretty much useless (and in fact dangerous).

Regards.

Thanks for your imprtant comment,

Yes I realized now that the indicator was repainting some of the signals. This bug come from the frequent modification made to the code to adress some suggestions. I wasn't aware of this bug until I read your message.

I rebuilt the whole code from scratch to enhance its speed and reliability. You Can now download version 2.0 of this indicator which doesn't repaint any of the signals.
02.06.2007 02:58 FX5
Hi,

You say the indicator doesn't repaint. Unfortunately you are mistaken. The indicator DOES repaint. It will show an arrow, but if the price starts going in the opposite direction, the arrow will disappear (especialy if you change timeframes and switch back again).

Lets hope the next version doesn't repaint hey. Since repainting indicators are pretty much useless (and in fact dangerous).

Regards.
30.05.2007 20:18 fx_geezer
victor19 wrote:
hi there. i just downloaded this indicator and no doubts its great with signals coming in. impressive job. question is. it seems that the alert is there but the arrow seems to be out of sight? can anyone advise me on this matter? lotsa appreciation =] following are the pics that i attach =]
so there is arrow on 15 mins, 30 mins etc. but not on the 5 min chart.

On small frame you have to set the sensitivity parameters correctly.

Set the positiveSensitivty and negativeSensitivity to: 0 instead of 0.0001 and it will work for you.

Good Luck,

21.05.2007 15:26 FX5
hi there. i just downloaded this indicator and no doubts its great with signals coming in. impressive job. question is. it seems that the alert is there but the arrow seems to be out of sight? can anyone advise me on this matter? lotsa appreciation =] following are the pics that i attach =]

so there is arrow on 15 mins, 30 mins etc. but not on the 5 min chart.
21.05.2007 08:22 victor19