SMA 20 a Plat en séances

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #258764 quote
    HUGO 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ález
    Moderator
    Master

    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 LEVIEILS
    Participant
    Senior

    Merci Ivan

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

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

SMA 20 a Plat en séances


ProScreener : Scanners de Marché & Détection

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by HUGO LEVIEILS
58 minutes ago.

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