sortir du marché apres x bougies et en perte de y points

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #157813 quote
    magiclil
    Participant
    Average

    bonjour et merci nicolas pour tes réponses,

    aujourd’hui, j’aimerais réaliser ce bout de code:

    j’ai un SL a 50 points (et ca ne doit pas bouger bien sur) mais j’aimerais sortir du marché après 10 bougies si le cours est en dessous de mon point d’entrée.

    L’idéal ca serait de sortir si le cours est à -10 points ou + (-14, -25, -30…)

    mais bien sur mon stop a 50 doit toujours être effectif.

    j’espere que tu pourras m’aider 🙂

    #157816 quote
    Nicolas
    Keymaster
    Master

    Avec cette fonction, non testée, l’ordre d’achat devrait sortir si il est à plus de 10 points en dessous de son prix d’ouverture et si l’ordre est au marché depuis 10 bougies :

    if longonmarket and barindex-tradeindex>=10 and close-tradeprice<=-10*pointsize then 
     sell at market 
    endif
    #157915 quote
    magiclil
    Participant
    Average

    ca fonctionne tres bien. Vraiment cool, a voir comment je peux exploiter ce bout de code. Mes algos deviennent de plus en plus performant grace a toi Nicolas. Un grand merci

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

sortir du marché apres x bougies et en perte de y points


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
magiclil @magiclil Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by magiclil
5 years, 1 month ago.

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