Dépassement et réintégration Bollinger

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12169 quote
    Phil4910Phil4910
    Participant
    Average

    Bonjour,

    Le simple code ci-joint indique les réintégration du prix en clôture des bandes de Boll inférieures et supérieures après dépassement de ces bandes par la bougie précédente.

    Malheureusement, il semble que des signaux

    // Signal tendance Boll
    C1 = Close[1] <= BollingerDown[20](close) and close > BollingerDown[20](close)
    C2 = Close[1] >= BollingerUp[20](close) and Close < BollingerUp[20](close)
    If C1 then
    Result=1
    Elsif C2 then
    Result=-1
    else
    Result=0
    endif
    return Result AS "Retournement"

    soient omis (cfr exemple ci-joint).

    Pouvez-vous m’indiquer les modifications à apporter dans le code pour correspondre à mes besoins?

    Merci d’avance,

    Phil4910

    Signal-Boll.png Signal-Boll.png
    #12173 quote
    supertitisupertiti
    Participant
    Master
    Peut être que high et low approchent ce que tu cherches ?
    
    
    // Signal tendance Boll
    C1 = low[1] <= BollingerDown[20](close) and close > BollingerDown[20](close)
    C2 = high[1] >= BollingerUp[20](close) and Close < BollingerUp[20](close)
    If C1 then
    Result=1
    Elsif C2 then
    Result=-1
    else
    Result=0
    endif
    return Result AS "Retournement"
    #12183 quote
    Phil4910Phil4910
    Participant
    Average

    Merci pour la réponse Supertiti, mais non, je parle bien de la clôture de la bougie.

    Quelqu’un d’autre a une solution ?

    Phil4910

    #12184 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Bonsoir, l’erreur vient probablement de la comparaison de la clôture de la bougie précédente avec les bollingers de la bougie en cours au lieu des des bollingers de la bougie précédente. Il suffirait de faire bollinf=bollingerdown[20](close) et de comparer close[1] à bollinf[1] pour rectifier cela (même chose pour boll sup).

    #12190 quote
    Phil4910Phil4910
    Participant
    Average

    Merci Noobywan, c’est exactement cela l’erreur!

    Il fallait faire:

    low[1] <= BollingerDown[20](close)[1]

    et inversément.

    Bonne journée,
    Phil4910

Viewing 5 posts - 1 through 5 (of 5 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

Dépassement et réintégration Bollinger


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Phil4910 @phil4910 Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by Phil4910Phil4910
10 years ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 08/24/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...