Aide pour identifier des variables

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #152098 quote
    sahero
    Participant
    New

    Bonjour,

    J’ai un bout de code que je désire backtester, mais je n’arrive pas à identifier les variables n && n2 qu’il contient pour lancer mon backtest. Auriez-vous une idée ? Ci-dessous le code :

    //variables
    //n2, exit, 10, 30, 2
    //n, open, 5, 20,2
    
    t1 = Time = 081000
    if t1 then
        t = high
        l = low
    endif
    
    t2 = Time > 081000 AND Time <= 240000
    
    if t2 and close crosses over t+n then
        buy 1 share at market nextbaropen
    endif
    
    if longonmarket and close < tradeprice-n2 or close >tradeprice + n2 then
        sell at market nextbaropen
    endif
    
    if t2 and close crosses under l-n then
        sellshort 1 share at market nextbaropen
    endif
    
    if shortonmarket and close >tradeprice+n2 or close <tradeprice-n2 then
        exitshort at market nextbaropen
    endif

    D’avance merci pour vos lumières

    #152117 quote
    GraHal
    Participant
    Master

     

    DEFPARAM CUMULATEORDERS = False
    
    //variables
    
    n2 = 45 //exit, 10, 30, 2
    n = 10 //open, 5, 20,2
     
    t1 = Time = 081000
    if t1 then
    t = high[1]
    l = low[1]
    endif
     
    t2 = Time > 081000 AND Time <= 240000
     
    if t2 and close crosses over t+n then
    buy 1 share at market
    endif
     
    if longonmarket and close < tradeprice-n2 or close >tradeprice + n2 then
    sell at market
    endif
     
    if t2 and close crosses under l-n then
    sellshort 1 share at market
    endif
     
    if shortonmarket and close >tradeprice+n2 or close <tradeprice-n2 then
    exitshort at market
    Endif
    

     

    S.jpg S.jpg
    #152122 quote
    sahero
    Participant
    New

    Hello GraHal,

    Thanks for your input, but still I can’t figure what 10, 30, 2 and 5, 20, 2 stands for or what they are based on.
    Could you please enlighten me ? Also, Why would you use 45 and 20 ?

    [FR] Merci pour votre contribution. Cependant, je ne comprends toujours pas sur quoi sont basés ou ce que représentent 10, 30, 2 et 5, 20, 2.
    Pourriez-vous m’éclairer ? Aussi, pourquoi utilisez-vous 45 et 20 ?

    #152138 quote
    GraHal
    Participant
    Master

    Je suppose que vous n’avez pas écrit le code?

    Avez-vous regardé l’une des vidéos de formation ou lu le manuel PRT sur l’utilisation d’Optimize ??

    Ci-dessous, un lien vers une vidéo traitant de l’optimisation … d’où proviennent les 10, 30, 2 et 5, 20, 2.

    https://www.prorealcode.com/blog/video-tutorials/how-to-optimize-a-trading-system-with-probacktest-prorealtime/

    https://www.prorealcode.com/blog-list-view/

    https://www.prorealtime.com/en/pdf/probacktest.pdf

    #152140 quote
    GraHal
    Participant
    Master

    Vous trouverez ci-joint le .itf que vous pouvez essayer 

    Sahero-HiLo-DJI-M1-v1.itf
    #152891 quote
    sahero
    Participant
    New

    Hello @GraHal,

    Merci infiniment !

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

Aide pour identifier des variables


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
sahero @sahero Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by sahero
5 years, 3 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 11/29/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...