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.

    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

                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 tsantospinto, 04-12-2024, 07:04 PM
                  6 responses
                  98 views
                  0 likes
                  Last Post tsantospinto  
                  Started by rocketman7, Today, 02:12 AM
                  5 responses
                  25 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by ZenCortexReal, Today, 08:54 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post ZenCortexReal  
                  Started by ZenCortexReal, Today, 08:52 AM
                  0 responses
                  0 views
                  0 likes
                  Last Post ZenCortexReal  
                  Started by trilliantrader, 04-18-2024, 08:16 AM
                  7 responses
                  28 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Working...
                  X