Ouvrir oubien fermer immediatement une position au contact d'une MM

Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #122984 quote
    bona25
    Participant
    Senior

    Je souhaiterai programmer l’ouverture un Call qu’en le prix touche (la MMA3 bas) et une fermer celle-ci qu’en le prix touche ensuite (la MMA3 haut )et inversement pour ouvrir un short et fermer ce short.

    Je sais qu’il s’agit  de code avec des ordres conditionnel mais après différente recherche je n’arrive toujours pas a code la programmation.

    je compte sur vous pour m’aider

    par avance merci.

    #123013 quote
    Nicolas
    Keymaster
    Master

    un Call qu’en le prix touche (la MMA3 bas) et une fermer celle-ci qu’en le prix touche ensuite (la MMA3 haut )

    Désolé je n’ai pas compris. Un petit exemple en image m’aiderait beaucoup, merci.

    #123016 quote
    bona25
    Participant
    Senior
    #123018 quote
    Nicolas
    Keymaster
    Master

    Le code ci-dessous devrait fonctionner pour ce que tu cherches à faire :

    mmh = average[3](high)
    mml = average[3](low)
    
    if not longonmarket and close>mml then
    buy at mml limit
    sell at mmh limit
    endif
    
    if longonmarket then
    sell at mmh limit
    endif
    
    if not shortonmarket and close<mmh then
    sellshort at mmh limit
    exitshort at mml limit
    endif
    
    if shortonmarket then
    exitshort at mml limit
    endif
    
    graphonprice mmh coloured(255,0,0)
    graphonprice mml coloured(0,100,255)
    
    #123019 quote
    bona25
    Participant
    Senior

    Désolé Nicolas

    j’ai le problème suivant

    Capture-d’écran-2020-03-23-à-16.37.41.png Capture-d’écran-2020-03-23-à-16.37.41.png
    #123021 quote
    fifi743
    Participant
    Master

    Désolé Nicolas

    j’ai le problème suivant

    bonjour,

    il te manque ligne 5 et 6

    buy 1 contract at mml limit

     

    #123023 quote
    bona25
    Participant
    Senior
    #123025 quote
    fifi743
    Participant
    Master

    j’ai trouvé tu ne peux pas créer un indicateur avec buy sell exitshort et sellshort

    bona25 thanked this post
    #123026 quote
    bona25
    Participant
    Senior

    il y a peut être une autre solution?

    #123027 quote
    fifi743
    Participant
    Master

    le code de nicolas va dans proorder

    #123034 quote
    robertogozzi
    Moderator
    Master

    Vous avez publié dans le ProOrder et demandé une stratégie.

    Vouliez-vous un indicateur? Si c’est le cas, je vais le déplacer vers le forum ProBuilder.

    #123037 quote
    bona25
    Participant
    Senior

    Indicateur et stratégie

    merci

    #123038 quote
    bona25
    Participant
    Senior

    Pouvez vous me répondre s’il vous plait si c’est possible ou pas ?

    merci

    #123045 quote
    robertogozzi
    Moderator
    Master

    La stratégie est celle écrite par Nicolas, que doit retourner l’indicateur?

    #123046 quote
    bona25
    Participant
    Senior

    Malheureusement j’ai le problème suivant

    Capture-d’écran-2020-03-23-à-16.37.41-1.png Capture-d’écran-2020-03-23-à-16.37.41-1.png
Viewing 15 posts - 1 through 15 (of 28 total)
  • You must be logged in to reply to this topic.

Ouvrir oubien fermer immediatement une position au contact d'une MM


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
bona25 @bona25 Participant
Summary

This topic contains 27 replies,
has 5 voices, and was last updated by bona25
5 years, 11 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 03/23/2020
Status: Active
Attachments: 7 files
Logo Logo
Loading...