Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Converting ntm-nt2 file extension

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

    Converting ntm-nt2 file extension

    Hi all,

    I'm considering using the market replay data in SAS to do some backtest but I need to convert the market replay data (file extension .ntm and .nt2) into a more handy format like .txt or .csv. Does anyone have any idea if this is possible?

    Thanks in advance,

    #2
    Hello,


    Thank you for your note.


    Unfortunately there is no supported way to do this.


    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      After downloading the L1 and L2 data for a day, you can use the OnMarketData and OnMarketDepth override methods in an indicator. Use System.IO to save the results to an output file. The event arguments of OnMarketData and OnMarketDepth allow you to access bid, ask, last, dom position, price, volume, and time. Then connect to the Market Replay data connection, load the indicator on a chart and run it. This is not the most efficient conversion method, but it works. If you implement a queueing system for the events before writing them to your file, then you can run the Market Replay at 500x speed. It can go pretty quick.

      Comment


        #4
        I thought the OnMarketData and OnMarketDepth methods are not called on historical data? On a lark I tried OnMarketData and got no results. Is there some undocumented way to make it work?

        Rich

        Comment


          #5
          Market replay data going forward in playback is not historical ..



          Originally posted by richsaenz01 View Post
          I thought the OnMarketData and OnMarketDepth methods are not called on historical data? On a lark I tried OnMarketData and got no results. Is there some undocumented way to make it work?

          Rich

          Comment


            #6
            Yes Sledge is right. Do a search on how to download Market Replay and use that as your connection. Historical data is just what charts display going back in time on any connection. While the value "Historical" is false in your ninjascript, OnMarketDepth and OnMarketData are never activated. However Market Replay, allows you to run live as if you were actually trading during that day. When running this way, if you have downloaded both L1 and L2 market data, then the OnMarketDepth and OnMarketData events are activated just as they would have back at the real date and time that you are now Replaying.

            Comment


              #7
              Thanks for the explanation. I am familiar with downloading l1 and l2 data and using the Market Replay connection but was never able to get onmarketdata to work for me (though the normal onbarupdate works). I'm obviously doing something wrong. For instance, I downloaded the ES 12-12 data for 10/25/2012 and when I play it back in a 5min or chart, I cannot get even a simple print of "hello world" in the output window using the OnMarketData method. I started with a generic indicator produced by the wizard and just added the overriding OnMarketData method. Any suggestions would be appreciated (like a working onmarketdata sample somewhere in the NinjaTrader Reference Samples forum).

              Thanks,
              Rich

              Comment


                #8
                Originally posted by richsaenz01 View Post
                Thanks for the explanation. I am familiar with downloading l1 and l2 data and using the Market Replay connection but was never able to get onmarketdata to work for me (though the normal onbarupdate works). I'm obviously doing something wrong. For instance, I downloaded the ES 12-12 data for 10/25/2012 and when I play it back in a 5min or chart, I cannot get even a simple print of "hello world" in the output window using the OnMarketData method. I started with a generic indicator produced by the wizard and just added the overriding OnMarketData method. Any suggestions would be appreciated (like a working onmarketdata sample somewhere in the NinjaTrader Reference Samples forum).

                Thanks,
                Rich
                Is this your issue? http://www.ninjatrader.com/support/f...y+onmarketdata

                http://www.ninjatrader.com/support/f...y+onmarketdata
                Last edited by sledge; 10-29-2012, 04:48 PM. Reason: another thread

                Comment


                  #9
                  Sledge,

                  That was my sticking point. I fast forwarded the replay about 20 bars and the OnMarket methods sprung to life. Thanks to you and Jroonk for your help.

                  Rich

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by DayneSwift, Yesterday, 11:06 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post DayneSwift  
                  Started by AidanLawrence, Yesterday, 10:03 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post AidanLawrence  
                  Started by butt_toast, Yesterday, 09:47 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post butt_toast  
                  Started by GaryOz, Yesterday, 06:54 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post GaryOz
                  by GaryOz
                   
                  Started by 2inthebush, Yesterday, 06:27 PM
                  0 responses
                  22 views
                  0 likes
                  Last Post 2inthebush  
                  Working...
                  X