• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 ralett, Yesterday, 07:29 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Marco  
            Started by bboyle1234, Yesterday, 10:46 PM
            1 response
            3 views
            0 likes
            Last Post bltdavid  
            Started by swcooke, Yesterday, 04:29 PM
            0 responses
            5 views
            0 likes
            Last Post swcooke
            by swcooke
             
            Started by bboyle1234, Yesterday, 04:27 PM
            0 responses
            2 views
            0 likes
            Last Post bboyle1234  
            Started by swcooke, Yesterday, 03:31 PM
            2 responses
            12 views
            0 likes
            Last Post swcooke
            by swcooke
             
            Working...
            X