• 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

Accessing market replay data

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

    Accessing market replay data

    I need to gather some statistics from market replay data. The only way I see is to make a strategy and run it with market replay and caclulate statistics on each tick. But it is extremely slow and inappropriate for me.

    I wonder, if some possibility to read market data with add-on. Is there any API for that? Or maybe you can provide me the market replay file format. In short, any way to get access to market replay data.....

    #2
    Hello,

    Thank you for the post.

    The Replay data specifically can only be Played back, there are no other options to reiterate over that type of data otherwise.

    You can iterate over Historical data in a loop but this is not the same as playing back the recorded replay data as it is only historical data. Also for placing trades or other strategy specific calculations, the strategy would physically need to run for that to occur.

    In the case you need to gather statistic information from a strategies trades in Playback, the only option to speed this process up would be to use the faster speeds of playback and allow the strategy to trade.



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Bad news.
      Maybe I can read market data file directly?

      Comment


        #4
        Hello,

        The format of the reply data would not be something I could detail, this is an internal format that development has created. This data is processed specifically by NinjaTrader and would not be in a format that is able to be read outside of the platform.

        Unfortunately, the only way to playback Replay data would be to use the Playback connection.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Maybe I can export somehow market replay data to any understandable format (for ex. CSV) ? Does NT have ability to export data?

          Comment


            #6
            Hello,

            Yes, there is the ability to export Historical data using the Historical data manager but this would not be the same data as Replay data.

            You can transfer replay data from one pc to another but it would require NinjaTrader to read it.

            The only way I could see you being able to export the replay data specifically would be if you made a script that collects this data while you are playing in replay and stores it in a format you can use.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              I still insist on my idea with getting market data. And I achieved some results. As it seems there are simple ways to get market data:

              Code:
              var aInst = Instrument.GetInstrument("EURUSD");
              
              MarketReplay.DumpMarketData(aInst, new DateTime(2017, 6, 19), new DateTime(2017, 6, 20),@"C:\Temp\MR\test1.csv");
              MarketReplay.DumpMarketDepth(aInst, new DateTime(2017, 6, 19), new DateTime(2017, 6, 20),@"C:\Temp\MR\test2.csv");
              This code dumps (successfully!) all the market replay data to CSV-file
              I want to simplify the process and omit parsing CSV file, so I tried this method:
              Code:
                                  var aInst = Instrument.GetInstrument("EURUSD");
                                  var aMr = new MarketReplay(aInst, new DateTime(2017, 6, 19));
                                  aMr.Start();
                                  while (aMr.MoveNext())
                                  {
              
                                  }
              Since there is no any documentation about MarketData class I made this code, driven by my own logic. But it does not work. I see that MarketReplay instance initialized successfully, but MoveNext does not produce any valid data.

              I very much ask you to contact the developers and send me their response. I see that the task of obtaining market data can be easily solved (although it is not documented), just need a little help

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by uiwislth, Yesterday, 11:25 PM
              0 responses
              4 views
              0 likes
              Last Post uiwislth  
              Started by Steve L, Yesterday, 10:04 PM
              0 responses
              3 views
              0 likes
              Last Post Steve L
              by Steve L
               
              Started by marianfed, Yesterday, 09:47 PM
              0 responses
              5 views
              0 likes
              Last Post marianfed  
              Started by hir04068, Yesterday, 09:29 PM
              0 responses
              4 views
              0 likes
              Last Post hir04068  
              Started by iq200, 03-11-2018, 07:49 PM
              24 responses
              1,022 views
              0 likes
              Last Post mrlucky1x  
              Working...
              X