colorazione candele in base a medie mobili

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #168007 quote
    lowbatlowbat
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    lowbatlowbat
    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.
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

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 lowbatlowbat
5 years, 4 months ago.

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