BESOIN D'aide sur BREAKOUT

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #21594 quote
    larouedegannlarouedegann
    Participant
    Master

    Bonjour tout le monde,

    Je cherche à mettre en place un systeme de break out  avec une seule prise de position par jour a l”achat ou/et  a la vente .

    La prise de position est faite sur la cassure du haut et sur la barre meme de la cassure (achat).

    Malheureseusement même avec un compteur celui-ci me prends quand  même des positions apres un trade gagnant ou perdant et ne respecte pas le nombre de 1 trade achat-1 trade vente.

    quelqu’un pourrait t il me debugger la situation ?

    merci

    DEFPARAM CUMULATEORDERS = FALSE
    DEFPARAM FLATBEFORE = 080000
    DEFPARAM FLATAFTER = 171500
    
    ONCE  NbBarLimit = 111
    
    plushaut = HIGHEST[2](high)
    plusbas = LOWEST[2](low)
    
    
    IF TIME = 081000 THEN
    
    MyCanal = (plushaut-plusbas)<(25*pipsize)
    MylimitBuy = plushaut+1*pipsize
    Mylimitsell = plusbas-1*pipsize
    countbuy = 0
    countsell = 0
    lastindex = 0
    MyIndex = barindex
    ENDIF
    
    IF Barindex >= Myindex + NbBarLimit THEN
    MyLimitbuy = 0
    MyLimitsell = 0
    ENDIF
    
    // Conditions pour ouvrir une position acheteuse
    
    IF MylimitBuy AND Mycanal> 0 AND countbuy<1 THEN
    BUY 1 contract AT MylimitBuy STOP
    ENDIF
    IF LOngonmarket and tradeindex<>lastindex then
    countbuy = countbuy + 1
    lastindex = tradeindex
    endif
    
    // Conditions pour ouvrir une position vendeuse
    IF MylimitSell AND Mycanal > 0 THEN
    SELLSHORT 1 contract AT Mylimitsell STOP
    ENDIF
    IF SHORTONMARKET AND TRADEINDEX<> lastindex then
    countsell = countsell + 1
    lastindex= barindex
    endif
    
    //STOP AND PROFIT
    SET STOP LOSS SL
    SET target PROFIT TP
    
    #21630 quote
    larouedegannlarouedegann
    Participant
    Master

    Salut Nicolas;

    pourrais tu enlever ce topic tu m”avais déja répondu

    merci

Viewing 2 posts - 1 through 2 (of 2 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

BESOIN D'aide sur BREAKOUT


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by larouedegannlarouedegann
9 years, 8 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 01/18/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...