range filter buy & sell

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #221494 quote
    finplus
    Participant
    Master

    Bonjour,

    serait-il possible d’avoir un screener à partir de l’indicateur ci-dessous ? Merci.

    Range Filter Buy and Sell 5min

    #221511 quote
    JS
    Participant
    Master

    Hi @finplus

    // Original Script > @DonovanWall
    // Adapted Version > @guikroth
    
    //////////////////////////////////////////////////////////////////////////
    // Settings for 5min chart, BTCUSDC. For Other coin, change the parameters
    //////////////////////////////////////////////////////////////////////////
    
    // Source
    src = customclose
    
    // Sampling Period
    // Settings for 5min chart, BTCUSDC. For Other coin, change the paremeters
    // per = defval=100, minval=1, "Sampling Period"
    
    // Range Multiplier
    // mult = defval=3.0, minval=0.1, "Range Multiplier"
    
    // Smooth Average Range
    wper = per*2 -1
    avrng = exponentialaverage[per](abs(src-src[1]))
    smrng = mult * exponentialaverage[wper](avrng)
    
    // Range Filter
    rngfilt = src
    If src > rngfilt[1] then
    If rngfilt[1] > src-smrng then
    rngfilt = rngfilt[1]
    Else
    rngfilt = src-smrng
    endif
    elsif rngfilt[1] < src+smrng then
    rngfilt = rngfilt[1]
    else
    rngfilt = src+smrng
    endif
    filt = rngfilt
    
    // Filter Direction
    upward = 0
    If filt > filt[1] then
    upward = upward[1]+1
    elsif filt < filt[1] then
    upward = 0
    else
    upward = upward[1]
    endif
    downward = 0
    If filt < filt[1] then
    downward = downward[1]+1
    elsif filt > filt[1] then
    downward = 0
    else
    downward = downward[1]
    endif
    
    // Break Outs
    longCond = (src > filt and src > src[1] and upward > 0) or (src > filt and src < src[1] and upward > 0)
    shortCond = (src < filt and src < src[1] and downward > 0) or (src < filt and src > src[1] and downward > 0)
    
    CondIni = 0
    If longCond then
    CondIni = 1
    elsif shortCond then
    CondIni = -1
    else
    CondIni = CondIni[1]
    endif
    
    C1 = longCond and CondIni[1] = -1
    C2 = shortCond and CondIni[1] = 1
    
    Screener[C1 or C2](C1 as "Long=1")
    
    finplus thanked this post
    Screener-Range-Filter.itf
    #221513 quote
    jacquesgermain
    Participant
    Veteran

    HELLO ci après le screener avec per=80 (à adapter) :

    // Source
    src = close
    // Sampling Period
    // Settings for 5min chart, BTCUSDC. For Other coin, change the paremeters
    // per = defval=100, minval=1, "Sampling Period"
    per=80
    // Range Multiplier
    // mult = defval=3.0, minval=0.1, "Range Multiplier"
    mult=3
    // Smooth Average Range
    wper = per*2 -1
    avrng = exponentialaverage[per](abs(src-src[1]))
    smrng = mult * exponentialaverage[wper](avrng)
    
    // Range Filter
    rngfilt = src
    If src > rngfilt[1] then
    If rngfilt[1] > src-smrng then
    rngfilt = rngfilt[1]
    Else
    rngfilt = src-smrng
    endif
    elsif rngfilt[1] < src+smrng then
    rngfilt = rngfilt[1]
    else
    rngfilt = src+smrng
    endif
    filt = rngfilt
    
    // Filter Direction
    upward = 0
    If filt > filt[1] then
    upward = upward[1]+1
    elsif filt < filt[1] then
    upward = 0
    else
    upward = upward[1]
    endif
    downward = 0
    If filt < filt[1] then
    downward = downward[1]+1
    elsif filt > filt[1] then
    downward = 0
    else
    downward = downward[1]
    endif
    
    // Target Bands
    //hband = filt + smrng
    //lband = filt - smrng
    
    // Colors
    //If upward > 0 then
    //filtcolorR = upColorR
    //filtcolorG = upColorG
    //filtcolorB = upColorB
    //elsif downward > 0 then
    //filtcolorR = downColorR
    //filtcolorG = downColorG
    //filtcolorB = downColorB
    //else
    //filtcolorR = midColorR
    //filtcolorG = midColorG
    //filtcolorB = midColorB
    //endif
    
    if src > filt and src > src[1] and upward > 0 then
    //barcolorR = upColorR
    //barcolorG = upColorG
    //barcolorB = upColorB
    elsif src > filt and src < src[1] and upward > 0 then
    //barcolorR = upColorR
    //barcolorG = upColorG
    //barcolorB = upColorB
    elsif src < filt and src < src[1] and downward > 0 then
    //barcolorR = downColorR
    //barcolorG = downColorG
    //barcolorB = downColorB
    elsif src < filt and src > src[1] and downward > 0 then
    //barcolorR = downColorR
    //barcolorG = downColorG
    //barcolorB = downColorB
    else
    //barcolorR = midColorR
    //barcolorG = midColorG
    //barcolorB = midColorB
    endif
    
    // Break Outs
    longCond = (src > filt and src > src[1] and upward > 0) or (src > filt and src < src[1] and upward > 0)
    shortCond = (src < filt and src < src[1] and downward > 0) or (src < filt and src > src[1] and downward > 0)
    
    CondIni = 0
    If longCond then
    CondIni = 1
    elsif shortCond then
    CondIni = -1
    else
    CondIni = CondIni[1]
    endif
    
    longCondition = longCond and CondIni[1] = -1
    shortCondition = shortCond and CondIni[1] = 1
    F=longCondition or shortCondition
    
    //Alerts
    If longCondition then
    flag=1
    endif
    If shortCondition then
    flag=2
    endif
    screener [F](flag=1 as"long",flag=2 as "court")
    finplus and Nicolas thanked this post
    #221528 quote
    finplus
    Participant
    Master

    Merci pour vos aides.

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

range filter buy & sell


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

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

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