Fractal Zig Zag continuare a tracciare durante l'ultimo periodo

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #99014 quote
    Hendrix
    Participant
    Senior

    Per il codice in copia è possibile che oltre a disegnare il segmento dall’ultimo punto di inversione ne disegni anche uno che vada all’ultimo prezzo e si muova con esso.

     

    Grazie

     

     

     

    //—external parameters

    cp = 26

    once lastpoint = 0

    if high[cp] >= highest[2*cp+1](high) then
    LH = 1
    else
    LH = 0
    endif

    if low[cp] <= lowest[2*cp+1](low)  then
    LL = -1
    else
    LL = 0
    endif

    if LH = 1 then
    TOPy = high[cp]
    TOPx = barindex[cp]
    endif

    if LL = -1 then
    BOTy = low[cp]
    BOTx = barindex[cp]
    endif

    if LH>0 and (lastpoint=-1 or lastpoint=0) then
    DRAWSEGMENT(lastX,lastY,TOPx,TOPy) COLOURED(255,255,0)
    lastpoint = 1
    lastX = TOPx
    lastY = TOPy
    endif

    if LL<0 and (lastpoint=1 or lastpoint=0) then
    DRAWSEGMENT(lastX,lastY,BOTx,BOTy) COLOURED(255,255,0)
    lastpoint = -1
    lastX = BOTx
    lastY = BOTy
    endif

    RETURN

    #99016 quote
    swapping
    Participant
    Master
    //—external parameters
    
    cp = 26
    
    once lastpoint = 0
    
    if high[cp] >= highest[2*cp+1](high) then
    LH = 1
    else
    LH = 0
    endif
    
    if low[cp] <= lowest[2*cp+1](low) then
    LL = -1
    else
    LL = 0
    endif
    
    if LH = 1 then
    TOPy = high[cp]
    TOPx = barindex[cp]
    endif
    
    if LL = -1 then
    BOTy = low[cp]
    BOTx = barindex[cp]
    endif
    
    if LH>0 and (lastpoint=-1 or lastpoint=0) then
    DrawSegment(lastX,lastY,TOPx,TOPy) coloured(255,255,0)
    lastpoint = 1
    lastX = TOPx
    lastY = TOPy
    endif
    
    if LL<0 and (lastpoint=1 or lastpoint=0) then
    DrawSegment(lastX,lastY,BOTx,BOTy) coloured(255,255,0)
    lastpoint = -1
    lastX = BOTx
    lastY = BOTy
    endif
    
    return

    Hello Hendrix, the button [Insert PRT code] is your friend 😉

    #99018 quote
    Hendrix
    Participant
    Senior

    Thanks

    #99025 quote
    Nicolas
    Keymaster
    Master

    Ho modificato il titolo dell'argomento, non stava descrivendo nulla … Quindi vuoi che l'ultimo punto sia esteso con un segmento all'attuale candelabro e al prezzo? e tracciato in tempo reale?

    #99042 quote
    Hendrix
    Participant
    Senior

    Si perfetto sarebbe utile grazie .

    #99046 quote
    Nicolas
    Keymaster
    Master

    Poiché non è possibile eliminare tutti gli oggetti già tracciati sul grafico, è necessario creare un indicatore separato che rappresenti solo l'ultimo segmento collegato al prezzo corrente. Quindi per favore aggiungi questo indicatore come complemento del primo sul grafico per ottenere la versione completa:

    defparam drawonlastbaronly=true
    
    //—external parameters
    
    cp = 26
    
    once lastpoint = 0
    
    if high[cp] >= highest[2*cp+1](high) then
    LH = 1
    else
    LH = 0
    endif
    
    if low[cp] <= lowest[2*cp+1](low) then
    LL = -1
    else
    LL = 0
    endif
    
    if LH = 1 then
    TOPy = high[cp]
    TOPx = barindex[cp]
    endif
    
    if LL = -1 then
    BOTy = low[cp]
    BOTx = barindex[cp]
    endif
    
    if LH>0 and (lastpoint=-1 or lastpoint=0) then
    //DrawSegment(lastX,lastY,TOPx,TOPy) coloured(255,255,0)
    lastpoint = 1
    lastX = TOPx
    lastY = TOPy
    endif
    
    if LL<0 and (lastpoint=1 or lastpoint=0) then
    //DrawSegment(lastX,lastY,BOTx,BOTy) coloured(255,255,0)
    lastpoint = -1
    lastX = BOTx
    lastY = BOTy
    endif
    
    if lastpoint>0 then 
    DrawSegment(lastX,lastY,barindex,low) coloured(55,55,50)
    elsif lastpoint<0 then 
    DrawSegment(lastX,lastY,barindex,high) coloured(55,55,50)
    endif
    
    return
    fractals-zigzag-in-realtime.png fractals-zigzag-in-realtime.png
    #99106 quote
    Hendrix
    Participant
    Senior

    Buongiorno,

    l’ultimo segmento è scritto correttamente, ma ora non vengono disegnati quelli precedenti in giallo (nella immagine che hai allegato).

    Poi come faccio ad aumentare il loro spessore

    #99108 quote
    swapping
    Participant
    Master

    rimuovere le 2 barre dalle (//) linee 32 e 39

    #99109 quote
    robertogozzi
    Moderator
    Master

    Non si può aumentare lo spessore, né lo stile, di linee disegnate con i comandi DRAW.

    Solo le linee disegnate con RETURN possono essere personalizzate.

    #99110 quote
    Hendrix
    Participant
    Senior

    Ho tolto le due barre // nella riga 32 e 39 ma non funziona

    #99129 quote
    Nicolas
    Keymaster
    Master

    Non hai letto il mio ultimo post! DEVI AGGIUNGERE I 2 INDICATORI SULLA GRAFICA PER OTTENERE UNA VERSIONE COMPLETA. Aggiungi il primo indicatore che hai pubblicato, quindi aggiungi quello che ho creato, solo i 2 indicatori potrebbero fornire quello che ti serve.

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

Fractal Zig Zag continuare a tracciare durante l'ultimo periodo


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Hendrix @hendrix Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 05/21/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...