Backtest vs. real trading

Forums ProRealTime English forum ProOrder support Backtest vs. real trading

Viewing 15 posts - 1 through 15 (of 19 total)
  • #177607

    Hello all,

    Here is a comparison of a backtest and the actual performance (DAX TF 1h)

    Greetings
    Suffi

    #177613

    I spent a few minutes tryng to get my head around what I am looking at / what the point is that you are making, but gave up as  the two sets of charts / info are different formats?

    Do I need more coffee? 🙂

    #177614

    Hello GraHal,
    Here’s an explanation.
    I have written a code that should work on Dax 1h.
    Backtests over 10 years have shown that it is profitable.
    I have the code since 01.07.2021 until today running, with the result there 307 trades with a total loss of about 200 € (picture: real).
    Now I have created a backtest today, over the same period, from 01.07.2021 until today. Result. 269 trades, profit around 2,000 € (picture: backtest and backtest2).
    I would like to say, that all that glitters is not gold.

    Greetings
    Suffi

    Translated with http://www.DeepL.com/Translator (free version)

    #177617

    Backtest relies on the past… it can’t forsee the future.

    Moreover, you may have use wrong TP and SL or TRAILING STOP.

    You may also have tight TP and SL and haven’t ticked the tick-by-tick mode to work around the zero-bar issue (when both TP and SL are hit on the same bar, TP is assumed unless tick-by-tick is enabled).

     

    #177618

    Hello Roberto,
    if I do a backtest today, of a system that has been running since 01.07.2021, should it reflect the result of real trading or not?
    At least it should be similar.

    It works with a trailing stop, that is between 10 and 25 points.
    Tick by tick is activated spread = 1.6

    Greets
    Suffi

    #177619

    I agree … a Walk Backward backtest over the same period as a (previous) Live Forward Test  … should be similar, within explainable / acceptable limits, a guess – 5% ish maybe ?

    Is the Trailing Stop you used the inbuilt PRT … Set Stop pTrailing?

    If Yes, there are known issues with above  (beats me why the issues are not sorted or the TS code deleted? ).

     

    #177620

    Yes, it should, actually.

    I think only PRT can work it out. You should press Ctrl+A and open a ticket for assistance.

     

    #177625
    Attached is a non-exhaustive list of the elements that can impact a live trading strategy and create differences with a demo account and/or backtests:
    1. Spread
    2. Slippage
    3. Orders rejections due to one of the above reason, but also because of the allowed distance from current price to put pending orders (known as “minimal distance”)
    4. Different trading hours (ProOrder code launched in a different time zone / custom hours, by the user)
    5. Coding problem: division by zero error, null or negative periods for indicators, ..
    6. Lack of responsiveness of IG demo servers (if IG is the broker), although this has improved considerably since last year.
    7. Make backtests without tick-by-tick option
    8. “set stop trailing” instruction that give IG the total control of your stoploss, can be moved differently between accounts due to points above
    9. Limited risk accounts and their rules
    10. Guaranteed stoploss rules and fees
    11. Starting a strategy at a different time (1 hour or even 1 minute later): depending on the code of the strategy, the results of some calculations could be different.
    12. Margin required on the trading account (no demo or backtest tests are made on this subject)
    13. Overnight and overweekend fees
    14. Automatic adjustement of stop orders checked or not when launching the ProOrder
    15. Minimal distance used in backtests for pending orders, not the same as in real trading, due to broker requirement
    16. Different contract size between backtests and live
    Because backtests are only tested on history *with no connection to live market* , you may encounter differences with real live trading environment subject to spread enlargement, slippage, etc. If your stop hasn’t move, there must be information of an error into your orders rejected list you can consult with CTRL+O.
    In any case, first step is to compare the backtest orders with the real orders, and why they triggered not at the same time/differently.
    #177626

    OK,
    here is the code, have a look on it.

    #177629

    good morning, do not use Ptrailling.
    use coded trailling

    #177636

    hi fifi743,
    please explain why I should use ptrailing and what code would you recommend?

    greetings
    Suffi

    #177637
    #177638
    #177650

    What is the ptrailing value please?

    #177662

    Hi Nicolas,

    in the code it the variable TP is equal to ptrailing value.
    TP changes depending on the time.

    greets
    Suffi

Viewing 15 posts - 1 through 15 (of 19 total)

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