Au signal ne pas entrer. Entrer + tard à un autre niveau de prix.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #208905 quote
    bertrandpinoybertrandpinoy
    Participant
    Master

    Bonjour à tous,

    J’ai chercher sur le forum mais je ne trouve pas précisément cela.

    Comment conserver le signal (achat ou vente) mais le déclencher  X barres plus tard et ceci au niveau de cette dernière barre?

    Cordialement.

    #208938 quote
    NicolasNicolas
    Keymaster
    Legend

    On enregistre le moment de l’événement et en fonction du temps passé on prend une action ou non:

    if signal then 
     start=barindex
    endif 
    
    bars = barindex-start //quantité de bougies depuis le dernier "signal"

    on peut aussi utiliser un temps en secondes avec TIMESTAMP:

    if signal then 
     start=timestamp
    endif 
    
    bars = timestamp-start //quantité de secondes depuis le dernier "signal"
    #208948 quote
    bertrandpinoybertrandpinoy
    Participant
    Master

    Merci Nicolas, c’est toujours très aimable vos services.
    Pouvez vous aidez encore?
    1/exemple: signal= c2 et une entrée short 20 barres après.
    2/ exemple: signal= c2 et une entrée short 20 secondes après.

    Ce que je fais ne va pas.
    merci beaucoup

    #209446 quote
    bertrandpinoybertrandpinoy
    Participant
    Master

    Re bonjour, je ne parviens pas a faire ce que je demande au tout début de ce sujet. Un coup de mains serait apprécié; merci, cordialement.

    #209675 quote
    NicolasNicolas
    Keymaster
    Legend

    1/exemple: signal= c2 et une entrée short 20 barres après.

    if signal then 
     startbar=barindex
    endif 
    
    if not onmarket and startbar>0 and barindex-startbar>=20 then 
     buy at market 
     startbar=0 //reset du trade pour ce signal 
    endif

     

    2/ exemple: signal= c2 et une entrée short 20 secondes après.

    if signal then 
     starttime=timestamp
    endif 
    
    if not onmarket and starttime>0 and timestamp-starttime>=20 then 
     buy at market 
     starttime=0 //reset du trade pour ce signal 
    endif
    #209766 quote
    bertrandpinoybertrandpinoy
    Participant
    Master

    C’est super! merci Nicolas

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

Au signal ne pas entrer. Entrer + tard à un autre niveau de prix.


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 02/01/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...