colorisation d'un indicateur

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #103753 quote
    huteauhuteau
    Participant
    New

    bonjour,

    je souhaite coloriser d, en vert si le close>close[1] et en rouge si close<close[1]

    j’avais tenté de m’y prendre comme suit:

    a= volume
    b= average[20](a)
    
    d= a-b
    if d>0 then
    d= d1
    endif
    if d<0 then
    d=d2
    endif
    l=0
    
    return d1 coloured (50,205,50),d2 coloured (255,0,0), L

     

    il me demande de définir d1 et d2 (je cale)

    il est certain que ce n’est pas la bonne manière de faire.

    je vous remercie pour votre aide

    #103754 quote
    NicolasNicolas
    Keymaster
    Legend

    Merci d’utiliser le bouton “insert PRT code” pour ajouter du code à un message.

    On peut utiliser l’instruction COLOURED avec des variables dont on changera les valeurs (et donc les couleurs) selon les conditions:

    a= volume
    b= average[20](a)
    
    d= a-b
    
    if d>0 then
     r=50
     g=205
     b=50
    endif
    
    if d<0 then
     r=255
     g=0
     b=0
    endif
    
    l=0
    
    return d coloured(r,g,b), L
    #103765 quote
    huteauhuteau
    Participant
    New

    Merci Nicolas pour votre aide. Je n’avais pas identifier le bouton insert PRT code, désolé.

    je vous reviendrai un peu plus tard car ma demande n’était pas formulée proprement pour tenir compte d’une colorisation de l’extravolume basée exclusivement sur la variation de prix positive ou négative.

    Cordialement.

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

colorisation d'un indicateur


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
huteau @huteau Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by huteauhuteau
7 years, 1 month ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 07/30/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...