Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                607 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                353 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                560 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                561 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X