Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Import Historical Data from Code

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

    Import Historical Data from Code

    Hi,

    Is there any way to import historical data specified by an instrument symbol map (rather than its name) programatically from within a NinjaScript?

    #2
    Hello Zeos6,

    Thanks for the post.

    There is not a supported way to access the symbol mappings for instruments. For historical data to be readable in NinjaTrader, it must be imported from the user interface because importing converts a comma-separated .txt file to a special format, so that would not be possible through NinjaScript.

    Please let me know if I may assist further.

    Comment


      #3
      Thanks for the reply ChrisL.

      Just one more item. Since the Bars object represents the data in the historical repository, is there a programming way we can see what data is actually in the repository, and can we assign the Bars object to different data in the repository?

      Comment


        #4
        Hello Zeos6,

        Thanks for the follow-up.

        The only way to load additional data would be to use AddDataSeries()



        The data you need must be determined at compile time since the parameters of AddDataSeries must be hardcoded and not reliant on other properties.

        Some pure .NET framework would need to be used to access the ..\Documents\NinjaTrader 8\db directory and do computations on the data. Keep in mind one would need to decipher the hex form of historical data that is stored in .ncd files.

        Please let me know if I can help further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        79 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        45 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        64 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X