Screener Rsi + Moving Average

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #206202 quote
    Alai-n
    Participant
    Veteran

    Bonjour, dans le screener suivant, je souhaiterais qu’il me retourne les déclenchements jusqu’à 50 périodes précédentes et pas seulement sur la dernière !

    Je ne sais pas quelle modification apporter pour que cela soit possible. J’ai essayé “Lookback”, mais je ne dois pas écrire toute la formulation correctement jusqu’au bout car je plante systématiquement le screener !

    Un coup de main serait apprécié 😉

    // Screener Rsi + Moving Average
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    myRSI = RSI[7] (close)
    Sma20 = average[20](close)
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //Détection des signaux d'achats :
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    c1 = myRsi[1] crosses over 50 and Sma20[1] > Sma20[2]
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if c1 then
    Signal = 1
    endif
    
    
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    SCREENER[c1](Signal as "Signal")
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    #206353 quote
    JC_Bywan
    Moderator
    Master

    Bjr,

    Remplacer ligne 10 par:

    if summation[50](c1)>=1 then

    Alai-n thanked this post
    #206366 quote
    Alai-n
    Participant
    Veteran

    Merci Bywan 😉

    #207363 quote
    Alai-n
    Participant
    Veteran

    Bonjour Bywan,

    Je suis en train de tester tout ça, mais je n’ai pas l’impression que cela fonctionne correctement ! Le screener ne me retourne que le dernier déclenchement et pas ceux sur les 50 derniers jours !

    Une suggestion ou une explication ?

    Merci

    #207367 quote
    JC_Bywan
    Moderator
    Master

    Bjr,

    Oui, je n’avais pas fait attention que la sélection était basée sur c1 et pas sur signal dans la ligne screener à la fin, il faut donc en plus de la modification du post précédent aussi remplacer dans la ligne screener le [c1] par [signal]  :

    SCREENER[Signal](Signal as “Signal”)

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

Screener Rsi + Moving Average


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
Alai-n @alai-n Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by JC_Bywan
3 years, 1 month ago.

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