Solder 1 position avant le stop en auto

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #164866 quote
    Roland57800
    Participant
    Veteran

    Bonjour,

    Je me pose la question de savoir s’il est possible de couper une position

    dans un système de trading auto avant le STOP placé.

    Par exemple  :

    le Stop est fixé à 100 points, mais le trade ne part pas correctement

    et couper en auto par exemple à 50 points.

    Merci pour une idée si cela est possible

    Cordialement

    #164869 quote
    Nicolas
    Keymaster
    Master

    Pourquoi pas, mais ça revient à poser un stoploss à 50 points non ?!

    Pour mémoire, pour fermer une position d’achat : SELL AT MARKET

    et une VAD: EXITSHORT AT MARKET

    //cas d'un achat 
    if longonmarket and tradeprice-close < -50*pointsize then 
     sell at market 
    endif 
    
    //cas d'une vente 
    if shortonmarket and close-tradeprice < -50*pointsize then 
     exitshort at market 
    endif
    #164870 quote
    Roland57800
    Participant
    Veteran

    Merci Nicolas pour cette réponse rapide

    Je vais étudier la question

    Bonne journée

    Cordialement

    #164872 quote
    Roland57800
    Participant
    Veteran

    Nicolas,

    je reviens avec mon problème. J’ai bien repris ton code

    IF not longonmarket and A1 and A2 and TimeAchat then
    BUY level shares at market
    SET TARGET pPROFIT tp
    
    endif
    if longonmarket and tradeprice-close < - 50 * pointsize then
    sell at market
    endif

    mais ça ne donne pas le résultat escompté, puisque en test j’ai encore des pertes supérieures à 50

    Est-ce que les instructions ne sont pas placées au bon endroit ??

    #164874 quote
    Nicolas
    Keymaster
    Master

    Le code est lu à fin de bougie, donc en effet la distance calculée peut être supérieure.

    Donc à nouveau, pourquoi ne pas mettre un stoploss à 50 points ?

    set stop ploss 50
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Solder 1 position avant le stop en auto


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Nicolas
4 years, 11 months ago.

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