Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical data import error

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

    Historical data import error

    When I import historical data I encoutner the following error...

    Import type 'NinjaTrader (beginning of bar timestamps)': Error on calling 'OnNextDataPoint' method: System.InvalidOperationException: Operation is not valid due to the current state of the object. at NinjaTrader.NinjaScript.ImportTypes.TextImportType .OnNextDataPoint() at NinjaTrader.NinjaScript.ImportTypes.ImportType.Imp ort(MarketDataType marketDataType, TimeZoneInfo sourceTimeZoneInfo, Boolean generateMinuteBars, Boolean generateDailyBars, IProgress progress)

    How to fix it?

    #2
    Hello GordonHui,

    Thank you for your post.

    Would you be able to post a sample of the first few lines (maybe 5 or so) of the data you are attempting to import? That would help us know whether the file is formatted in a way that's causing an issue.

    Also, what version of NinjaTrader 8 are you running? You can find this under Help > About. The current version is 8.0.22.2. If you are on a different version, please update to the current version using the instructions below and test:
    • First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
    • Click on the link: http://ninjatrader.com/PlatformDirect
    • Enter your license key and press Submit
    • Select 'NinjaTrader 8'
    • Select 'Download'
    • Critical: Before running the installer, ensure NinjaTrader is closed.
    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      The data file is as follow...

      20180227 091500;31772;31773;31723;31753;1192;31743.8
      20180227 091600;31753;31761;31737;31738;672;31747.4
      20180227 091700;31739;31743;31719;31726;498;31731.5
      20180227 091800;31727;31746;31724;31741;514;31737.3
      20180227 091900;31741;31749;31730;31745;360;31741

      The version I'm running is 8.0.22.2 64-bit.

      Comment


        #4
        Hello GordonHui,

        Thank you for your reply.

        Your data is not correctly formatted for import into NinjaTrader. For minute data, the necessary formatting is as follows:
        Minute Bars Format
        Each bar must be on its own line and fields must be separated by semicolon. Only 1 minute bars can be imported.

        The format is:

        yyyyMMdd HHmmss;open price;high price;low price;close price;volume

        Sample data:

        20061023 004400;1377.25;1377.25;1377.25;1377.25;86
        20061023 004500;1377.25;1377.25;1377.25;1377.25;27
        20061023 004600;1377.25;1377.25;1377.25;1377.25;24
        20061023 004700;1377.50;1377.50;1377.25;1377.25;82

        I note the data in your sample has an additional field following what looks to be volume - this would need to be removed prior to the data being imported.

        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Thank you.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          23 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          120 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          63 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          41 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          45 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X