Détecter uniquement les changements de valeur

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36636 quote
    LouRichard
    Participant
    Veteran

    Bonjour,

    Je viens de débuter sous proreltime et j’ai récupéré un bout de code qui me permet de détecter des signaux d’achat potentiels.

    PSAR = SAR[0.02,0.02,0.2]
    c1a = close > PSAR
    //c1v = close < PSAR
    
    MM200 = Average[200](close)
    c2a = close > MM200
    //c2v = close < MM200
    
    IndicMACD = MACD[12,26,9](close)
    c3a = (IndicMACD >= 0)
    //c3v = (IndicMACD <= 0)
    
    RSI14 = RSI[14](close)
    c4a = (RSI14 >= 50)
    //c4v = (RSI14 <= 50)
    
    screener[c1a AND c2a AND c3a AND c4a]

    Je voudrai n’afficher que les titres qui viennent de changer d’état c’est à dire passer de 0 à 1 et pas les autres :

    pas ceux qui ont changé d’état il y a une semaine par exemple.

    Est ce que quelqu’un pourrait m’indiquer comment réaliser cela ?

    D’avance merci pour votre aide

    LR

    #36647 quote
    LouRichard
    Participant
    Veteran

    Trouvé ! :

    indicator1, ignored = CALL "MyIndicator(1)"
    c1 = (indicator1[1] < indicator1)
    
    screener[c1a AND c2a AND c3a AND c4a AND c1]
    #36656 quote
    Nicolas
    Keymaster
    Master

    En effet bien joué. Merci d’avoir posté une réponse à ton problème.

    Tu aurais aussi également pu codé cela comme ceci:

    condition = c1a AND c2a AND c3a AND c4a
    
    screener[condition and NOT condition[1]]
    #36672 quote
    LouRichard
    Participant
    Veteran

    Merci pour tes précisions

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

Détecter uniquement les changements de valeur


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
LouRichard @lourichard Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by LouRichard
8 years, 9 months ago.

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