aiuto per piccola modifica codice con DRAWCANDLE

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #65508 quote
    claudio ccclaudio cc
    Participant
    Junior

    Buongiorno, per cortesia, il codice che ho scritto sotto fa cambiare colore alle candele in funzione del cambio colore del Supetrend, però con i codici che ho scritto mi cambia il colore solo alle prime candele dopo il cambio colore del Supetrend e non a quelle seguenti, mi potete aiutare a far cambiare colore a tutte le candele, rosse tutte quelle sotto il supetrend e verde quelle sopra il supetrend, grazie mille in anticipo

    /// inizio codice
    
    st= Supertrend[3,10]
    if (close>st AND close[1]<st[1]) Then
    dd =1
    else
    dd=0
    endif
    
    if (close<st AND close[1]>st[1]) then
    ee=1
    else
    ee=0
    endif
    
    if dd then
    Drawcandle (open,high,low,close) coloured(0,255,0) bordercolor(0,0,0)
    elsif ee then
    Drawcandle (open,high,low,close) coloured(255,0,0) bordercolor(0,0,0)
    endif
    
    return
    #65525 quote
    maximus78maximus78
    Participant
    Senior

    Ciao Claudio…..perchè hai specificato anche close[1]< e >st[1].

    Scrivi il codice in questo modo:

    st= Supertrend[3,10]
    if close>st Then
    Drawcandle (open,high,low,close) coloured(0,255,0) bordercolor(0,0,0)
    elsif close<st then
    Drawcandle (open,high,low,close) coloured(255,0,0) bordercolor(0,0,0)
    endif
    return
    claudio cc thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

aiuto per piccola modifica codice con DRAWCANDLE


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
claudio cc @claudio1964 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by maximus78maximus78
8 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 03/17/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...