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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #191174 quote
    JEANLOUIS69JEANLOUIS69
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    JEANLOUIS69JEANLOUIS69
    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.
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

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 JEANLOUIS69JEANLOUIS69
4 years, 7 months ago.

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