range filter buy ad sell

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #240863 quote
    finplus
    Participant
    Master
    // 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
    
    // Target Bands
    hband = filt + smrng
    lband = filt - smrng
    
    
    //// Zone de couleurs : selon des conditions
    ////////////////////////////////////////////////////////////////////////////
    
    mbTendance = ( Average[3](filt) + filt)/2
    if mbTendance > mbTendance[1] then
    red=0
    green=0
    blue=255
    elsif mbTendance < mbTendance[1] then
    red=255
    green=0
    blue=0
    endif
    
    colorbetween(lband,hband,red,Green,Blue,88)
    
    
    // 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
    
    //Alerts
    If longCondition then
    Drawtext("▲",barindex,low-AverageTrueRange[18](close)) coloured(0,0,255)
    endif
    If shortCondition then
    Drawtext("▼",barindex,high+AverageTrueRange[18](close)) coloured(255,0,0)
    endif
    
    Return filt as "Range Filter", hband as "High Target", lband as "Low Target"
    

    bonsoir,

    j’aimerai un screener permettant d’identifier quand la bande est de couleur bleue (mbTendance > mbTendance[1] ) et quand elle est de couleur rouge mbTendance < mbTendance[1] )

    Je bute.

    Merci.

    #240876 quote
    Iván González
    Moderator
    Master

    Ici tu as :

    // 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 = 100//defval=100, minval=1, "Sampling Period"
    
    // Range Multiplier
    mult = 3//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
    
    longCondition = longCond and CondIni[1] = -1
    shortCondition = shortCond and CondIni[1] = 1
    
    screener[longCondition or shortCondition](shortCondition as "SH",longCondition as "LG")
    
    #240878 quote
    finplus
    Participant
    Master

    Un grand merci.

    j’avais cru que longCondition = longCond and CondIni[1] = 1 et shortCondition = shortCond and CondIni[1] = 1 servait pour indiquer un signal et pas pour déterminer la tendance comme codée ci-dessous :

    mbTendance = ( Average[3](filt) + filt)/2
    if mbTendance > mbTendance[1] then
    red=0
    green=0
    blue=255
    elsif mbTendance < mbTendance[1] then
    red=255
    green=0
    blue=0
    endif
    colorbetween(lband,hband,red,Green,Blue,88)
    #240916 quote
    finplus
    Participant
    Master

    Bonsoir,

    je viens de le tester et je n’ai aucun retour.

    #240952 quote
    fifi743
    Participant
    Master

    en inversant les chiffres

    1 pour long et -1 pour short

    longCondition = longCond and CondIni[1] = 1
    shortCondition = shortCond and CondIni[1] = -1

    finplus thanked this post
    Capture-decran-2024-12-01-175707.png Capture-decran-2024-12-01-175707.png
    #240954 quote
    finplus
    Participant
    Master

    merci. Mais alors j’ai fait les modifications et rien ne s’affiche. Quelque chose m’échappe mais je ne vois pas où dans mon code….

    #240955 quote
    finplus
    Participant
    Master

    voilà mon code.// 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 = 100//defval=100, minval=1, “Sampling Period”

    // Range Multiplier
    mult = 3//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

    longCondition = longCond and CondIni[1] = 1
    shortCondition = shortCond and CondIni[1] = -1

    screener[longCondition or shortCondition](shortCondition as “SH”,longCondition as “LG”)

    #241189 quote
    finplus
    Participant
    Master

    Bonjour,

    je me permets de remonter mon dernier commentaire.

    Merci.

    #241209 quote
    fifi743
    Participant
    Master

    Bonjour,

    moi il marche sur les actions en journalier avec le dernier code

    #241221 quote
    finplus
    Participant
    Master

    Toujours aucun retour chez moi.

    d’où peut venir le problème ?

    merci.

    #241344 quote
    finplus
    Participant
    Master

    Bonsoir,

    encore une fois, aucun retour. Où ça coince ? Merci.

    // 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 = 100//defval=100, minval=1, “Sampling Period”

    // Range Multiplier
    mult = 3//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

    longCondition = longCond and CondIni[1] = 1
    shortCondition = shortCond and CondIni[1] = -1

    screener[longCondition or shortCondition](shortCondition as “SH”,longCondition as “LG”)

    #241462 quote
    finplus
    Participant
    Master

    en fait, je m’aperçois que lorsque j’exécute le screener, rien ne se passe comme si le programme “n’accrochait” pas. Normalement, quand on lance un screener (par exemple sur les actions du S&P ou autres), on voit apparaître en bas à droite de l’écran du screener une sorte de petite jauge qui se remplit de bleu au fur et à mesure de la recherche. Et bien chez moi, rien de tout cela. Donc je pense qu’il y a un truc tout bête (pour ne pas dire autre chose) qui m’échappe mais je n’arrive pas à voir de quoi il s’agit.

     

    Merci pour votre attention.

    #241482 quote
    fifi743
    Participant
    Master

    j’ai copier et coller juste le code au dessus et pris les action europe voir screen

    Capture-decran-2024-12-16-205113.png Capture-decran-2024-12-16-205113.png Capture-decran-2024-12-16-205129.png Capture-decran-2024-12-16-205129.png
    #241490 quote
    finplus
    Participant
    Master

    Merci. SVP, est-il possible d’avoir le print ecran de tout le code ? Je vais recopier le tien.

    Merci encore d’avoir répondu.

    Bonne journée.

    #241520 quote
    fifi743
    Participant
    Master
    //////////////////////////////////////////////////////////////////////////
    // 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 = 100//defval=100, minval=1, “Sampling Period”
    
    // Range Multiplier
    mult = 3//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
    
    longCondition = longCond and CondIni[1] = 1
    shortCondition = shortCond and CondIni[1] = -1
    
    screener[longCondition or shortCondition](shortCondition as “SH”,longCondition as “LG”)
    finplus and Iván González thanked this post
    Capture-decran-2024-12-17-190311.png Capture-decran-2024-12-17-190311.png Capture-decran-2024-12-17-190324.png Capture-decran-2024-12-17-190324.png
Viewing 15 posts - 1 through 15 (of 24 total)
  • You must be logged in to reply to this topic.

range filter buy ad sell


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

This topic contains 23 replies,
has 4 voices, and was last updated by finplus
1 year, 1 month ago.

Topic Details
Forum: ProScreener : Scanners de Marché & Détection
Language: French
Started: 11/28/2024
Status: Active
Attachments: 5 files
Logo Logo
Loading...