Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Import of Historical Crypto Data fails if volume is fractional

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

    Import of Historical Crypto Data fails if volume is fractional

    I'm using a freshly installed NT8 v8.0.16.3 64-bit.
    When doing a historical data import on ETHUSD, I get an error if the volume field is fractional.

    ETHUSD: Format error in line 11: Input string was not in a correct format.: '20160517 192500;12.5;13;12.5;13;0.79042777'

    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)

    Here are the first 12 lines of the import file: (ETHUSD.Last.txt)
    20160517 191400;12.5;12.5;12.5;12.5;1
    20160517 191500;12.5;12.5;12.5;12.5;0
    20160517 191600;12.5;12.5;12.5;12.5;0
    20160517 191700;12.5;12.5;12.5;12.5;0
    20160517 191800;12.5;12.5;12.5;12.5;0
    20160517 191900;12.5;12.5;12.5;12.5;0
    20160517 192000;12.5;12.5;12.5;12.5;0
    20160517 192100;12.5;12.5;12.5;12.5;0
    20160517 192200;12.5;12.5;12.5;12.5;0
    20160517 192300;12.5;12.5;12.5;12.5;0
    20160517 192400;12.5;12.5;12.5;12.5;0
    20160517 192500;12.5;13;12.5;13;0.79042777
    20160517 192600;13;13;13;13;0

    Note that if I change the volume from 0.79042777 to any integer value, it imports ok until the next non-integer volume in the file.

    Is this a known issue?
    Any workaround besides changing all the volumes to integer?

    Thanks

    #2
    Just in case this helps anyone else:

    The units on volume for cryto is 1E-08 per count. (at least for BTCUSD and ETHUSD I didn't check the rest so they may or may not be different.)
    That means if you have fractional volume in your history data, you need to multiply it by 1E8, then round to int.
    ie a volume of 0.79042777 should be in the input file as 79042777.

    Comment


      #3
      Hello,

      Thank you for your post.

      Glad to assist. Only whole numbers can be used when importing volume data. You can learn more about importing historical data and the necessary formats in the link below:


      Let us know if we may assist further.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      69 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      42 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      24 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      27 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      54 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X