Difference in outcome backtest and automated trading

Viewing 15 posts - 16 through 30 (of 49 total)
  • Author
    Posts
  • #226402 quote
    MartinB
    Participant
    New

    Thanks for your comment Grahal.

    I deal live and at the same time I run the backtest live with the same spread, time zone, etc

    My main issue is that I have days with 70 to 90 points difference between the two systems.

    At the top of every hour, positions are taken in both systems always, but here starts the difference already despite the same spread, commission, etc

    The rest of the differences are caused by the trailing stop as the live system is treating the trailing stop differently apparently, from the one in the backtest.

    Maybe it has to do with the steps of the trailing stops. I can’t see the history of the steps taken in the backtest.

    Do you know this perhaps?

    Best regards,

    Martin

    #226404 quote
    GraHal
    Participant
    Master

    What Instrument are you trading?

    I can’t see the history of the steps taken in the backtest.

    Use GRAPH to see the trailing stop in backtest.

    GRAPH

    MartinB thanked this post
    #226418 quote
    GraHal
    Participant
    Master

    In your OP you state USD/JPY, the spread on Forex varies all day long linked to price action / volatility … post an example code snippett as to how you coded this variation into your System that you are backtesting?

    Also when you say backtesting … do you mean …

    1. Backtesting on historical data only.
      OR
    2. Allowing the backtest engine / window to run forward and so test on Live data?
    MartinB thanked this post
    #226447 quote
    MartinB
    Participant
    New

    Hello Grahal,

    I use both, backtesting and let the back engine run forward

    I trade USD/JPY and EUR/USD, due to the low spread and the high volume

    In the hours I trade, I use 1 pip spread for both currency pairs.

    I use the standard Trailing stop  from Prorealtime

    I attached 3 ITF files, my original files ITF and ITF 1

    ITF file 2 is send by Peter in an earlier post, but I was not able to test it yet.

    I´m happy with my systems as it makes money in live trading, but looking at the corressponding backtests it should perform better.

    As said earlier, I like to work with small stops and the corresponding small losses should be made up by a few bigger movements, at least that is the plan 😉

    Maybe you can sent me with this info a new ITF file, with your thoughts to get the (forward) backtest in line with the live trades .

    MAGICAL-TREND-1.itf MAGICAL-TREND1.itf
    #226451 quote
    GraHal
    Participant
    Master

    Add the Indicator Bid-Ask band to your Real Live running chart and you will see how often the spread on Forex ‘flash widens’.

    You are trying to simulate an often ‘flash widen spread’ in Live by using a fixed 1 point spread in the backtest engine.

    I will try / test out your .itf’s during today and get back to you.

    #226453 quote
    GraHal
    Participant
    Master

    you will see how often the spread on Forex ‘flash widens’.

    You need to run the Live Chart on 5 seconds TF to see the ‘flash widen spread’ with the Bid-Ask band Indicator.

    MartinB thanked this post
    #226454 quote
    GraHal
    Participant
    Master

    I backtested your .itf files and in both you have not ticked / enabled the ‘Tick by Tick mode’ and so the backtest results look too good to be true but in reality / Live running they will run very different from backtest.

    The ‘Tick by Tick mode’ box is just below where you enter spread for backtest … tick / enable the box to get a true picture of results in backtest.

    MartinB thanked this post
    #226464 quote
    phoentzs
    Participant
    Master

    That was my statement from the beginning. 😉

    MartinB thanked this post
    #226465 quote
    Aragorna
    Participant
    Junior

    Hi Grahal,

    why is not possible anymore in Prorealtime for IB, to flag the Tick by Tick mode? ‘ve verified that every backtest I do is without it.

    Alessio

    #226466 quote
    GraHal
    Participant
    Master

    to flag the Tick by Tick mode? (on IB)

    I dont use IB, so does above mean … make tick by tick mode box available to be ticked / enabled?

    #226467 quote
    Aragorna
    Participant
    Junior

    exactly, yes. I’ve searched everywhere how to enable it but I couldn’t

    #226468 quote
    GraHal
    Participant
    Master

    Maybe @PeterSt can enlighten us about availability of tick by tick on IB as he uses IB a lot!

    Peter, please see the most recent 3 posts above.

    #226469 quote
    PeterSt
    Participant
    Master

    The short answer : indeed it has disappeared. However, the optimization result form still shows at the bottom “click a line to show the result including tick by tick data”. So I assume it still does so.

    The longer answer is about what happens in the first place when there is no optimization result to click in/on. I wrote a text about it, but am reluctant to post it. It is too much of guessing and a larger discussion in the base (which often passed these forums) – usually talking about wrong results.  It would require extensive testing again.

    The ultra short answer : it is a bug that it’s left out now for PRT-IB. And where are the Release Notes ?

    #226473 quote
    Aragorna
    Participant
    Junior

    thank you for your answer. Many months ago I copied a strategy in prorealcode and I could see the difference with tick by tick enabled or not(excellent curve not enabled and curve going down with tick by tick enabled), because this strategy had the problem to open and close the trade in the same candle. I read you intervention and I tried to backtest this strategy yesterday (choosing a random parameter and putting it with from 0 to 10) and clicking on a result on the list, I’ve verified for sure that tick by tick does not work. So far there is no way to use it in IB, with or without parameters in optimization. According on how I build strategies, it shouldn’t affect it but it seems to me a big step back in the developing of proreal time for IB.

    PeterSt thanked this post
    #226474 quote
    PeterSt
    Participant
    Master

    And thus it is a bug – and not a small one.

     

    (excellent curve not enabled and curve going down with tick by tick enabled)

    Yes, I know exactly what you mean. Your life would change from the imagination of going super rich, to going plain broke. 🙁

    But this also means that the Tick column remains zero, while you (by now) know it can contain 100+ tick errors. Am I right ? I mean, it would contain many errors with that “excellent” curve.

    V12 is unusable from all angles already. So now this.
    Thanks a lot for you effort and posting !

Viewing 15 posts - 16 through 30 (of 49 total)
  • You must be logged in to reply to this topic.

Difference in outcome backtest and automated trading


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
MartinB @martinb Participant
Summary

This topic contains 48 replies,
has 6 voices, and was last updated by MartinB
2 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/11/2024
Status: Active
Attachments: 21 files
Logo Logo
Loading...