couleur macd 5 min

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #213750 quote
    gbzhgbzh
    Participant
    Junior

    Bonjour, j’aimerai coder un indicateur qui me permettrai d’afficher en arrière plan d’un graphique 1 min,

    des colonnes de couleur lorsque l’histogramme de la MACD 5 min est positif (couleur verte) ou négatif (couleur rouge).

    J’ai mis en pièce jointe un exemple du rendu.

    Merci de votre aide.

    carre-macd.jpg carre-macd.jpg
    #213797 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Bjr,

    sans updateonclose pour que la mise à jour se fasse à chaque minute. Si on veut que ça ne change qu’à chaque clôture du timeframe 5mn, alors rajouter le updateonclose au timeframe 5mn.

    TIMEFRAME(5 minutes)// ou TIMEFRAME(5 minutes,UPDATEONCLOSE)
    if MACD[12,26,9](close)>=0 then
    couleur=1
    else
    couleur=-1
    endif
    
    TIMEFRAME(default)
    if couleur=1 then
    BACKGROUNDCOLOR("green",100)
    else
    BACKGROUNDCOLOR("red",100)
    endif
    
    return
    #213813 quote
    gbzhgbzh
    Participant
    Junior

    super, merci beaucoup. C’est exactement ça que je voulais.

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

couleur macd 5 min


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
gbzh @gbzh Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/25/2023
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...