Hidden Divergence

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #36335 quote
    Robert
    Participant
    Average

    Hi Nicolas and Traders,

    in the last days i’ve done some backtest on divergence, since i realy think it really gives an edge.
    Results were pretty good and i like the idea behind it.
    I personally used CCI-Divergence, based on the cci-divergence indicator in the following thread, posted from Nicolas and based on the code from HK-LISSE:

    https://www.prorealcode.com/reply/10038/

    Code is:

    // DIVERGENCES CCI adapted from HK-LISSE code
    
    x = CCI[p]
    y=average[filterperiod](x)
    
    //  BEARISH DIVERGENCES CCI
    if x>overboughtzone then
    hi=max(hi,x)
    hico=max(hico,max(high,high[1]))
    endif
    if x crosses under y then
    sto2b=sto1b
    sto1b=hi
    hi=0
    p3b=p1b
    p2b=max(p1b,hico1)
    p1b=max(highest[3](high),hico)
    if p2b=p1b then
    p2b=max(p3b,p4b)
    endif
    hico=0
    hico1=0
    endif
    if x<y then
    p4b=hico1
    hico1=max(hico1,high)
    endif
    if p1b>p2b and sto1b<sto2b and x crosses under y and x<x[1] then
    signB= -2
    else
    signB= 0
    endif
    //  BULLISH DIVERGENCES CCI
    if x<oversoldzone then
    lo=min(lo,x)
    lowco=min(lowco,min(low,low[1]))
    endif
    if x CROSSES OVER y  then
    sto2h=sto1h
    sto1h=lo
    lo=100
    p3h=p1h
    p2h=min(p1h,lowco1)
    p1h=min(lowest[3](low),lowco)
    if p2h=p1h then
    p2h=min(p3h,p4h)
    endif
    lowco=100000
    lowco1=100000
    endif
    if x>y then
    p4h=lowco1
    lowco1=min(lowco1,low)
    endif
    if p1h<p2h and sto1h > sto2h and x crosses over y and x>x[1]  then
    signH= 2
    else
    signH= 0
    endif
    ////////////////////////////////////////////////
    return       signH as " div CCI H ", signB as " div CCI B " , 0 as " zero "

    Since i’m not very clever at coding, my question is:

    Is it possible to add hidden divergences to the indicator?
    This would be absolutely awesome!
    Should be a almost complete toolkit to trade then.

    Any help would be highly appreciated 🙂

    Many thanks in advance and best regards

    Robert

    #36599 quote
    Robert
    Participant
    Average

    Nobody? 🙁

    #36617 quote
    GraHal
    Participant
    Master

    Maybe make it easy and add a link to info on hidden divergence? I had to look to refresh myself! 🙂

    http://www.babypips.com/school/high-school/trading-divergences/divergence-cheat-sheet.html

    http://www.babypips.com/school/high-school/trading-divergences/hidden-divergence.html

    Cheers
    GraHal

     

     

    #36644 quote
    Robert
    Participant
    Average

    Sorry GraHal,

    you’re absolutely right!
    Totally forgot about it.
    Thank you very much for posting the links.

    Shortly for everyone:

    UPTREND

    Price: Higher Low
    Indicator: Lower Low

    -> Price should continue to rise

    DOWNTREND

    Price: Lower High
    Indicator: Higher High

    -> Price should continue to fall

    Greetings,

     

    Robert

    #97936 quote
    JJ Tec
    Participant
    Veteran

    Hola,

    ¿alguien ha redactado el codigo para divergencias ocultas?

    #97954 quote
    Vonasi
    Moderator
    Master

    Juanjo– English only in the English forums please.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Hidden Divergence


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Robert @robert Participant
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by Vonasi
6 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/22/2017
Status: Active
Attachments: No files
Logo Logo
Loading...