Implémentation OR sur 2 blocs conditionnels

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #136065 quote
    GilInvest
    Participant
    Average

    Bonjour à tous, j’applique en ce moment la formation premier pas. Ici je veux que l’un ou l’autre de deux blocs conditionnels s’applique et déclenche l’affichage d’un signal. Sauf erreur, je n’ai pas trouvé ca dans la formation mais j’ai rédigé selon la logique comprise : Redaction d’un bloc > ne pas mettre “endif” à la fin du premier bloc > rédiger ” OR” puis redaction de l’autre bloc > endif deux fois. ca donne ca :

    If open[0]<ExponentialAverage[7] and close[0]>ExponentialAverage[7] and close[0]>open[0] and ((Exponentialaverage[20][1]< Exponentialaverage[20][0]) OR (Exponentialaverage[7][1]< Exponentialaverage[7][0])) then
    DRAWARROWUP(barindex[0],low-atr10/2) coloured(255,140,0)
    histoup1=1
    
    else
    
    histoup1=0
    
    OR
    
    If low[0]<ExponentialAverage[7] and low[0]<ExponentialAverage[20] and low[0]<ExponentialAverage[34] and close[0]>ExponentialAverage[7] and close[0]>ExponentialAverage[20] and high[0]>ExponentialAverage[34] then
    DRAWARROWUP(barindex[0],low-atr10/2) coloured(255,255,0)
    histoup2=1
    
    else
    
    histoup2=0
    
    endif
    endif

    Mais ProBuilder n’en veux pas. Qqn peut il me dire comment faire ? merci à tous et bonne journée

    #136073 quote
    robertogozzi
    Moderator
    Master

    À la ligne 9, remplacez OR par ENDIF. Éliminez la ligne 20.

    GilInvest thanked this post
    #136077 quote
    GilInvest
    Participant
    Average

    Merci Robert mais j’ai déjà essayé et ca n’est pas la solution semble t il. En effet, la fin du code

    return histoup1 coloured(255,140,0) style(histogram), histodown1 coloured(255,140,0) style(histogram), histoup2 coloured(120,210,120) style(histogram), histodown2 coloured(210,120,120) style(histogram), 0 as "0"

    induit qu’un histogramme d’une certaine couleur doit etre affichée (orange ou ROUGE OU orange ou VERT). MAIS, je dois impérativement avoir soit l’un soit l’autre des deux blocs conditionnels qui soit appliqué car sinon, j’ai les deux couleurs qui se superposent et la c’est pas bon. Ma question est donc toujours en suspend. Bonne journée

    #136082 quote
    GilInvest
    Participant
    Average

    J’ai trouvé la solution. Il y avait un bug. Merci à tous

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

Implémentation OR sur 2 blocs conditionnels


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
GilInvest @gilinvest Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by GilInvest
5 years, 8 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 06/16/2020
Status: Active
Attachments: No files
Logo Logo
Loading...