Backtest optimization

Forums ProRealTime English forum ProOrder support Backtest optimization

Viewing 8 posts - 1 through 8 (of 8 total)
  • #191407

    Hi, I am trying to figure out the best use of backtesting … by my experience
    – when I use optimization variables (with ranges or fixed values), tick-by-tick setting is ignored
    – when I integrate the same variables in the code, tick-by-tick setting is taken in consideration
    am I doing something wrong? or is there a way to do optimization with tick-by-tick setting?
    Thank you !

    #191413

    Just tick that box (always !!).
    🙂

     

    PS: Because that is so obvious … I know there is a situation that this checkbox does not show. But I forgot the situation …

    #191415

    Thank you Peter

    attached you see twice the same strategy once with optimization variables and the same strategy with the variables in the code.
    can it be, that there is a limitation in backtesting, this strategy combines Stop order for entry, stop loss and take profit, when entered

    SELLSHORT AnzLot SHARES AT SellLimit STOP
    set target pProfit AnzZiel
    set stop pLoss AnzLoss

    so it can happen, that entry an stop loss exit happens in the same 1h bar

    #191422

    There is no limitation in Backtesting regarding this, but you MUST always imply Tick by Tick mode (your first curve shows exactly what happens when this is Off and indeed because of more than one trade in a bar). If you can’t find that checkbox then it depends what part of the system will run and whether that has Tick by Tick internally On or Off.

    In Live it will go wrong if you are careless about the proper backtesting regarding this. This is not related to the variables being in the code or as Optimization Parameters.

    ALWAYS watch the rightmost column in the Optimization Result list. If that does not show 0 (like in my example) the trades happens differently than backtesting shows. Backtesting will show super optimistic (like your second half of the screenshot) while the opposite is the result (first half).

    On a side note : your real result will be what the 2nd half shows. So you have some work to do.
    Hint : Your trailing/pending order does not survive your bar length. Thus the distance it too short.
    … so much for your profitable strategy … 🙁
    😉

    #191425

    Thank you Peter for your detailed answer.
    I absolutely understand and fully agree on what you explained
    … the strange thing is, that in fact the tick-by-tick flag is set in both cases … and results are so different

    I mean this is the only flag to set right? or is there another config to set?

    #191427

    Haha, it is even more confusing than you think;

    What’s done under the hood (IIRC this also happens when you start PRT and have a Strategy running on your instrument(s) is that in that case Tick by Tick is switched off by PRT (this is a sheer bug). In that case, nice profit shows. Thus, when it does it wrongly (tick by tick mode is off), the wrong result shows and this result is infinitely better looking.

    So there is one devise only : Look explicitly at results with Tick by Tick  On (this means start it from the Editor and *NOT* from what you see below !!) and improve on the now poor results. The motto : you can do it. 🙂

    #191429

    Thank you, Peter, for for the detailed explanation !
    yes, this seems to be really tricky !

    #191432

    really ticky

     

    🙂

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login