Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error importing txt file

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

    Error importing txt file

    Hello to everybody,

    I tried to import data and I got some errors.

    For this format:
    20140402 000000;1281.445;1281.452;1281.241;1281.344;0.0284

    I get the error: "$XAUUSD: Format error in line 1: Input string was not in a correct format: 201404...."

    For this other format:
    2014.04.02 00:00:00;1281.445;1281.452;1281.241;1281.344;0.028 4

    I get the error: " $XAUUSD: Unexpected number of fields in line '1'. should be 6 or 3"

    The name of the file I am trying to import is:

    "$XAUUSD.Ask"

    If you see its properties it is $XAUUSD.Ask.txt , if I rename the file writing .txt in the properties it changes to $XAUUSD.Ask.txt.txt which does not make sense I think.

    I copied the file format I saw in the help section, from this example:

    $EURUSD.Ask.txt for the Euro/U.S. dollar currency pair ask price data.

    I open ninja trader, I go to Historical Data Manager, Import, Format. I had a csv file that I converted to .txt, I think that must not be a Metastock file, so I choose "Ninjatrader (timestamps...)" but I am not sure if my file is a Ninja trader file, I only know it is a txt file but as there are not any other file formats I think that must be the correct one to import files. Let me know if I have to choose another one.

    I deleted my first row, where I had the explanation of the columns data so now there is only data in my txt file.

    Apparently the format is exactly the same Ninja is asking for, that is why I open this thread.

    THanks for your help!

    #2
    Hi arnoldpredator,

    Thanks for your post.

    May I have a sample of the data you are trying to import?

    Please copy the file, remove all but the first 10 or so lines, then attach the file to your next post.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      Thanks for your answer, of course. Here you are.
      Attached Files

      Comment


        #4
        Hi arnoldpredator,

        The issue is with the volume.

        On each line the volume (the last value) is a decimal. NinjaTrader is not able to read the volume as a decimal and it must be a whole number.

        (It also does not makes sense to have volume as a decimal below 0. If that were the case, there would be fractions of orders). One order equals 1 volume.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi ChelseaB,

          Thanks for your answer, now it works!!

          Now I have been trying to create a chart and I cannot find the historical data.
          Well I will read the help guide, maybe I need to do something specific to load the historical data I imported.


          Thanks, thanks!!!

          Comment


            #6
            Hi arnoldpredator,

            This data was ask data. Was it imported to the ask data?

            Is your chart using ask data or is it using last data?

            If you open the Historical Data Manager -> select the Edit tab -> expand the instrument, do you see the data that you have imported here?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi ChelseaB,

              Yes to all your questions.

              So now it looks like I have the data inside the historical data manager, I wonder how would it be possible to create a graph with that.

              When I try to open a new chart and I look for this instrument I don't get the imported data I think. There is a file with 150 ticks but that is not what I imported.

              Thanks for your time!

              Comment


                #8
                Hi arnoldpredator,

                May I have a screenshot of the historical data as it appears in your Historical Data Manager for this instrument? (Please expand all the way to the individual data minute bars)

                May I also have a screenshot of your chart?

                To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

                For detailed instructions please visit the following link
                http://take-a-screenshot.org/
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hi ChelseaB,

                  Of course, here you have.

                  In the first one I show how it looks in the historical data manager.

                  The next capture shows what I find when I look for XAUUSD after selecting "File", "New", "Chart".

                  Finally I show how the chart looks like. It is empty, and it does not contain any information.

                  Apparently the data I imported is not available to create new charts, but maybe I am wrong and I am not doing something that is easy for an experienced user. I apologize for that. I hope not being asking an obvious question.

                  Thanks!
                  Attached Files

                  Comment


                    #10
                    Hi arnoldpredator,

                    Your chart is not set to Ask data, in the screenshot 'Price based on' is set to Last. Change this to Ask and you should see your data.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Thanks ChelseaB, finally it worked.

                      I had to choose the right options in the "Period" and "Data" sections before opening the chart. After selecting Ask, 1 minute, and End Date 14-02-2014 I saw the chart.

                      Your help has been great, thanks for that and for this great piece of software.

                      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