Colore candele con range >= a x punti

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #165010 quote
    tempiotrad
    Participant
    New

    Buongiorno, è possibile sapere qual’è il codice che consente di colorare in modo diverso le candele, su vari time frame (es. 3 minuti, 5 minuti etc..), che hanno un corpo (Open / Close) pari a un tot di punti (es. 15 punti,13 punti etc..). Ad es. se sul time frame 3 minuti si forma una candela long da 15 punti il colore dovrebbe essere blu e non verde, e se si forma una candela short di 15 punti il colore dovrebbe essere arancione e non rosso. Grazie

    #165018 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    Pips    = 15 * pipsize       //grandezza del corpo
    Rialzo  = close > open
    Ribasso = close < open
    Corpo   = abs(close - open)
    c1      = Corpo >= Pips
    condL   = c1 AND Rialzo
    condS   = c1 AND Ribasso
    r       = 0
    g       = 255                //Verde
    b       = 0
    t       = 255
    if Ribasso then
       r    = 255                //Rosso
       g    = 0
    endif
    if CondL then
       r    = 0
       g    = 0
       b    = 255                //Blu
    elsif condS then
       r    = 255                //Arancio
       g    = 140
       b    = 0
    endif
    DrawCandle(Open,High,Low,Close) coloured(r,g,b,t)
    return
    robertodocc thanked this post
    #165049 quote
    tempiotrad
    Participant
    New

    Egr. Roberto, grazie per la risposta. Più tardi lo provo.

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

Colore candele con range >= a x punti


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
tempiotrad @tempiotrad Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by tempiotrad
5 years ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 03/23/2021
Status: Active
Attachments: No files
Logo Logo
Loading...