CONSERVATION D’UN SIGNAL

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

    Bonjour,

    Une petite question que je me pose concernant un code que j’ai rédigé et dont

    je voudrais garder le dernier signal uniquement et jusqu’au prochain.

    En utilisant la fonction Depfparam drawonlastbaronly  et en gardant FALSE

    j’ai tous les croisements de la EMA100 qui apparaissent sur le graphique, et comme écris plus haut je ne voudrais garder

    que le dernier.

    Existe t-il une instruction pour accéder à cette présentation.

    Il va de soi que lorsqu’un nouveau signal se matérialise, le précédent disparaît.

    Merci pour la réponse.

    Cordialement

     

     

    defparam drawonlastbaronly = FALSE // true

    EMA100 = ExponentialAverage[100](close)

     

    if close crosses over EMA100 THEN
    DRAWTEXT ( “•”, barindex , ExponentialAverage[100] ,dialog,BOLD,30 )coloured (0,191,255)
    DRAWTEXT (“◯”,barindex,ExponentialAverage[100],dialog,bold,30) coloured(0,0,255)
    ENDIF

    if close crosses under EMA100 THEN
    DRAWTEXT ( “•”, barindex , ExponentialAverage[100] ,dialog,BOLD,30 )coloured (220,20,60) // rouge crimson // (138,43,226)
    DRAWTEXT (“◯”,barindex,ExponentialAverage[100],dialog,bold,30) coloured(255,0,0)
    ENDIF

    RETURN

    #168760 quote
    Roland57800
    Participant
    Veteran

    J’ai oublié de copier correctement le code, désolé

    je reposte le code, ma question est dans le post précédent.

    defparam drawonlastbaronly = FALSE          //    true
    
    
    EMA100 = ExponentialAverage[100](close)
    
    
    
    if close crosses over EMA100 THEN
    DRAWTEXT ( "•", barindex , ExponentialAverage[100] ,dialog,BOLD,30 )coloured (0,191,255)
    DRAWTEXT ("◯",barindex,ExponentialAverage[100],dialog,bold,30) coloured(0,0,255)
    ENDIF
    
    if close crosses under EMA100 THEN
    DRAWTEXT ( "•", barindex , ExponentialAverage[100] ,dialog,BOLD,30 )coloured (220,20,60)   // rouge crimson   //  (138,43,226)
    DRAWTEXT ("◯",barindex,ExponentialAverage[100],dialog,bold,30) coloured(255,0,0)
    ENDIF
    
    
    
    
    RETURN
    
    
    
    
    #168761 quote
    JC_Bywan
    Moderator
    Master

    Bonjour,

    tu peux partir du principe posé par ce code : https://www.prorealcode.com/prorealtime-indicators/v11-dynamic-rectangle-from-moving-average-breakout-zone-to-any-future-bar/

    en spécifiant les couleurs en bloc “if” selon crossover, et en y remplaçant le rectangle par les graphismes de ton code ci-dessus, ça donne :

    defparam DRAWONLASTBARONLY=true
     
    EMA100 = ExponentialAverage[100](close)
     
    if close crosses over EMA100 then
     barre=barindex
     niveau=EMA100
     red1=0
     green1=191
     blue1=255
     red2=0
     green2=0
     blue2=255
    endif
     
    if close crosses under EMA100 then
     barre=barindex
     niveau=EMA100
     red1=220
     green1=20
     blue1=60
     red2=255
     green2=0
     blue2=0
    endif
    
    DRAWTEXT ("•", barre , niveau, dialog, bold, 30) coloured(red1,green1,blue1)
    DRAWTEXT ("◯",barre, niveau, dialog, bold, 30) coloured(red2,green2,blue2)
     
    return ema100
    #168769 quote
    Roland57800
    Participant
    Veteran

    Merci Noobywan,

    je vais  regarder ça de suite

     

    Bon après – midi

    Cordialement

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

CONSERVATION D’UN SIGNAL


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Roland57800
4 years, 10 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 05/04/2021
Status: Active
Attachments: No files
Logo Logo
Loading...