STOP placé à n périodes après démarrage trade automatique

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #191174 quote
    JEANLOUIS69
    Participant
    New

    Bonjour à la communauté,

    Je cherche une formule qui me permet de mettre un STOP automatique à un certain nombre de périodes après le départ du trade. Par exemple le trade auto démarre un jour J, comment de stopper au jour J+10 ? Est-ce possible de programmer cela ?

    Je vous remercie de votre aide.

    Jean-Louis

    #191901 quote
    Nicolas
    Keymaster
    Master

    Je pense que tu parles de fermer la position automatiquement 10 périodes après son entrée, dans ce cas on compare avec le BARINDEX courant avec le TRADEINDEX de l’ordre:

    if onmarket and barindex-tradeindex>=10 then 
     sell at market 
     exitshort at market 
    endif
    JEANLOUIS69 thanked this post
    #192162 quote
    JEANLOUIS69
    Participant
    New

    Bonjour Nicolas,

    Merci, la formule marche à merveille !

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

STOP placé à n périodes après démarrage trade automatique


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 04/04/2022
Status: Active
Attachments: No files
Logo Logo
Loading...