STOP LOSS : Sous condition d'un indicateur

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #60389 quote
    HC
    Participant
    Average
    IF (c1   or C20 and C10) AND c3  and c50 AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    
    ENDIF
    
    // Stops et objectifs
    // Conditions pour fermer une position acheteuse
    indicator200 = EndPointAverage[80](close)
    indicator300 = Average[100](close)
    c200 = (indicator200 CROSSES UNDER indicator300)
    
    IF c200 THEN
    SELL AT MARKET
    ENDIF

    Bonjour,

    J’essai de faire une stratégie longue, pour laquelle je souhaiterai conditionner la sortie

    Par exemple, je souhaiterai avoir un stop Fixe

    SET STOP LOSS 50

    si par exemple le prix etait inferieur à la moyenne mobile 200

    Tout en gardant ma stratégie de sortie initiale.

    Objectif : avoir un sécurité de ne pas perdre plus de X €

    Merci de votre aide.

    #119809 quote
    ginko
    Participant
    Average

    Cela fait un bout de temps que ce post est fait, mais je ne vois pas la contradiction avec une sortie SET STOP LOSS 50 ou pour ne pas perdre plus de x €, SET STOP $LOSS 200 (expliqué ici : https://www.prorealcode.com/documentation/moneyloss/)

    Même s’il y a un stop loss,  on peut fermer la position comme vous le faites, le SET STOP LOSS ajoute juste une autre condition de sortie, qu’il est possible de revoir dans le code en fonction de niveaux ou de conditions. Exemple

    IF (c1   or C20 and C10) AND c3  and c50 AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
     
    ENDIF
     
    // Stops et objectifs
    // Conditions pour fermer une position acheteuse
    indicator200 = EndPointAverage[80](close)
    indicator300 = Average[100](close)
    c200 = (indicator200 CROSSES UNDER indicator300)
    
    IF close > indicator200 then
    SET STOP $LOSS 80
    ELSE
    SET STOP $LOSS 50
    ENDIF
     
    IF c200 THEN
    SELL AT MARKET
    ENDIF
    Nicolas thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

STOP LOSS : Sous condition d'un indicateur


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
HC @hc Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by ginko
6 years ago.

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