squeeze Bollingers Keltner

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

    bonjour,

    étant nul en programmation pourriez vous me donner un coup de main pour un screener prorealtimes.

    J’aimerai pouvoir sélectionner toutes les valeurs dont les bandes de bollingers sont à l’intérieur des bandes de KELTNER.

    Screener en rapport avec ce code:

    Merci

    //squeeze dans les bollingers
    
    REM BB SQUEEZE
    REM Bandes de Kelter et Bollinger
    REM ArnaudBZH - Forum PRO-AT
    REM Variable P1=20
    REM Variable P2=2
    REM Variable P3=1.5
    
    P1=20
    P2=2
    P3=1.5
    
    REM Bandes de Bollinger
    EP=STD[P1](close)
    MB=average[P1](close)
    UB=MB + P2 * EP
    LB=MB - P2 * EP
    
    REM Bandes de Keltner
    avg= AVERAGE[P1](close)
    shift= P3* AVERAGETRUERANGE[P1](close)
    
    UK=avg+shift
    LK=avg-shift
    
    RETURN UB coloured(0,0,255) as "Bande Bollinger Sup", LB coloured(0,0,255) as "Bande Bollinger Inf" , UK coloured(255,0,0) as "Bande Keltner Sup" , LK coloured(255,0,0) as "Bande Keltner Inf"
    
    
    
    #10339 quote
    Nicolas
    Keymaster
    Master

    Bonjour, je n’ai pas testé mais ça devrait fonctionner avec ce code:

    //squeeze dans les bollingers
    
    REM BB SQUEEZE
    REM Bandes de Kelter et Bollinger
    REM ArnaudBZH - Forum PRO-AT
    REM Variable P1=20
    REM Variable P2=2
    REM Variable P3=1.5
    
    P1=20
    P2=2
    P3=1.5
    
    REM Bandes de Bollinger
    EP=STD[P1](close)
    MB=average[P1](close)
    UB=MB + P2 * EP
    LB=MB - P2 * EP
    
    REM Bandes de Keltner
    avg= AVERAGE[P1](close)
    shift= P3* AVERAGETRUERANGE[P1](close)
    
    UK=avg+shift
    LK=avg-shift
    
    condition = (UP<UK and LB>LK)
    
    SCREENER [condition]

    Ce screener ressemble beaucoup à ce que j’ai déjà posté ici dans la library:

    http://www.prorealcode.com/prorealtime-market-screeners/intraday-volatility-explosion-screener/

    Dans celui-ci la détection se faisait sur les x dernières bars pour confirmer le squeeze.

    #10349 quote
    sally31120
    Participant
    Average

    Merci Nicolas

    Je vais pouvoir espérer voir les situations favorables.

    Cordialement

    #15733 quote
    zen83
    Participant
    Senior

    Bonjour Nicolas, fonctionne après correction de la petite boulette en ligne 27 comme suit

    condition = (UB<UK and LB>LK)

    j’en profite pour te remercier chaleureusement pour tout le code PRT que tu produis et que tu partages

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

squeeze Bollingers Keltner


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
sally31120 @sally31120 Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by zen83
9 years, 4 months ago.

Topic Details
Forum: ProScreener : Scanners de Marché & Détection
Language: French
Started: 07/08/2016
Status: Active
Attachments: No files
Logo Logo
Loading...