Setter le stop loss sur la base du dernier ordre ouvert

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #187474 quote
    elechim
    Participant
    Junior
    // Définition des paramètres du code
    DEFPARAM CumulateOrders = True// Cumul des positions désactivé
    
    IF Date[0] = 20210909 THEN
    SELLSHORT 1 CONTRACT AT MARKET
    SELLSHORT 0.5 CONTRACT AT Close-30 limit
    SELLSHORT 0.2 CONTRACT AT Close-60 limit
    SELLSHORT 0.3 CONTRACT AT Close-90 limit
    SELLSHORT 0.4 CONTRACT AT Close-120 limit
    SELLSHORT 0.12 CONTRACT AT Close-150 limit
    SELLSHORT 0.08 CONTRACT AT Close-180 limit
    ENDIF
    
    // Stops et objectifs
    SET STOP pLOSS 60
    //SET STOP TRAILING 60
    SET TARGET pPROFIT 200

    Bonjour,

    Le code d’exemple m’a permis tester que l’ensemble des ordres se clôtures en fonction du premier ordre ouvert (dans l’exemple à 60 pour le stop loss et 200 pour le profit target).

    J’aimerais savoir s’il y a une astuce pour que les stop loss soit positionné de x pips du dernier ordre ouvert. En clair le stop loss se déclenche à 60 pips du dernier ordre ouvert.

    Merci d’avance pour votre aide.

    Michel

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Setter le stop loss sur la base du dernier ordre ouvert


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
elechim @elechim Participant
Summary

This topic contains 1 voice and has 0 replies.

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