Franchissement support / résistance

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #254536 quote
    finplusfinplus
    Participant
    Master

    Bonsoir,

    je souhaiterais à partir de l’indicateur ci-dessous avoir un screener qui identifie le franchissement des lignes hband (à la hausse) ou lband (à la baisse).

    // 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”
    PER = 150
    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

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

    if islastbarupdate then
    if close<hband then
    DRAWSEGMENT(barindex, hband, barindex+5, hband)style(line,2) coloured(0,0,200)
    endif
    if close>lband then
    DRAWSEGMENT(barindex, lband, barindex+5, lband)style(line,2) coloured(0,0,200)
    endif
    endif

    Return filt as “Range Filter”, hband as “High Target”, lband as “Low Target”, mbtendance as “tendance”

    #254547 quote
    jacquesgermainjacquesgermain
    Participant
    Veteran

    Hello par exemple :

    src = close
    per =80
    mult =3
    once f=0
    // 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
    // Target Bands
    hband = filt + smrng
    lband = filt - smrng
    if close>hband[1] and close[1]<hband[2] then
    jourh=barindex
    endif
    if close<lband[1] and close[1]>lband[2] then
    jourl=barindex
    endif
    F = (close > hband[1]) and barindex-jourh=0
    G=(close <lband[1]) and barindex-jourl=0
    screener[F or G](F as "buy",G as "sell")
    
    finplus, robertogozzi and Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

Franchissement support / résistance


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by jacquesgermainjacquesgermain
9 months, 1 week ago.

Topic Details
Forum: ProScreener : Scanners de Marché & Détection
Language: French
Started: 12/14/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...