Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can 1 minute bars for the "PRN" ETF be imported w/o using "PRN.txt" file name?

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

    How can 1 minute bars for the "PRN" ETF be imported w/o using "PRN.txt" file name?

    Hello,

    How can the 1 minute bars for the "PRN" ETF be imported w/o using "PRN.txt" file name?

    Windows does not allow users to name a file "PRN.txt", since "PRN" is a reserved word (try to name a file "PRN.txt" in any folder on a Windows computer to see what I mean).

    Since the NinjaTrader 1 minute bar import process requires files to have the same name as the symbol in NinjaTrader, I am not sure how to get PRN data into NinjaTrader.

    Thanks in advance,

    ChiTrader2000

    #2
    Hello ChiTrader2000,

    Thank you for your post.

    When saving the file you will want to name it PRN in a text format which will automatically add the .txt to the end of the file name.

    Please let me know if I may be of further assistance.
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      NinjaTrader_ChristopherJ,

      Thank you for the quick response.

      The problem with the solution in your response is that Windows XP won't let you name a file "PRN" (i.e., with no extension), "PRN.txt", "PRN.csv", or any other file with any extension.

      Does anyone have a fix for my dilemma?

      I can't import 1 minute bars for the PRN ETF without naming a file with a file name like "PRN" or "PRN.*", but Windows XP doesn't allow this (It's weird, I know... try it to for yourselves.).

      Thanks in advance,

      ChiTrader2000

      Comment


        #4
        Hi ChiTrader2000,

        there is soucre code for the TextImport Filter in NT7.

        It is the file @TextImportType.cs

        In my view the best would be to modifiy the lines around

        string instrumentName = fileInfo.Name.Replace("." + Data.MarketDataType.Last + ".", ".");

        in the code.

        Change your name to _ _PRN.TXT and then strip the leading "_ _" before above code. Your convention would then be that "_ _" is used to make Windows reserved names readable.

        Good luck
        andreas

        P.s. Do this in a seperate file as Dierk says in the next post.
        Last edited by zweistein; 03-24-2010, 05:15 AM. Reason: more info

        Comment


          #5
          Originally posted by zweistein View Post
          Hi ChiTrader2000,

          there is soucre code for the TextImport Filter in NT7.

          It is the file @TextImportType.cs

          In my view the best would be to modifiy the lines around

          string instrumentName = fileInfo.Name.Replace("." + Data.MarketDataType.Last + ".", ".");

          in the code.

          Change your name to _ _PRN.TXT and then strip the leading "_ _" before above code. Your convention would then be that "_ _" is used to make Windows reserved names readable.

          Good luck
          andreas
          Actually if you wanted to go down the road of having your own custom imported then you should NOT touch the file deployed by NT, but implement your custom importer in a separate file.

          Reasons:
          - the installer "should" overwrite all files deployed by NT -> your changes would be lost on next update
          - I have seen cases where the installer did not overwrite a NT standard file for unknown reason which was modified by a user (although it should). This even causes more grief, as bug fixes would not make it to the user -> support might mare + user frustration

          Comment


            #6
            zweistein and NinjaTrader_Dierk,

            Thank you very much for the information on doing a custom import of a symbol from a file with a different name.

            I tried importing PRN____.txt into NT with the code changes described in zweistein's post, and I can tell that this would have worked perfectly, except that I ran into a new hitch... NT7 crashed when I tried to import the data with the custom importer, because NT makes a folder name like "PRN" for a symbol "PRN", but evidently Windows doesn't even allow folders to be named like "PRN".

            In the end, I just renamed the data file to import PRN_NT.txt, and made a new symbol in NT named "PRN_NT", but with symbol mappings of "PRN", and the data imported fine.

            Thanks again to both of you for outlining this powerful way of importing data. It is just another example of NinjaTrader's extreme extensibility by C# programmers. NT is priced for the retail trader yet integrates into the enterprise like an extremely high end piece of financial software!

            ChiTrader2000

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            619 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            359 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
            561 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            566 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X