proorder autotrading avec extratrend

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #178727 quote
    jacquesgermain
    Participant
    Senior

    Bonjour, mon’indicateur extratrend acheté sur ProRealCode Market fonctionne bien en backtest mais impossible de déclencher un proorderautotrading, et lorsque j’édite le code proorderautotrading j’ai en fin de code: //—————————————————————- //
    code indisponible

    ci dessous recopie de mon système de trading

    //-------------------------------------------------------------------------
    // Code principal : tradeprice
    //-------------------------------------------------------------------------
    DEFPARAM cumulateOrders = false // Cumulating positions deactivate
    Defparam flatafter = 173000 //close the position at 16:00 (day trading) /could be switched off
    ONCE myatr = 1.0
    ONCE partialprofitfactor = 1.0
    ONCE ratchetfactor = 1.0
    ONCE risque = 1.0
    ONCE stopfactor = 1.0
    once StartE = 90000 //start time for opening positions
    once StartL = 17300 //ending time for opening positions (only trading in the morning)
    // = Barindex - TradeIndex(1) > IntradayBarIndex // limits the (opening) trades till 1 per day (OTD One Trade per Day)
    capitalinitial=10000
    risque=risque
    stopfactor=stopfactor//1.5
    partialprofitfactor=partialprofitfactor//3
    ratchetfactor=ratchetfactor//7
    myatr=myatr
    
    myTrend,ignored,ignored,myReDyn,ignored = CALL "ExtraTrend"[0,1, 0, 0, 0, 0](close)
    ratchet=lowest[30](highest[55](high)-ratchetfactor*averagetruerange[myatr])
    ok=myTrend[1]<>myReDyn[1]
    if ok and not longonmarket and close>myReDyn[1] then
    positionsize=round(((capitalinitial+STRATEGYPROFIT)*(risque/100))/(1.5*averagetruerange[20]))
    BUY positionsize shares AT MARKET
    set stop loss stopfactor*averagetruerange[myatr]
    flag=0
    ENDIF
    
    if longonmarket and close>=tradeprice+(partialprofitfactor*averagetruerange[myatr]) and flag=0 then //
    sell round(positionsize/2) shares at market
    flag=1
    endif
    if LONGONMARKET and close sell at market
    endif
    
    //-------------------------------------------------------------------------
    // Fonction : ExtraTrend
    //-------------------------------------------------------------------------
    Code indisponible
    #178731 quote
    Nicolas
    Keymaster
    Master

    “code indisponible”, c’est normal puisque celui-ci n’est pas libre, mais ça n’est pas cela qui doit empêcher le fonctionnement de la stratégie, à l’instar de ce qui marche dans le backtest.

    Le calcul de la taille de position est-il correct ? et adapté à l’instrument ?

    jacquesgermain thanked this post
    #178738 quote
    jacquesgermain
    Participant
    Senior

    oui le calcul de la taille de position est correct  et adapté à l’instrument.

    lorsque je tente  “dupliquer un système de trading” puis “préparer pour le trading automatique”  à partir du papertrading  j’ai le message

    “le code est invalide corrigez le ligne 41 erreur commande inconnue” or la ligne 41 correspond à la fonction extratrend code indisponible.

    #178795 quote
    Nicolas
    Keymaster
    Master

    Merci pour le retour, je vais investiguer et revenir poster les informations dés que possible.

    #187103 quote
    Keyeming
    Participant
    Junior

    Bonjour, avez-vous pu trouver une solution svp ? Je suis dans le même cas que cette personne.

    Merci

    #187111 quote
    fifi743
    Participant
    Master

    bonjour,

    il y a une erreur a la ligne 35.

    la condition n’est pas fermé ,il manque then

    #187133 quote
    Nicolas
    Keymaster
    Master

    @keyeming

    avec ce même code ou avec un autre ?

    #191085 quote
    rwanderer
    Participant
    New

    Ligne 21 -> Il y’a 5 paramètres dans l’Extratrend et je vois que tu en appelles 6…retires un “0” !

    myTrend,ignored,ignored,myReDyn,ignored = CALL “ExtraTrend”[0,1, 0, 0, 0, 0](close)

    #191094 quote
    jacquesgermain
    Participant
    Senior

    non il y bien 6 cases à cocher  donc CALL “ExtraTrend”[0,1, 0, 0, 0, 0](close)

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

proorder autotrading avec extratrend


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

This topic contains 8 replies,
has 5 voices, and was last updated by jacquesgermain
3 years, 11 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 09/29/2021
Status: Active
Attachments: No files
Logo Logo
Loading...