Stratégie simple avec Trailing Stop

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #77803 quote
    Ted21Ted21
    Participant
    Senior
    Bonsoir,   Pourriez-vous m’aider à coder la stratégie suivante : Sur indice le lundi matin après mon analyse fondamentale je décide de rentrer Long ou Short à 9h00. Ensuite je souhaite que la position soit gérée par un stop suiveur de x % / rapport au prix d’entrée avec pas d’avance réglable si possible. La sortie se fera le vendredi à la clôture ou par trailing stop Afin de la backtester est-il possible de rentrer Long ou Short de façon aléatoire afin de tester le trailing stop ? L’idée est de backtester le trailing stop sur des entrées aléatoire (une par semaine) et ensuite de trader avec une entrée discrétionnaire. Par avance merci,
    #77826 quote
    NicolasNicolas
    Keymaster
    Legend
    Tu pourras backtester ta stratégie avec le code ci-dessous: [scode] defparam cumulateorders=false trailingpercent = 0.5 timec = dayofweek>=5 and time>=220000 if timec then sell at market exitshort at market reset=1 endif if not onmarket and not timec and reset then test = open>close if test then sellshort at market reset=0 else buy at market reset=0 endif endif set stop %trailing trailingpercent [/scode]
    Ted21 thanked this post
    #77830 quote
    Ted21Ted21
    Participant
    Senior

    Merci beaucoup pour la réactivité.

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

Stratégie simple avec Trailing Stop


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
Ted21 @ted21 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Ted21Ted21
8 years, 2 months ago.

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