Candele consecutive

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #82196 quote
    TraderFelix
    Participant
    Senior

    Salve a tutti,

    avrei la necessità di disegnare un rettangolo sul grafico  che rappresenti con un colore le candele consecutive long e quelle short indipendentemente dal timeframe che utilizzo. Per essere più chiaro allego un immagine.

    Grazie

    Schizzo.png Schizzo.png
    #82212 quote
    robertogozzi
    Moderator
    Master

    Eccolo, però PRT non consente di variare il colore del rettangolo. Al massimo si può cambiare solo il bordo (se vuoi ricerchi l’istruzione ed aggiungi il colore, ma non ottieni alcun effetto visivo di rilievo):

    DEFPARAM CalculateOnLastBars = 500
    DEFPARAM DrawOnLastBarOnly   = TRUE
    ONCE NumeroBarreMin = 5
    ONCE Contatore      = 0
    Rialzista      = close > open
    Ribassista     = close < open
    IF Rialzista THEN
       IF Rialzista[1] THEN
          Contatore = Contatore + 1
       ELSE
          Contatore = 1
       ENDIF
    ELSIF Ribassista THEN
       IF Ribassista[1] THEN
          Contatore = Contatore + 1
       ELSE
          Contatore = 1
       ENDIF
    ENDIF
    IF Contatore >= NumeroBarreMin THEN
       DRAWRECTANGLE(barindex - (Contatore - 1),lowest[Contatore](low),barindex,highest[Contatore](high))
    ENDIF
    RETURN
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Candele consecutive


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
7 years, 5 months ago.

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