compter le nombre de conditions vérifiées

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

    Bonjour, je souhaite pouvoir afficher selon DRAWTEXT(“#nb conditions#”,-80,-220,SansSerif,Bold,16)coloured(255,150,150)anchor(topright), le nombre de conditions vérifiées

    Par exemple j’ai 4 conditions c1, c2,c3 et c4 et je veux afficher 2 si 2 sur 4 conditions sont vérifiées, 3 si 3 sur 4 sont vérifiées ….

    Je vous remercie

    #230649 quote
    Iván González
    Moderator
    Master

    Bonjour, vous pouvez faire ce qui suit :

    defparam drawonlastbaronly=true
    
    
    c1 = close > average[20](close)
    c2 = volume > average[20](volume)
    c3 = close > close[1] and close[1]>close[2]
    
    sum = c1 + c2 + c3
    
    drawtext("#sum#",barindex,low-0.25*tr)
    
    return

    J'ai défini 3 conditions mais vous pouvez définir ce que vous voulez.

    #230655 quote
    patoki
    Participant
    New

    Super ! Merci beaucoup

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

compter le nombre de conditions vérifiées


Support Plateforme : Graphiques, Données & Courtiers

New Reply
Author
author-avatar
patoki @patoki Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by patoki
1 year, 10 months ago.

Topic Details
Forum: Support Plateforme : Graphiques, Données & Courtiers
Language: French
Started: 03/28/2024
Status: Active
Attachments: No files
Logo Logo
Loading...