Croisement Bollinger et Sma

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #111421 quote
    Marie-Eve Vergoz
    Participant
    Senior

    Bonjour à Tous, Bonjour Nicolas,

    je souhaite mettre une alerte sous forme de flèche ou autre, lorsque :

    la sma50 baissière rencontre la bollinger sup haussière

    //# - BB et Sma50
    
    rge = averagetruerange[2](close)
    
    Sma50Dwn = Average[50][0] < Average[50][1]
    Sma50Up = Average[50][0] > Average[50][1]
    
    //Boll sup haussière
    UbUp = BollingerUp[20][0] > BollingerUp[20][1]
    
    //Boll inf baissière
    LbDwn =  BollingerDown[20][0] < BollingerDown[20][1]
    
    If Sma50Dwn CROSSES UNDER UbUp then
    DRAWARROWDOWN(barindex[0],high[1]+0.5*rge)coloured(0,0,255)
    drawtext("CBis", barindex[0],high[1]+rge, Dialog,Bolditalic,10) coloured(0,0,255)
    endif
    
    If Sma50Up CROSSES OVER LbDwn then
    DRAWARROWUP(barindex[0],low[1]-0.5*rge)coloured(0,0,255)
    drawtext("CBis",barindex[0],low[1]-rge,Dialog,Bolditalic,10) coloured(0,0,255)
    endif
    
    RETURN
    

    [attachment file=”111422″]

    et vice-versa  :

    la sma50 haussière rencontre la bollinger inférieure baissière.

    Et … rien ne fonctionne et pourtant, il me semble que c’est un indicateur simple à faire à moins que les bollingers ne se traitent de façon particulière

    Je mets une copie de croisement de la sma50 baissière (rouge marbré) avec la bollinger sup haussière (blanche) et mes lignes de code –

    Merci de votre aide

    //# - BB et Sma50
    
    rge = averagetruerange[2](close)
    
    Sma50Dwn = Average[50][0] < Average[50][1]
    Sma50Up = Average[50][0] > Average[50][1]
    
    UbUp = BollingerUp[20][0]
    LbDwn =  BollingerDown[20][0]
    
    If Sma50Dwn CROSSES UNDER UbUp then
    DRAWARROWDOWN(barindex[0],high[1]+0.5*rge)coloured(0,0,255)
    //drawtext("●", barindex[0],high[1]+rge, Dialog,Bold,12) coloured(255,0,0)
    drawtext("CBis", barindex[0],high[1]+rge, Dialog,Bolditalic,10) coloured(0,0,255)
    endif
    
    If Sma50Up CROSSES OVER LbDwn then
    DRAWARROWUP(barindex[0],low[1]-0.5*rge)coloured(0,0,255)
    //drawtext("●",barindex[0],low[1]-rge,Dialog,Bold,12) coloured(255,255,255)
    drawtext("CBis",barindex[0],low[1]-rge,Dialog,Bolditalic,10) coloured(0,0,255)
    endif
    
    RETURN
    BB-et-sma50.png BB-et-sma50.png
    #111425 quote
    Marie-Eve Vergoz
    Participant
    Senior

    Nicolas, je me suis un peu embrouillée en faisant ma demande – sincèrement désolée – la page ne paraît pas très propre – j’en suis consciente – acceptez mes excuses –

    #111427 quote
    JC_Bywan
    Moderator
    Master

    En première lecture je modifierais comme ceci les lignes 8,9,11,17 , sinon tu mélanges des valeurs de moyennes et bollingers avec des valeurs booléeennes (telles que Sma50Dwn ou Ubup étant des conditions vraies ou fausses = 0 ou 1):

    //# - BB et Sma50
     
    rge = averagetruerange[2](close)
     
    Sma50Dwn = Average[50](close) < Average[50](close)[1]
    Sma50Up = Average[50](close) > Average[50](close)[1]
     
    UbUp = BollingerUp[20](close) > BollingerUp[20](close)[1]
    LbDwn =  BollingerDown[20](close) < BollingerUp[20](close)[1]
     
    If Sma50Dwn and UbUp and Average[50](close) CROSSES UNDER BollingerUp[20](close) then
    DRAWARROWDOWN(barindex[0],high[1]+0.5*rge)coloured(0,0,255)
    //drawtext("●", barindex[0],high[1]+rge, Dialog,Bold,12) coloured(255,0,0)
    drawtext("CBis", barindex[0],high[1]+rge, Dialog,Bolditalic,10) coloured(0,0,255)
    endif
     
    If Sma50Up and LbDwn and Average[50](close) CROSSES OVER BollingerDown[20](close) then
    DRAWARROWUP(barindex[0],low[1]-0.5*rge)coloured(0,0,255)
    //drawtext("●",barindex[0],low[1]-rge,Dialog,Bold,12) coloured(255,255,255)
    drawtext("CBis",barindex[0],low[1]-rge,Dialog,Bolditalic,10) coloured(0,0,255)
    endif
     
    RETURN
    #111428 quote
    Marie-Eve Vergoz
    Participant
    Senior

    merci Nicolas –
    Je vais revoir la notion de valeur booléenne pour bien comprendre ce que tu as écrit et qui fonctionne parfaitement bien –

    merci encore

    #111429 quote
    JC_Bywan
    Moderator
    Master

    Je ne suis pas Nicolas, mais c’est pas grave, ça m’est déjà arrivé aussi dans le forum de penser qu’un post venait d’une personne plutôt qu’une autre sans avoir vu que l’avatar à droite n’était pas celui auquel je m’attendais…

    #111434 quote
    Marie-Eve Vergoz
    Participant
    Senior

    OH !!! désolée Noobywan – effectivement, je n’ai pas fait attention à l’avatar – je tiens donc à vous retourner mes remerciements – en vous priant d’accepter mes excuses – l’effet moutonnier !!!! Rabelais avait raison

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

Croisement Bollinger et Sma


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by Marie-Eve Vergoz
6 years, 4 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 10/28/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...