MACD divergences from price

MACD divergences from price

The MACD divergences spot difference between the price and the MACD histogram on recent lower low and highest high.

This indicator use the ZeroLag version of the MACD indicator that can be found on the library here:  http://www.prorealcode.com/prorealtime-indicators/zerolag-macd/

Highest and Lowest point of the MACD are saved for divergence spotting only if the signal line of the MACD has crossed its histogram. 

This indicator code is not the one of the MACD divergence indicator already embedded in the platform. It may have some differences of results between these two. This one can be used for any automated trading strategy development. The code is adapted from the RSI divergence HK-LISSE one.

 

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. dakaodo • 06/02/2016 #

    This is a pretty useful indicator. I know how to identify divergences, but this definitely simplifies the task. I found that it is best used as an early warning signal, and then you open a trade on the next signal (on another indicator of your choice) confirming this one. e.g. every time if I had bought or sold based on this signal, I had a low chance of profit or breakeven. But if on this bullish signal, I waited for the next relative swing low to open my trade, I had about an 80-90% chance of profit or at least breakeven, even when it signaled countertrend during a larger opposite trend.I’m a little new to PRC, so maybe some other newbies will appreciate a minor tip: binary indicators like this one are visually easier when you set to Histogram and set the bullish color to green, bearish to red.

    • Nicolas • 06/02/2016 #

      Thanks for your comment about feedback and tips on this indicator. Maybe you could share with us how do you jump into a trade after the divergences signals? A new forum thread would be the best to share ideas around this. Cheers.

  2. lagjan • 06/02/2016 #

    Hello can some please help,,, if upload it j dont get the same as the above image

  3. stefou102 • 06/02/2016 #

    Hello Nicolas, in my opinion a divergence is only valid if between two low points or two high poins, the MACD histogram cross its centerline. Moreover, the bigger the difference between the two low/high points, the more powerfull is the divergence. Taking that into account, I don’t see real divergence in the chart you used as example. What do you think?

    • Nicolas • 06/02/2016 #

      Divergences are made from tops and bottoms of MACD spotted when the histogram is crossing its signal line. It is a nice and smart framework developed by someone else, it is very useful because it doesn’t use any loops or arrays!

  4. thomas2004ch • 06/02/2016 #

    Hi Nicolas,

    >>This indicator code is not the one of the MACD divergence indicator already embedded in the platform…

    What’s the name of the indicator embedded in the system?

    • Nicolas • 06/02/2016 #

      Hi, I’m not the author of this indicator. The MACD divergence source code of the one embedded in the platform is not available.

  5. thomas2004ch • 06/02/2016 #

    I think I’ve found it.

    My questions:
    1. Do you have the source code?
    2. The following is a screenshot. It seems sometimes it hasn’t recognized the divergence?

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Iván
1 week ago
Madrosat Bonjour Ivan je ne sais pas si je dois écrire en Français ,anglais ,espagnol ,il y a les 3 ...
Iván Bonjour, la vérité est que ce n'est pas aussi facile qu'il n'y paraît.... Un indicateur peut...
Madrosat Merci Ivan j'espère que ce jour viendra bientôt , je sais que ce n'est pas facile car les in...
Iván
3 weeks ago
Madrosat Bonjour ivan Quelle différence il y a t il entre Extra trend et ultra trend lequel est le p...
P. Marlowe Muy bueno. ¿Podría hacerse para señalar extremos por el lado bajista? Lo mismo a la inversa....
Miro Esta es una versión del indicador, para ambos extremos. //-------------------------------...
P. Marlowe Muchas gracias ¡¡
Iván Hi. You could add these lines of code: if intradaybarindex=0 then varhigh=round((dhigh(...
RTR Edit
@toniyecla ¡gracias! más capturas aqui: https://www.prorealcode.com/wp-content/uploads/2024/10/IC...
robert123 I had a go at the 'order block' version- badly done I'm sure....but a start. // Sonarlabs ...
robert123 take ''sens1 = 5'' out and put ''rango'' in as variable
@toniyecla captura: https://www.prorealcode.com/wp-content/uploads/2024/10/sesiones_v3.png
@toniyecla y más opciones: añade una línea también en sesiones EUROPA y USA (configurable) y un texto o...
@toniyecla // Author: toniyecla - contact@rescommunesomnium.com // VARIABLES // EspHorarioVerano (b...
Alai-n Hello, take a look at this formulation made by "Blade106", Topic link attached post #227334....
@toniyecla ¡interesante acercamiento! (no lo conocía, simplemente tuve la necesidad y lo programé) pers...
Iván
1 month ago
MaoRai54 dear Ivan, it seems to be very interesting but please clarify what are all the lines I see i...
Iván Hi! you have the answer in the last line of code... MacdMiddle as "histo" style(histogra...
kats Le Top , a utiliser avec le nuage violet et alerte TN pour plus de précision.
roccafragius Hello Ivan, another great Indicator, very useful to trace the trend ( blue line) and the pos...
roccafragius Hello Ivan, very good job! May I ask you to translate teh script from TradingView named Tre...
Iván Hi! yes. You can ask for it here: https://www.prorealcode.com/free-code-conversion/
roccafragius Thank you so much Ivan! I created this request in english Translate from TradingView Indicat...
Regisnew très bel indicateur merci
jordan //---settings MAmode=0 Period=150 NumberOfMA=100 //---end of settings MA2=undefined ...
jordan dites moi si cela correspond à ce que vous cherchez
kats bonjour merci de ta reponse mais non ca fonctionne pas sympa quand même d'avoir essayé cdlt
Jean2139 Bonjour Yvan, Merci pour ton indicateur que je trouve très intéressant. Je suppose que tu ...
Suffi Hier eine kleine Korrektur: //-----Inputs-----------------------------------------// MALengt...
adeelq79 Hi Ivan, thank you for this indicator. Is it possible to include the volume of buys and sell...
achel J'ai la même erreur sur ligne 1 avec une importation dans les règles de l'art. Comment faire?
Iván Cela est probablement dû au fait que vous avez une ancienne version de l'outillage. Vérifi...
Iván
4 months ago
Iván Hola javier gracias! es importante realizar buenos backtest antes de lanzarse al mercado y ...
achel I have an error with "fillcolor" - How to solve this? / J'ai une erreur avec "fillcolor" - C...
Iván Hi! This is because you are not with V12. Just delete fillcolor

Top