signaux Oscillateur Bollinger (% b)

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #100972 quote
    mohamed
    Participant
    Average

    bonjour a tous! j’ai trouver ce code sur un site http://sohocool.over-blog.com/article-26490268.html et je souhaiter ajouter une fleche d’achat directement sur le graf quand la ligne croise a la hausse la ligne 20 et une fleche de vente quand la ligne croise a la baisse la ligne 80 j’ai essayer plusieurs combinaison pour y arrivé mais je n’est pas réussie! quelqu’un pourrait’il m’aider svp merci d’avance!!

    
    
    
    // oscillateur % b bollinger
    //  variable p = longueur moyenne mobile -
    // s = coef standard deviation -et  t = ma type
    // par defaut p =20 - s =2 - t = simple  prix = typicalprice =( c+h+l)/3
    
    prix=customclose
    
    gd2 = average[p,t](prix)
    
    sd= s*STD[p](prix)
    
    bollsup= gd2 + sd
    bollinf = gd2 - sd
    
    if close crosses over 20 then
    DRAWARROWUP (barindex +1,low -1*pointsize)coloured(70,130,180)
    endif
    
    
    
    B1 = 100*(close - bollinf)/ ( BOLLSUP -BOLLINF)
    
    RETURN B1 as "%b bollinger",20,50,80
    #100973 quote
    mohamed
    Participant
    Average

    capture d’ecran

    jj.png jj.png
    #100998 quote
    Nicolas
    Keymaster
    Master

    On ne peut pas tracer des objets des graphiques hors fenêtre, c’est à dire que ton oscillateur ne peut pas créer de flèches sur le graphique du prix. Il faut donc modifier un peu le code original, pour ne pas retourner l’oscillateur Bollinger %b et appliquer le code au prix (pour voir les flèches sur celui-ci).

    // oscillateur % b bollinger
    //  variable p = longueur moyenne mobile -
    // s = coef standard deviation -et  t = ma type
    // par defaut p =20 - s =2 - t = simple  prix = typicalprice =( c+h+l)/3
    
    p=20
    s=2
    t=0
    prix=typicalprice
    
    prix=customclose
    
    gd2 = average[p,t](prix)
    
    sd= s*STD[p](prix)
    
    bollsup= gd2 + sd
    bollinf = gd2 - sd
    
    B1 = 100*(close - bollinf)/ ( BOLLSUP -BOLLINF)
    
    if close crosses over 20 then
    DRAWARROWUP (barindex +1,low -1*pointsize)coloured(70,130,180)
    endif
    
    if close crosses under 80 then
    DRAWARROWUP (barindex +1,high+1*pointsize)coloured(255,0,0)
    endif
    
    RETURN

    Je n’ai pas testé.

    #101003 quote
    mohamed
    Participant
    Average

    bonjour nicolas!

    merci de ta reponse et d’avoir repris le code je vais tester voir ce que sa donne

    #101004 quote
    mohamed
    Participant
    Average

    super sa fonctionne merci nicolas! j’ai fait une petite modif car pour avoir le signal c’est pas avec la close mais b1 qu’il faut mettre je repartage le code avec la petite modif!

    merci encore nicolas!

    #101005 quote
    mohamed
    Participant
    Average
    // oscillateur % b bollinger
    //  variable p = longueur moyenne mobile -
    // s = coef standard deviation -et  t = ma type
    // par defaut p =20 - s =2 - t = simple  prix = typicalprice =( c+h+l)/3
    
    p=20
    s=2
    t=0
    prix=typicalprice
    
    prix=customclose
    
    gd2 = average[p,t](prix)
    
    sd= s*STD[p](prix)
    
    bollsup= gd2 + sd
    bollinf = gd2 - sd
    
    B1 = 100*(close - bollinf)/ ( BOLLSUP -BOLLINF)
    
    if b1 crosses over 20 then
    DRAWARROWUP (barindex ,low -1*pointsize)coloured(70,130,180)
    endif
    
    if b1 crosses under 80 then
    DRAWARROWdown (barindex ,high+1*pointsize)coloured(255,0,0)
    endif
    
    RETURN
    #101007 quote
    Nicolas
    Keymaster
    Master

    Bien vu ! Quel idiot je fais 😆

    #101009 quote
    mohamed
    Participant
    Average

    non, tu as peut etre voulut que je cherche un peut ;)! merci c’est sympa d’avoir repris le code et de la rapidité de ta réponse!

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

signaux Oscillateur Bollinger (% b)


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
mohamed @jeromeccc Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by mohamed
6 years, 8 months ago.

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