créer un screener basé sur twin range filter

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #213004 quote
    francis59
    Participant
    New

    Bonjour,

    Ne connaissant rien en code, est-ce que quelqu’un serait intéressé de créer un screener pour détecter les stocks dès qu’une flèche verte apparaît?

    base pour créer le screener : https://www.prorealcode.com/prorealtime-indicators/twin-range-filter/

    D’avance merci et bon courage ! 🙂

    Bonne journée

    #213005 quote
    JC_Bywan
    Moderator
    Master

    Bonjour, à tester:

    //PRC_Twing Range Filter | indicator
    //28.03.2023
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //author: colinmck
    //PRT indicator into screener 07.04.23 JC_Bywan @ www.prorealcode.com
    
    // --- settings
    per1 = 27 //"Fast period"
    mult1 = 1.6 //"Fast range"
    per2 = 55 //"Slow period"
    mult2 = 2 //"Slow range"
    // --- end of settings
    
    source = customclose
    
    once wper1 = per1 * 2 - 1
    avrng1 = average[per1,1](abs(source - source[1]))
    smrng1 = average[wper1,1](avrng1) * mult1
    once wper2 = per2 * 2 - 1
    avrng2 = average[per2,1](abs(source - source[1]))
    smrng2 = average[wper2,1](avrng2) * mult2
    smrng = (smrng1 + smrng2) / 2
    
    r = smrng
    if source>rngfilt[1] then
    if (source-r)<rngfilt[1] then
    rngfilt=rngfilt[1]
    else
    rngfilt=source-r
    endif
    elsif (source+r)>rngfilt[1] then
    rngfilt=rngfilt[1]
    else
    rngfilt=source+r
    endif
    
    if rngfilt > rngfilt[1] then
    upward=upward+1
    downward=0
    endif
    if rngfilt < rngfilt[1] then
    upward=0
    downward=downward+1
    endif
    
    longCond = (source > rngfilt and source > source[1] and upward > 0) or (source > rngfilt and source < source[1] and upward > 0)
    
    SCREENER[longCond]
    #213007 quote
    Nicolas
    Keymaster
    Master

    Autre version pour ce screener pour signaux haussier et baissier aussi:

    //PRC_Twing Range Filter | screener
    
    // --- settings
    per1 = 27 //"Fast period"
    mult1 = 1.6 //"Fast range"
    per2 = 55 //"Slow period"
    mult2 = 2 //"Slow range"
    // --- end of settings
    
    source = customclose
    
    once wper1 = per1 * 2 - 1
    avrng1 = average[per1,1](abs(source - source[1]))
    smrng1 = average[wper1,1](avrng1) * mult1
    once wper2 = per2 * 2 - 1
    avrng2 = average[per2,1](abs(source - source[1]))
    smrng2 = average[wper2,1](avrng2) * mult2
    smrng = (smrng1 + smrng2) / 2
    
    r = smrng
    if source>rngfilt[1] then
    if (source-r)<rngfilt[1] then
    rngfilt=rngfilt[1]
    else
    rngfilt=source-r
    endif
    elsif (source+r)>rngfilt[1] then
    rngfilt=rngfilt[1]
    else
    rngfilt=source+r
    endif
    
    if rngfilt > rngfilt[1] then
    upward=upward+1
    downward=0
    endif
    if rngfilt < rngfilt[1] then
    upward=0
    downward=downward+1
    endif
    
    longCond = (source > rngfilt and source > source[1] and upward > 0) or (source > rngfilt and source < source[1] and upward > 0)
    shortCond = (source < rngfilt and source < source[1] and downward > 0) or (source < rngfilt and source > source[1] and downward > 0)
    
    if longcond then
    colorr=0
    //colorg=255
    elsif shortcond then
    colorr=255
    //colorg=0
    endif
    
    signal=0
    if colorr=0 and colorr[1]=255 then
    signal=1
    //drawarrowup(barindex,min(low,rngfilt)-averagetruerange[14]/2) coloured("green")
    endif
    if colorr=255 and colorr[1]=0 then
    signal=-1
    //drawarrowdown(barindex,max(high,rngfilt)+averagetruerange[14]/2) coloured("crimson")
    endif
    
    screener[signal<>0] (signal as "signals")
    
    ssopiak thanked this post
    #213009 quote
    francis59
    Participant
    New

    Merci beaucoup à JC_Bwan et Nicolas pour votre réponse claire et rapide 😉

     

    J’en profite pour savoir si vous auriez une idée pour cet autre sujet : https://www.prorealcode.com/topic/creer-un-screener-base-sur-zizg-volume-by-price-fibonacci/

     

    Belle journée! 🙂

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

créer un screener basé sur twin range filter


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
francis59 @francis51 Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by francis59
2 years, 10 months ago.

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