Debutant – MACD coloration de l’histogramme en fonction de la tendance

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #142504 quote
    TorgannTorgann
    Participant
    New

    Bonjour,

    Je debute sur PRT et je souhaite pouvoir afficher les couleurs de l’histogramme MACD en fonction de la valeur precedente.

    Si hausse = vert

    Si baisse = rouge.

    Je bloque sur le code. Merci de votre aide

    monhisto = MACD[12,26,9](TypicalPrice)

    if monhisto > monhisto[1] then return monhisto COLOURED(0,255,0) style (HISTOGRAM)
    else monhisto < monhisto[1] then return monhisto COLOURED(255,0,0) style (HISTOGRAM)
    endif

    #142507 quote
    NicolasNicolas
    Keymaster
    Legend

    Tu peux affecter des variables avec les valeurs Rouge,Vert,Bleu (RGB) en fonction de conditions et utiliser ces variables dans l’instruction COLOURED:

    if hausse then 
     r=0
     g=255
    elsif baisse then 
     r=255
     g=0
    endif
    
    return indic coloured(r,g,0)
    #142519 quote
    TorgannTorgann
    Participant
    New

    Merci je vais tester.

    #142542 quote
    TorgannTorgann
    Participant
    New

    super ca marche, j’ai une autre question de debutant , comment faire pour afficher par exemple une MM en gras, j’ai vu avec bold mais je n’arrive pas avec la syntaxe. Merci encore pour votre aide rapide 🙂

    #142544 quote
    TorgannTorgann
    Participant
    New

    J’ai trouve 🙂 desole du derangement

Viewing 5 posts - 1 through 5 (of 5 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

Debutant – MACD coloration de l’histogramme en fonction de la tendance


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Torgann @torgann Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by TorgannTorgann
6 years ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 08/25/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...