SMA 20 à plat en séance dans un screener ProRealTime

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #258764 quote
    HUGO LEVIEILSHUGO LEVIEILS
    Participant
    Senior

    Bonjour,

    Quelqu’un peu si possible rajouter a ce code, la SMA 20 a Plat en séance.

    Merci d’avance

    Cordialement


    IF BarIndex = 0 THEN
    haClose = Close
    haOpen = Open
    ELSE
    haClose = (Open + High + Low + Close) / 4
    haOpen = (haOpen[1] + haClose[1]) / 2
    ENDIF
    
    cHA = haClose > haOpen
    
    myTenkan = TenkanSen[9, 26, 52]
    cTenkan = myTenkan > myTenkan[1]
    
    mySMA = Average[7](Close)
    cSMA = mySMA > mySMA[1]
    
    mySAR = SAR[0.02, 0.02, 0.2]
    cSAR = Close > mySAR and close[1]<mysar[1]
    
    SCREENER[cHA AND cTenkan AND cSMA AND cSAR]
    
    #258765 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Bonjour,

    Voici le code avec la SMA 20 plate ajoutée :

    IF BarIndex = 0 THEN
    haClose = Close
    haOpen = Open
    ELSE
    haClose = (Open + High + Low + Close) / 4
    haOpen = (haOpen[1] + haClose[1]) / 2
    ENDIF
    
    
    cHA = haClose > haOpen
    
    
    myTenkan = TenkanSen[9, 26, 52]
    cTenkan = myTenkan > myTenkan[1]
    
    
    mySMA = Average[7](Close)
    cSMA = mySMA > mySMA[1]
    
    
    mySAR = SAR[0.02, 0.02, 0.2]
    cSAR = Close > mySAR AND Close[1] < mySAR[1]
    
    
    mySMA20 = Average[20](Close)
    cSMA20flat = ABS(mySMA20 - mySMA20[1]) < mySMA20 * 0.001
    
    
    SCREENER[cHA AND cTenkan AND cSMA AND cSAR AND cSMA20flat]
    


    La condition cSMA20flat considère la SMA 20 comme « plate » lorsque la variation entre deux barres consécutives est inférieure à 0,1 % de sa valeur. Vous pouvez ajuster ce seuil (0.001) selon la volatilité des instruments que vous scannez — une valeur plus grande rend la condition plus permissive.

    #258766 quote
    HUGO LEVIEILSHUGO LEVIEILS
    Participant
    Senior

    Merci Ivan

    j’ai modifier et j’ai mis 0.010 tu en pense quoi ? c’est peut être de trop ?

    #258772 quote
    NicolasNicolas
    Keymaster
    Legend

    Il est difficile de savoir ce qui est plat ou non, considérant déjà l’aspect visuel, proprement sujet à interprétation d’une personne à une autre, puis selon l’instrument si on considère un pourcentage du prix, cela étant adaptée à la volatilité ainsi qu’au prix de l’actif en lui même.

    Pour cette raison, certains utiliseront plutôt la fameuse notion d’angle, plus visuel et adaptatif / universel, voir les nombreux sujets et codes dans le site, via l’outil de recherche.

    En vrac:

    B.M.I. Angle of MA

    Indicator Angle of SMA (20)

    Calculating the Angle of a Moving Average in ProBuilder

    Calculating the Angle of a Moving Average Slope

    …

    HUGO LEVIEILS thanked this post
    #258775 quote
    HUGO LEVIEILSHUGO LEVIEILS
    Participant
    Senior

    Ok merci

Viewing 5 posts - 1 through 5 (of 5 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

SMA 20 à plat en séance dans un screener ProRealTime


ProScreener : Scanners de Marché & Détection

New Reply
Author
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by HUGO LEVIEILSHUGO LEVIEILS
7 months, 3 weeks ago.

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