Indicatore divergenze stocastico lisciato

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #48145 quote
    aletrader987
    Participant
    Junior

    Buonasera a tutti.

    Vorrei se possibile il codice per segnalare divergenze sull’indicatore stocastico lisciato. Grazie anticipatamente a tutti.

    #48156 quote
    Nicolas
    Keymaster
    Master

    Ho modificato l’indicatore di divergenza stocastica che è già disponibile nel forum, per includere la versione smussata. Troverai allegato.

    #48159 quote
    aletrader987
    Participant
    Junior

    Ciao ti ringrazio. riesci però darmi il codice? ho la versione di webank e non posso caricare file.

    #48161 quote
    Nicolas
    Keymaster
    Master

    Questo è il codice, basta copiare / incollarlo nella tua piattaforma Webank.

    // DIVERGENCES STO adapted from HK-LISSE code
    
    p=14
    overboughtzone=80
    oversoldzone=20
    k=3
    d=6
    
    x = smoothedstochastic[p,k]
    y = average[d](x)
    
    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
    
    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 STO bull ", signB as " div STO bear " , 0 as " zero "
    
    #48162 quote
    aletrader987
    Participant
    Junior

    Ti ringrazio moltissimo

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

Indicatore divergenze stocastico lisciato


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by aletrader987
8 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/03/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...