Prise de position Gap Down

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #253870 quote
    paulPRT
    Participant
    New

    Bonjour à tous, je souhaite coder un algo qui prend un short en cas de gap baissier à l’open, sur des bougies 2min.

    J’ai commencé un premier travail mais je ne comprends pas pourquoi le gap du 28 au 29 octobre n’est pas pris en compte.

     

    En espérant que vous pourrez m’aider à trouver mon erreur et vous souhaitant une très bonne journée!

    Paul

     

    If time >=090000 and time <=090200 then 
       if variation<-0.006 and close[1]>open then
          GapDown = 1
          sellshort 1 share at market
          //set stop trailing  20
          set stop price highest[3]+ 3
          set target price lowest[3]+3
       endif
    else
       GapDown =0
    endif
    Capture-decran-2025-11-21-161535.png Capture-decran-2025-11-21-161535.png
    #253872 quote
    JC_Bywan
    Moderator
    Master

    Est-ce que la bougie de 9h à 9h02 est cachée derrière le texte “2 unités”, ou bien absente ce jour-là?

    Si pas de bougie clôturant à 9h02, alors la ligne 1 “If time >=090000 and time <=090200 then” ne sera lue qu’à la fin de la bougie terminant à 9h04 et ira au “else” pour donner “GapDown =0“.

    Iván González thanked this post
    #253876 quote
    JS
    Participant
    Senior

    Cela vient du fait que ta deuxième condition (Close[1] > Open) n’est pas vraie sur cette barre spécifique, ce qui empêche l’exécution de l’instruction…

    Iván González thanked this post
    #253878 quote
    paulPRT
    Participant
    New

    Il y a bien eu une bougie à 9h02 ce jour. J’ai d’autres exemples de gap qui devraient être vendus mais qui ne le sont pas

    #253879 quote
    paulPRT
    Participant
    New

    @JS, pourtant la close précédente est plus haute que l’open de la bougie de 9h

    #253880 quote
    JS
    Participant
    Senior
    #253883 quote
    paulPRT
    Participant
    New

    Tu es sur CFD ou future sur ton graph, je souhaite faire tourner mon algo sur le DAX cash

    #253885 quote
    JS
    Participant
    Senior

    Mon graphique était le futur DAX du broker IB…

    J’ai également regardé le CFD d’IG et là, Close[1] > Open est effectivement vrai, mais dans ce cas ton algo ouvre aussi une position… ?

    Scherm­afbeelding-2025-11-22-om-16.28.59.png Scherm­afbeelding-2025-11-22-om-16.28.59.png Scherm­afbeelding-2025-11-22-om-16.29.27.png Scherm­afbeelding-2025-11-22-om-16.29.27.png
    #253892 quote
    paulPRT
    Participant
    New

    Il devrait ouvrir une position oui, mais je ne comprends pas pourquoi il ne le fait pas sur le cash,….

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

Prise de position Gap Down


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
paulPRT @paulprt Participant
Summary

This topic contains 8 replies,
has 3 voices, and was last updated by paulPRT
3 months, 1 week ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 11/21/2025
Status: Active
Attachments: 4 files
Logo Logo
Loading...