Conversione Hook

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #98814 quote
    Tradesun
    Participant
    Senior

    Salve, chiedo aiuto per convertire questo codice in formato metastock  per utilizzarlo con la prorealtime.

    Grazie.
    <pre class=”lang:probuilder decode:true ” title=”Hook”>Col A: Peak(1,H,10)<=1.1*Peak(2,H,10)
    AND Peak(1,H,10)>=0.9*Peak(2,H,10) AND Trough(1,L,10)>=1.1*Trough(2,H,10) AND Trough(1,L,10)<=0.9*Trough(2,H,10)
    AND LLV(L,25)

    Col B: Peak(1,H,5)<=1.1*Peak(2,H,5)
    AND Peak(1,H,5)>=0.9*Peak(2,H,5)AND Trough(1,L,5)>=1.1*Trough(2,H,5)AND Trough(1,L,5)<=0.9*Trough(2,H,5)
    AND LLV(L,25)

    Col C: Peak(1,H,1)<=1.1*Peak(2,H,1)
    AND Peak(1,H,1)>=0.9*Peak(2,H,1) AND Trough(1,L,1)>=1.1*Trough(2,H,1)AND Trough(1,L,1)<=0.9*Trough(2,H,1)
    AND LLV(L,25)

    Filter ColA=1 OR ColB=1 OR ColC=1

    #98816 quote
    Tradesun
    Participant
    Senior
    Col A: Peak(1,H,10)<=1.1*Peak(2,H,10) 
    AND Peak(1,H,10)>=0.9*Peak(2,H,10) AND Trough(1,L,10)>=1.1*Trough(2,H,10) AND Trough(1,L,10)<=0.9*Trough(2,H,10)
    AND LLV(L,25) 
    
    Col B: Peak(1,H,5)<=1.1*Peak(2,H,5)
    AND Peak(1,H,5)>=0.9*Peak(2,H,5)AND Trough(1,L,5)>=1.1*Trough(2,H,5)AND Trough(1,L,5)<=0.9*Trough(2,H,5)
    AND LLV(L,25)
    
    Col C: Peak(1,H,1)<=1.1*Peak(2,H,1)
    AND Peak(1,H,1)>=0.9*Peak(2,H,1) AND Trough(1,L,1)>=1.1*Trough(2,H,1)AND Trough(1,L,1)<=0.9*Trough(2,H,1)
    AND LLV(L,25) 
    
    Filter ColA=1 OR ColB=1 OR ColC=1

    ho inserito di nuovo il codice in formato metastock perchè ho visto che sopra manca una riga, questo è corretto.

    Grazie.

    #98826 quote
    robertogozzi
    Moderator
    Master

    Chiedi la conversione cliccando su “Ask for a free conversion” dal menu HELP.

    #99441 quote
    Tradesun
    Participant
    Senior

    Ho fatto come mi hai detto ma non ho avuto ancora la conversione.

    #99463 quote
    Nicolas
    Keymaster
    Master

    Perché nessuno è una macchina di codifica qui. Lo farò una volta avrò più tempo libero.

    #99471 quote
    Tradesun
    Participant
    Senior

    Ok, grazie mille!

    #99567 quote
    Nicolas
    Keymaster
    Master

    Mi dispiace dire che ci sono alcune difficoltà a farlo funzionare come le funzioni interne del codice originale .. Ecco cosa ho fatto finora ed è ancora bacato.

    percent = 1
    
    zzh = ZigZag[percent](high)
    zzl = ZigZag[percent](low)
    
    peak = zzh<>zzh[1] and zzh>zzh[1]
    trough = zzl<>zzl[1] and zzl<zzl[1]
    troughh = zzh<>zzh[1] and zzh<zzh[1]
    
    p1=0
    p2=0
    t1=0
    t2=0
    for i = 0 to 254 do 
    if peak[i] then 
    if p2=0 and p1>0 then
    p2=zzh[i]
    endif
    if p1=0 then 
    p1=zzh[i]
    endif
    endif
    if trough[i] then 
    if t1=0 then 
    t1=zzl[i]
    endif
    endif
    if troughh[i] then 
    if t2=1 then 
    t2=zzh[i]
    endif
    if t2=0 then 
    t2=1
    endif
    endif
    complete = p1>0 and p2>0 and t1>0 and t2>0
    if complete then 
    break
    endif
    next
    
    hook = P1<=1.1*P2 and P1>=0.9*P2 AND T1>=1.1*T2 AND T1<=0.9*T2 AND low=lowest[25](low)
    
    screener[hook]
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Conversione Hook


ProScreener: Scansione Mercati & Screener

New Reply
Author
author-avatar
Tradesun @tradesun Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by Nicolas
6 years, 9 months ago.

Topic Details
Forum: ProScreener: Scansione Mercati & Screener
Language: Italian
Started: 05/19/2019
Status: Active
Attachments: No files
Logo Logo
Loading...