Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Discrepancy between backtest and live chart

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

    Discrepancy between backtest and live chart

    I am using Kinetick for VIX EOD data and use the previous day's closing value in calculations for an indicator which is used in a strategy. When I backtest, I can verify that the values used are the correct ones. However, when I run the strategy in a demo account, the value of the VIX closing price used to plot the indicator on a chart is from TWO days ago. What could be causing this and how can I fix it?
    Last edited by fizikz; 02-21-2013, 11:54 AM.

    #2
    fizikz, what value / bar index do you access in your plots and conditions? NinjaTrader is purely event based, so the bars will update when the opening tick of a new bar is seen.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I use Closes[x][0] in the strategy and indicator. Checking in the historical data manager, I can see that the last day's closing data are available, even during the current trading day. Is it not possible to access it?

      Another point that is perhaps relevant is that this issue is for the VIX data from Kinetick. It seems the same code works fine for other instruments from the demo account's real-time data feed.

      Comment


        #4
        It should be possible to access it. What time are you starting it? Are you sure there has been a bar update event for that day for that instrument? It may trade later than the other instruments you're looking at.
        MatthewNinjaTrader Product Management

        Comment


          #5
          I start the strategy and keep it running 24/7. Initially, the values used by the strategy are correct if I have downloaded historical data.

          However, after the close of the session, say after 4:30pm EST, the new values for the previous session's close are not updated by the indicator on the chart. The strategy does update to the new close values for the other instrument (ES) from a real-time feed, but not for VIX from Kinetick EOD data feed.

          To fix this, I download historical data, restart NT, and reload historical data. Then, the strategy uses the correct data, but the chart again uses the VIX from 2 days ago instead of the last close.

          So, I see two problems, one is about updating values from the Kinetick EOD data feed automatically, and the other with the chart not using the right data for the last close for VIX from Kinetick.

          Comment


            #6
            fizikz,

            'However, after the close of the session, say after 4:30pm EST, the new values for the previous session's close are not updated by the indicator on the chart. The strategy does update to the new close values for the other instrument (ES) from a real-time feed, but not for VIX from Kinetick EOD data feed.'

            But you would see correct values on the next day then, at / after cash market open - when the VIX Kinetick EOD bars had seen their bar update event called > so new bar opend?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Bertrand, no, the value used for VIX does not update at/after the cash market open. It only updates if I manually reload the data, and even then it always lags by an extra day.

              Comment


                #8
                Ok, thanks - would you mind sending me the script you used for testing via Help >> Mail to Support so we could review?
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by jackiegils, Today, 11:05 PM
                0 responses
                3 views
                0 likes
                Last Post jackiegils  
                Started by cre8able, Yesterday, 09:15 PM
                2 responses
                15 views
                0 likes
                Last Post cre8able  
                Started by Trader146, Today, 09:17 PM
                0 responses
                6 views
                0 likes
                Last Post Trader146  
                Started by ttrader23, 05-08-2024, 09:04 AM
                9 responses
                43 views
                0 likes
                Last Post ttrader23  
                Started by ZeroKuhl, Yesterday, 04:31 PM
                8 responses
                46 views
                0 likes
                Last Post ZeroKuhl  
                Working...
                X