colorazione candele in base a medie mobili

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #168007 quote
    lowbat
    Participant
    Senior

    buonasera,

    si riuscirebbe a fare in modo che quando la EMA a 5 periodi incrocia al rialzo la EMA a 15 periodi le candele vengono colorate sempre dello stesso colore e viceversa?

    a supporto allego codice tratto da Tradingview (sistema PET-D di Steve Primo)

    grazie

    1-5.png 1-5.png
    #168014 quote
    robertogozzi
    Moderator
    Master

    Ecco:

    Ema5  = average[5](close)
    Ema15 = average[15](close)
    t    = 255
    If Ema5 crosses over Ema15 then
       r = 0
       g = 255
       b = 0
    ElsIf Ema5 crosses under Ema15 then
       r = 255
       g = 0
       b = 0
    Endif
    DrawCandle(open,high,low,close) Coloured(r,g,b,t)
    Return
    #168015 quote
    lowbat
    Participant
    Senior

    Grazie Roberto sempre molto gentile

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

colorazione candele in base a medie mobili


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
lowbat @lowbat Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by lowbat
4 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 04/25/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...