Bug du dimanche avec forex: Astuce

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18535 quote
    noisette
    Participant
    Veteran

    Bonjour à tous,

    Je suis sur la V10.2 chez IG et je me suis rendu compte que PRT ne connaît pas le dimanche. Ou plus exactement ne fait pas de distinction entre le lundi et le dimanche.

    Le problème est que le forex ouvre le dimanche à 22h.

    exemple si on écrit le code ci-dessous on va ouvrir un ordre le lundi mais aussi le dimanche

    IF dayofweek = 1 AND time = 230000 THEN
    BUY 1 CONTRACTS AT MARKET
    ENDIF

    Après avoir tourné le problème dans tous les sens, j’ai trouvé une astuce toute c***** pour contourner ce problème. Avec le code ci-dessous en H1 on achète le uniquement le lundi à 23h.

    La valeur entre crochets est à adapter selon le timeframe. Et ” <5 ” peut être remplacé par ” = 5 ” pour aceter uniquement le dimanche et pas le lundi.

    lundiok = 0
    
    IF DAYOFWEEK[3] < 5 THEN
    lundiok = 1
    ENDIF
    
    IF DAYOFWEEK = 1 AND TIME = 230000  AND lundiok = 1 THEN
    BUY 1 SHARES AT MARKET
    ENDIF

     

    Bone soirée

    #18536 quote
    noisette
    Participant
    Veteran

    J’aurai du mieux me relire aceter>>>achetrer

    Bone soiree>>>Bonne soirée Là il y a comme un os 🙂

    Visiblement il n’est pas possible de modifier ?

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

Bug du dimanche avec forex: Astuce


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
noisette @noisette Participant
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by noisette
9 years, 3 months ago.

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