BE évolutif à chaque bougie

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #203955 quote
    overspinoverspin
    Participant
    Junior

    bonjour,

    j’utilise une mise à BE qui fonctionne parfaitement mais je souhaiterais qu’une fois cette mise à BE s’effectue une évolution du stop se produise chaque fois qu’une bougie se clôture du style à chaque bougie remonter le stop d’un point , et ce tant pour les long que les short, pouvez vous m’aider car mes différents essais se soldent par un échec

    voici le code du BE

    //Unité pour le BE
    timeframe(15 minute,updateonclose)
    startBreakeven = 50 //distance d'activation
    PointsToKeep   = 2 //distance au dessus de l'entrée (Long)
     
    //reset
    IF NOT ONMARKET THEN
    breakevenLevel=0
    ENDIF
     
    IF LONGONMARKET AND close-tradeprice(1)>=startBreakeven*pipsize THEN
    breakevenLevel = tradeprice(1)+PointsToKeep*pipsize
    ELSIF SHORTONMARKET AND tradeprice(1)-close>=startBreakeven*pipsize THEN
    breakevenLevel = tradeprice(1)-PointsToKeep*pipsize
    ENDIF
     
    IF breakevenLevel>0 THEN
    SELL      AT breakevenLevel STOP
    EXITSHORT AT breakevenLevel STOP
    ENDIF
    
    #204856 quote
    overspinoverspin
    Participant
    Junior

    Bonjour,

    Personne n’a donc d’idée pour que mon BE devienne stop suiveur après son déclenchement remonte d’un point a chaque bougie ?

    Merci

     

     

    #204859 quote
    EzelEzel
    Participant
    New
    TGL0 = 65
    
    IF not onmarket THEN
    MAXPRICE = 0
    PRICEXIT = 0
    ENDIF
    
    IF longonmarket THEN
    MAXPRICE = MAX(MAXPRICE,close)
    IF MAXPRICE - tradeprice(1) >= TGL0 * pointsize THEN
    PRICEXIT = MAXPRICE - TGL0 * pointsize
    ENDIF
    ENDIF
    
    IF onmarket and PRICEXIT>0 THEN
    SELL at PRICEXIT STOP
    ENDIF

    hello !

    dans TGL c’est la valeur d’écart entre le prix et le BE, se met a jour a chaque clôture 15min si ton bot fonctionne en 15min

    Nicolas and vanaerde thanked this post
    #204860 quote
    EzelEzel
    Participant
    New
    TGS0 = 64
    
    IF not onmarket THEN
    MINPRICE = close
    PRICEEXIT = 0
    ENDIF
    
    IF shortonmarket then
    MINPRICE = MIN(MINPRICE,close)
    IF tradeprice(1) - MINPRICE >= TGS0 * pointsize THEN
    PRICEEXIT = MINPRICE + TGS0 * pointsize
    ENDIF
    ENDIF
    
    IF onmarket and PRICEEXIT > 0 THEN
    EXITSHORT AT PRICEEXIT STOP
    ENDIF

    et pour les short

    vanaerde thanked this post
    #205722 quote
    overspinoverspin
    Participant
    Junior

    Merci Ezel,après test cela marche parfaitement

     

     

    vanaerde thanked this post
Viewing 5 posts - 1 through 5 (of 5 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

BE évolutif à chaque bougie


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
overspin @overspin Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by overspinoverspin
3 years, 9 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 11/10/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...