range filter buy ad sell

Forums ProRealTime forum Français Support ProScreener range filter buy ad sell

Viewing 7 posts - 1 through 7 (of 7 total)
  • #240863

    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

    Ici tu as :

    #240878

    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

    Bonsoir,

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

     

    #240952

    en inversant les chiffres

    1 pour long et -1 pour short

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

    1 user thanked author for this post.
    #240954

    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

    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”)

     

Viewing 7 posts - 1 through 7 (of 7 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login