Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Grafici KAGI (Real-Time / Backtest)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Grafici KAGI (Real-Time / Backtest)

    Hello,
    I kept it in real time on graphics KAGI (15 sec . reversal 2 -ticks ) some of the strategies with futures for about a week . I took notes of each individual trades in real time ( entry- exit- avg price etc. .. ) . Next, I did the test back to make a comparison . There are a few trades that do not match , including real - time and backtesting . Others are shown in real time , but not in the backtest . Some do not correspond with the time . how can I do to solve this problem ?
    thanks
    Roberto

    #2
    Hi Roberto, generall speaking discrepancies between realtime and historical backtest would be expected, the most common reasons were collected here for review - http://www.ninjatrader.com/support/h...ime_vs_bac.htm

    This effect would be expected stronger even on the more exotic bars types like Pnf and Kagi - http://www.ninjatrader.com/support/h.../bar_types.htm

    To backtest those more accurately we normally suggest either running in Market Replay or submitting for example orders to an added 1 tick series in backtesting, so a higher fidelity fill can be worked with.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,
      observing the behavior of the code on Kagi charts I noticed that one of the big problems was the Setstoploss that could give the differences between real-time and backtest. I have eliminated this problem by putting a normal output in Loss to market when you see the new toolbar. However, there are trades that occur for example in real-time and does not occur in the backtest. This I can not understand!
      Hello.
      Roberto.

      Comment


        #4
        Roberto, are you running your scripts with CalculateOnBarClose = false?

        Even with true for the exotic types having a base period to historically build the bar until you hit realtime data, slightly different bars formations would be expected unless the base period would be 1 tick. This is one of the limitations known working with those types, hence Market Replay testing for systems would be more accurate here.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hi Bertrand.
          Yes I put "false".
          However, doing the test with "true" does not change the result.
          Thank you.
          Ciao.
          Roberto

          Comment


            #6
            That could very well be the case Roberto, CalculateOnBarClose settings are one factor contributing generally to discrepancies you would see comparing realtime to backtest runs. For your specific exotic bars type issue, I would expect it for any setup that is not run on the base period of 1 tick as you otherwise not have enough granularity in the historicla chart setup to simulate the bars formation. For that reason best is doing the testing in speeded up replay for example.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Unsuitable, Today, 08:41 AM
            0 responses
            1 view
            0 likes
            Last Post Unsuitable  
            Started by newdill, Today, 07:54 AM
            0 responses
            3 views
            0 likes
            Last Post newdill
            by newdill
             
            Started by qwertyjjj, Today, 06:52 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by NeverDownMoney, 09-25-2020, 09:40 PM
            1 response
            13 views
            0 likes
            Last Post NT-Roland  
            Started by wjadevries, Today, 04:21 AM
            1 response
            12 views
            0 likes
            Last Post wjadevries  
            Working...
            X