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

Replay market data

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

    Replay market data

    Hello,

    I have a few issues with the replay "mode". First of all, strategy receiving replayed data has the Historical flag set to true. Is it supposed to be this way?
    Secondly, GetAccountValue(AccountItem.CashValue) always returns 0. Theoretically, it should return the cash size of the simulation account used.

    Please clarify.

    Thank you.

    #2
    Hello gena72,

    The tick by tick playback of market replay should be Historical = false and account items should return a value. However, there are still historical bars available in market replay mode.

    Are you getting this tick by tick playback? You would see charts updating, or prices changing if instrument is selected in orders tab of control center.

    What is the source of market replay files you're using? Downloaded from NinjaTrader servers or recorded from your own real time stream?

    Are you on the latest release 8? Check with Help > About.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I've downloaded the replay data from NT server, however, historical data is also present in the database. I wonder which data is being used by the playback engine. In theory it shouldn't use any historical data at all, even if its available.
      When I use replay the charts and prices are updated, as they should. However the strategy receives only the "historical bars", and in fact the strategy receives bars with timestamps preceding the beginning of the replay data downloaded.

      I'm using NT 7.0.1000.8

      Comment


        #4
        The script can use both historical and (simulated) real time data. Processing available historical bars prior to the replay playback date is what it should do and is not an issue. But if prices are updating and you're not seeing these updates as Historical = false or not seeing updates at all, we would want to look into.

        We have not seen this on our tests here. I just downloaded yesterdays ES 03-12 data and both account items and Historical = false property are working fine. See attached screenshot for details of this test. You can see it transition fine from historical > real time.

        On what day and instrument do you see your results?
        Attached Files
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Well, indeed, this seems to work. I just don't see why it would load historical data at all. I have to skip the historical bars.
          The remaining issue is that in simulation mode whatever is drawn with Draw...() calls is not shown on the performance charts (both historical & real-time).

          Comment


            #6
            Great, glad it's working for you. It's still beneficial to have historical data even in replay mode. You can skip historical processing in your script with if (Historical) return;

            Unfortunately performance charts will not include draw statements. These will show up in a standard chart or strategy analyzer chart only.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              That's an unfortunate limitation. I tried to run the strategy by running it from a chart, and Draw statements seem to work. Is there a way to attach already running strategy to a chart, or the strategy always has to be started from a chart in order for Draw statements to work?

              Comment


                #8
                In order to see draw objects for your strategy, you would need to run the strategy directly from a chart.
                Ryan M.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by ghoul, Today, 06:02 PM
                0 responses
                7 views
                0 likes
                Last Post ghoul
                by ghoul
                 
                Started by Barry Milan, Yesterday, 10:35 PM
                6 responses
                18 views
                0 likes
                Last Post Barry Milan  
                Started by DanielSanMartin, Yesterday, 02:37 PM
                2 responses
                13 views
                0 likes
                Last Post DanielSanMartin  
                Started by DJ888, 04-16-2024, 06:09 PM
                4 responses
                13 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by terofs, Today, 04:18 PM
                0 responses
                12 views
                0 likes
                Last Post terofs
                by terofs
                 
                Working...
                X