Définir un SL basé sur le plus haut/bas bougie précédente

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12368 quote
    SofitechSofitech
    Participant
    Master

    Dans un système ProOrder,
    Comment peut-on créer un Stop basé sur le plus bas de la bougie précédente en cas d’achat :
    SL = Plus bas bougie [1] + x pips.
    Ou sur le plus haut de la bougie précédente en cas de vente à découvert :
    SL = Plus bougie [1] + x pips

    #12485 quote
    AstonAddictAstonAddict
    Participant
    Average

    Bonjour,

    Voici un code de stop maison (intégré dans un système de trading test) qui place le SL sur la clôture de la bougie précédente. Si tu remplace “Close” par High ou Low, ça devrait fonctionner

     

    // Condition prise de position
    IF TIME = 090000 AND NOT ONMARKET THEN
    BUY 1 CONTRACT AT MARKET
    TRAIL= Close - Seuil
    SELL AT TRAIL STOP
    ENDIF
    
    
    // Trailing Stop Maison
    Seuil = 30
    
    IF close-Seuil > TRAIL THEN
    trail = close - Seuil
    ENDIF
    
    // Ordre de vente STOP
    IF LONGONMARKET THEN
    SELL AT TRAIL STOP
    ENDIF
    
    Graph Trail

     

    PS : le NOT ONMARKET dans la boucle IF de prise de position est essentiel, sinon le TRAIL sera recalculé pendant que tu es en position !

    Nicolas thanked this post
    #12530 quote
    SofitechSofitech
    Participant
    Master

    Merci beaucoup pour cette réponse !

    Je poursuis mes recherches.

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Définir un SL basé sur le plus haut/bas bougie précédente


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
Sofitech @sofitech Participant
Summary

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

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 08/29/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...