Codage d’un screener à partir d’un indicateur trend impulse filter

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #144224 quote
    ribes65
    Participant
    Junior

    Bonjour,

    Nicolas a codé cet indicateur qui affiche les signaux d’achat et de vente à l’aide de flèches bleue (achat) et rouge (vente):J’aurais besoin de votre aide pour coder un screener détectant à chaque séance les actions signalées en achat et en vente.

    //PRC_Trend Impulse Filter | indicator
    //06.04.2020
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted from Pinescript code (author:alexgrover)
    
    // --- settings 
    length = 100
    center = 1
    arrows = 1 // Plot Arrows 0=false ; 1=true
    // --- end of settings 
    
    once b = src
    if barindex>length then 
     src = (highest[length](high)+lowest[length](low))/2
     rising = src-src[length]>0
     falling = src-src[length]<0
     a = rising or falling
     b = exponentialaverage[center](a*src+(1-a)*b[1])
     //—-
    
     if b>b[1] then
      os=1
      cr=0
      cg=128
      cb=255
     elsif b<b[1] then 
      os=-1
      cr=230
      cg=81
      cb=0
     endif
    
     if os <> os[1] and arrows then 
      if os>0 then 
       drawarrowup(barindex,b[1]) coloured(cr,cg,cb)
      else
       drawarrowdown(barindex,b[1]) coloured(cr,cg,cb)
      endif
     endif
    endif
    
    return b coloured(cr,cg,cb) style(line,3) as "Trend Impulse Filter"

     

    Je vous remercie beaucoup.

    ribes65

    #144226 quote
    Nicolas
    Keymaster
    Master

    Ci-dessous le code du screener pour l’indicateur Trend Impulse Filter : il détecte à la fois les nouveaux trend haussiers et baissiers.

    //PRC_Trend Impulse Filter | screener
    //https://www.prorealcode.com/topic/codage-dun-screener-a-partir-dun-indicateur-de-signaux-dachat-et-de-vente/
    // --- settings
    length = 100
    mid = 1
    // --- end of settings
    
    once b = medianprice
    if barindex>length then
    src = (highest[length](high)+lowest[length](low))/2
    rising = src-src[length]>0
    falling = src-src[length]<0
    a = rising or falling
    b = exponentialaverage[mid](a*src+(1-a)*b[1])
    //—-
    
    if b>b[1] then
    os=1
    elsif b<b[1] then
    os=-1
    endif
    
    test = os <> os[1] 
    
    endif
    
    screener[test]
    #144232 quote
    ribes65
    Participant
    Junior

    Je vous remercie beaucoup pour votre réponse rapide.

    PRT demande une rectification de syntaxe aux lignes 14 (caractère 24) et 25.

    //PRC_Trend Impulse Filter | screener
    //https://www.prorealcode.com/topic/codage-dun-screener-a-partir-dun-indicateur-de-signaux-dachat-et-de-vente/
    // — settings
    length = 100
    center = 1
    // — end of settings

    once b = medianprice
    if barindex>length then
    src = (highest[length](high)+lowest[length](low))/2
    rising = src-src[length]>0
    falling = src-src[length]<0
    a = rising or falling
    b = exponentialaverage<div class=”gdbbx-bbcode-align-center” style=”text-align: center;”></div>(a*src+(1-a)*b[1])
    //—-

    if b>b[1] then
    os=1
    elsif b<b[1] then
    os=-1
    endif

    test = os <> os[1]

    endif

    screener[test]

    Avez-vous la possibilité de rectifier?

    ribes65

    #144235 quote
    Nicolas
    Keymaster
    Master

    J’ai corrigé dans mon code ci-dessus. C’est le forum qui a mal formaté le code.

    #144242 quote
    ribes65
    Participant
    Junior

    Merci infiniment pour votre aide et la globalité de votre travail sur ce site.

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

Codage d’un screener à partir d’un indicateur trend impulse filter


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
ribes65 @ribes65 Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by ribes65
5 years, 5 months ago.

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