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

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #142504 quote
    Torgann
    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
    Nicolas
    Keymaster
    Master

    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
    Torgann
    Participant
    New

    Merci je vais tester.

    #142542 quote
    Torgann
    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
    Torgann
    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.

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


Support ProBuilder

New Reply
Author
author-avatar
Torgann @torgann Participant
Summary

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

Topic Details
Forum: Support ProBuilder
Language: French
Started: 08/25/2020
Status: Active
Attachments: No files
Logo Logo
Loading...