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

Data Import as NinjaScript® objects?

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

    Data Import as NinjaScript® objects?

    Hello,
    I've read at NT 7 features that one can "develop their own custom data import routines"? I wasn't able to find any information regarding that. Could you please point me to some?
    I've got access to Reuters Tick Data history, and that's basically what i want to do - import reuters ticks and depth (or 1-minute bars in some cases) to NT 7.

    Also, not to create many topics, I'd like to express interest to:
    - having ready-made import of Reuters data;
    - having millisecond time-stamp in tick data;
    - having ability to import and work (on at least backtesting level) with full depth data, not just top-level.
    That'd definitely extend your users base

    Thank you,
    Appreciate your answer.

    #2
    Hello,

    Thank you for your post and welcome to our forums.

    You can import historical data by going to Tools--> Historical Data Manager--> Import tab.

    More information on importing data can be found from the following help guide link:



    Thank you for your feedback regarding the Reuters data and data down to the milliseconds, as well as the ability to test against additional market depth. I will forward these comments to development consider as a possible future enhancement.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hi Matthew,

      Thanks for prompt reply. Appreciate link you pointed. Maybe I wasn't exactly clear or misunderstood info I found here (http://www.ninjatrader.com/ninjatrader7-features), like:
      "Import routines are now implemented as NinjaScript® objects thus, developers can develop their own custom data import routines."

      So the question is how I can develop *custom* data import routines, not the base ones which is in GUI. I thought that sentence meant that you can control it from the code somehow? You see, to import even candles data from Reuters (or whatever another provider) you need to do some manual preparations. And it's not quite handy That's why I thought if there would be any way to automate it by writing custom Ninja code, that'd be nice Is it possible by any means or I misunderstood?

      Thank you.

      Comment


        #4
        Hello,

        Please see the following link in which our product manager answers similar questions regarding these features:



        Please let me know if you have any questions.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Thanks, Matthew. It's almost clear now that both me and topic-starter of that another thread misunderstood that statement about developing custom import routines.

          OK, I'm trying to import some 1-minute candles data from Reuters, which I manually prepared for NT7 format. But it gives me this error:
          "10/25/2011 17:58:43 Default Unable to import file 'E:\...\JNIC1.Last.txt'. Instrument is not supported by repository."

          The format of file is as pointed in documentation. This is example line from my file:
          20110104 000100;10350;10360;10340;10350;6086

          I created an instrument in Instrument Manager before I tried to import data. One thing I'm not sure about is filename. Should it also include .Last. for 1-minute data? There's nothing about it in help section, just for ticks and depth data.

          What can be an issue? Thanks.

          Comment


            #6
            Hello,

            You will want to match the instrument name and expiry in NinjaTrader to this text file.

            Can you please clarify what the Master Instrument name you created in the database? What is the expiry? I assume C1 refers to the nearest front month, however I'm not quite sure exactly what month this contract is trading.

            For example if it is trading JNI 12-11, you would want to call the file JNI 12-11.Last.txt
            MatthewNinjaTrader Product Management

            Comment


              #7
              Ah, I see, that's probably the issue - can one import continuous futures data instead? That's what I'm trying to do right now.

              Comment


                #8
                Yes, you can by using ##-## as the expiry. You will see this listed in the Instrument manager under the list of expires at the bottom.

                Then you can call the file JNI ##-##.Last.txt and it should import.

                Please let me know if that does the trick.
                MatthewNinjaTrader Product Management

                Comment


                  #9
                  Hi again, Matthew,

                  Thanks a lot, I was able to import data manually as continuous contract with ##-## suffix.

                  Meanwhile, I was able to find some references regarding question I had before in this thread (programming of custom import routines). On this and some other forums people mentioned editing this file:
                  User\Documents\NinjaTrader 7\bin\Custom\Type\@TextImportType.cs

                  I started experimenting with that, but none of changes I made in this file are seen when I run NT7.
                  If you could clarify that would be highly appreciated. Also, if you could point me to any info (or at least any references for framework/API) about custom development for NT7 which goes beyond writing strategies/indicators in ninjaScript editor - that would be very nice too.

                  Thank you.
                  Last edited by danilam; 10-25-2011, 09:21 PM.

                  Comment


                    #10
                    Hello,

                    You will need to compile after making any changes to these Custom Type files.

                    Please compile from the NinjaScript indicator for any indicator or strategy.

                    We do not have any documentation on anything beyond indicator and strategies, however there is a wealth of information available on these forums.
                    MatthewNinjaTrader Product Management

                    Comment


                      #11
                      Thanks, Matthew, compilation of any strategy inside NT indeed helped.

                      If you are aware of any most popular topics on this forum regarding custom development in C# for NT7, I would HIGHLY appreciate you pointing me to those. I tried to use search in first place surely, but it didn't work pretty good for me.

                      Thank you very much. You already helped me a lot!

                      Comment


                        #12
                        sierra charts

                        attached my code to import sierra charts minute and tick data.

                        Please feel free to experiment.


                        Andreas

                        I have written also a helper for premiumdata.net data, but it is more complicated and therefore cannot be distributed here.
                        Attached Files

                        Comment


                          #13
                          Thank you very much, zweistein!
                          I'll have a thorough look at your code. Hope, will be able to replicate.
                          Can I ask you some questions, in case they'll be, via PM?

                          Comment


                            #14
                            Reuters Historical Data Import Routine

                            Thank you zweistein and NinjaTrader_Matthew.

                            I had a thorough look at code and was able to get import for Reuters done. For now, it works for candles, but for ticks there should be just few minor edits at max.

                            I attach c# code. If anybody have a questions - within my limits, I'll be glad to answer them.

                            ReutersImport.cs

                            Comment


                              #15
                              danilam,

                              Awesome! Glad to hear you were able to get this to work and thanks for sharing
                              MatthewNinjaTrader Product Management

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by JGriff5646, Today, 10:02 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post JGriff5646  
                              Started by AdamDJ8, Today, 09:18 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post AdamDJ8
                              by AdamDJ8
                               
                              Started by knowmad, Today, 03:52 AM
                              2 responses
                              29 views
                              0 likes
                              Last Post knowmad
                              by knowmad
                               
                              Started by ETFVoyageur, Today, 07:05 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post ETFVoyageur  
                              Started by Orion815, 05-02-2024, 08:39 AM
                              2 responses
                              18 views
                              0 likes
                              Last Post Orion815  
                              Working...
                              X