Arrêt durant le week-end

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #49048 quote
    claschclasch
    Participant
    Senior

    Bonjour,

    J’aimerais que mon système clôt automatiquement une éventuelle position ouverte le VE à 23h00 et que le système reprend “du service” dans la nuit de dimanche à lundi à 00h02.

    Comment coder ceci sur mon sytème ?

    Je crois que les heures de 23h00 et 00h02 sont exactes ?

    Merci beaucoup pour votre aide !

    #49058 quote
    NicolasNicolas
    Keymaster
    Legend

    Il faut simplement faire des tests avec les jours et heures: (toutes les instructions liées aux dates et au temps sont ici: Date and time).

    if onmarket and dayofweek=5 and hour=23 and minute=0 then 
     sell at market 
     exitshort at market 
    endif

    Pour que le système travail à partir du Lundi uniquement il faut créer une condition booléenne et inclure toute le code de la stratégie à l’intérieur :

    if dayofweek>=1 and dayofweek<=5 and hour<23 then 
     //inclure le code de la stratégie 
    endif
    
    #49074 quote
    claschclasch
    Participant
    Senior

    Merci beaucoup !

    Bonne journée,

    clasch

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

Arrêt durant le week-end


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
clasch @clasch Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by claschclasch
9 years ago.

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