difference between broker IG and backtest prorealtime

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10056 quote
    Pjotterd
    Participant
    Average

    Hi all,

    I have a question. I have started a trading strategy and this is the code:

    // Conditions to enter long positions
    IF close>open then
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    If close<open then
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP pTRAILING 5

     

    I have started the strategy with broker IG. Now, the strange thing is that there is a big difference between the results of broker IG and backtest prorealtime. Can somebody help me out why there is such a big difference? Attached you will find the results of broker IG and prorealtime.

    Thanks in advance

    Results-prorealtime.jpg Results-prorealtime.jpg Results-broker-ig.jpg Results-broker-ig.jpg
    #10061 quote
    Nicolas
    Keymaster
    Master

    Seems that you don’t test your strategy on the same timeframe? Trades are closed on round hour in the first screenshot and that’s not the case in the second one.

    Are you talking about prorealtime CFD?

    #10064 quote
    Pjotterd
    Participant
    Average

    Yes I’m talking about prorealtime CFD. I have been testing on the same timeframe, that;s just how prorealtime shows backtest closings.

    #10068 quote
    Nicolas
    Keymaster
    Master

    I think you are talking about trading real-time in demo? isn’t it?

    If yes, backtest are more efficient because it only deals with condition once per bar, so it doesn’t know at what time your trailing stop occurred, and that’s of course not the case in real-time where stoploss are well executed at correct prices.

    #10071 quote
    Pjotterd
    Participant
    Average

    Ahhhh, I see, thanks for answering my question, that explains it all.

    Case closed 😉

    #123334 quote
    VN
    Participant
    Average

    Hi Nicolas, just wanted to clarify to your response above are you saying that in backtest the trailing stop would be calculated at end of each bar but auto trading mode it would move in real time as the underlying price moves?

    #123359 quote
    Nicolas
    Keymaster
    Master

    That was indeed the case 4 years ago, before PRT add the tick-by-tick backtest engine. The “0 bar issue” is something we don’t talk anymore since years. Always make your backtests with the tick mode option checked.

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

difference between broker IG and backtest prorealtime


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Pjotterd @pjotterd Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/30/2016
Status: Active
Attachments: 2 files
Logo Logo
Loading...