DRAWSEGMENT: barindex oltre ultima candela

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32059 quote
    Paolo RossiPaolo Rossi
    Participant
    New

    Ciao a tutti! Sono nuovo.

    Come posso disegnare un segmento che vada oltre l’ultima candela?

    Esempio. Su un grafico giornaliero ogni venerdì vorrei che mi disegnasse, per la settimana successiva, massimi e minimi della settimana precedente:

    If DayOfWeek = 5 then
    weeklyHigh = Highest[5](high)
    weeklyLow = Lowest[5](low)
    
    DRAWSEGMENT(barindex+1,weeklyHigh,barindex+5,weeklyHigh)coloured(0,0,255)
    DRAWSEGMENT(barindex+1,weeklyLow,barindex+5,weeklyLow)coloured(0,0,255)
    ENDIF
    
    RETURN

    Funziona ma non ho i segmenti per la settimana corrente

    #32064 quote
    ALEALE
    Moderator
    Master

    CIAO SU TIME FRAME 1 H DOVREBBE FUNZIONARE COSI:

    DEFPARAM CALCULATEONLASTBARS=24
    If CURRENTDayOfWeek = 5 then
    weeklyHigh = Highest[24](high)
    weeklyLow = Lowest[24](low)
    
    DRAWLINE(barindex,weeklyHigh,barindex+1,weeklyHigh)coloured(0,0,255)
    DRAWLINE(barindex,weeklyLow,barindex+1,weeklyLow)coloured(0,0,255)
    ENDIF
    
    RETURN
    #32375 quote
    Paolo RossiPaolo Rossi
    Participant
    New

    Grazie Ale, ho provato ma non funziona.

    Ho trovato risposta qui: https://www.prorealcode.com/topic/graphical-indicators-development-version-10-3/page/2/#post-29505

    Non è possibile disegnare barre nel futuro ma sarebbe una funziona molto utile da implementare (si potrebbe impostare le coordinate x di partenza e la lunghezza del segmento)

    #32376 quote
    ALEALE
    Moderator
    Master

    Ciao Paolo,

    DRAWLINE(barindex,weeklyHigh,barindex+1,weeklyHigh)coloured(0,0,255)
    DRAWLINE(barindex,weeklyLow,barindex+1,weeklyLow)coloured(0,0,255)

    Questo pezzo di codice disegna una linea infinita, non è un segmento.

    Il problema credo sia la corretta impostazione tempo.

    Ci ragiono su con calma .

    Ciao

    Ale

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

DRAWSEGMENT: barindex oltre ultima candela


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by ALEALE
9 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 04/14/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...