Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

read data file format and structure

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

    read data file format and structure

    Hello,

    I could add in my scripts to read from computer and from web files in format csv.

    Its OK and does read, calculate and plot with a link like http://www.testxy.com/Downloads/ESdata.csv but it is not working with a link from dropbox like https://www.dropbox.com/s/1234567abc...evels.csv?dl=0

    I assume the problem is the "?dl=0" in the link(?)

    What do I have to add in my script so that a file with this link structure can be read please.

    Or is there another possiblity to get csv file for NinjaTrader from web? What has to be added in the code if the csv file is on a server with password?

    PS: I know the sample stream reader, but from this I can not derive a solution for reading that structure.

    Thank you
    Tony
    Last edited by tonynt; 05-23-2016, 03:05 PM. Reason: typing error

    #2
    Hello Tony,

    Calling a web link from a script is outside of what is supported by NinjaTrader Support. However, this thread will remain open for any community members that would like to assist.

    You can also contact one of our professional NinjaScript Consultants who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like our business development follow up with you with a list of professional NinjaScript Consultants who would be happy to create this script or any others at your request.

    As a tip, search for c# webrequest.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. OK, I will do so.

      Referring the sample stream reader I want to ask if the path has to be exactly with \.....\filename.filetype (eg "MyTestFile.txt") or if the path can have at the end other characters like "MyTxtFile.txt?dl=0"

      Thank you
      Tony
      Last edited by tonynt; 05-24-2016, 01:51 AM. Reason: translation error

      Comment


        #4
        Hi Tony,

        The string used as the path has to be the exact path of the file.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Chelsea,

          thank you for your reply. Yes of course it has to be the exact path of the file.

          My question was - sorry if bad translating - if a path has to have exactly that structure from the sample streamreader or it could be different? Or can a file only be opened and read if last 3 characters are the file type.

          I hope I could explain the question no better.

          Thank you
          Tony

          Comment


            #6
            Hi Tony,

            Adding characters to the string would be adding characters to the path. The path includes the filename. If there are extra characters in the path it is not the exact path to that file.

            Please let me know if this is not making sense.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi Chelsea,

              thank you for your reply. I dont want to bother but still misunderstanding. I know that add ing characters would be adding....

              Last try: my question is "if the path is correct - each character - but looks different from the path in the sample stream reader , if this would be a valid path then? I do not add ore remove characters to the path. Can a path like the one I have posted be a valid path? Or need to be the last characters".txt" or ".csv"?

              Best
              Tony

              Comment


                #8
                Tony,

                The path must match the file name and path exactly.

                Adding extra characters does matter and if the characters are not in the filename or path then it wouldn't be an exact path.

                If the characters are not part of the path to the file, then it won't work.

                I recommend that you try it and find out if it works.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by wzgy0920, 04-20-2024, 06:09 PM
                2 responses
                26 views
                0 likes
                Last Post wzgy0920  
                Started by wzgy0920, 02-22-2024, 01:11 AM
                5 responses
                32 views
                0 likes
                Last Post wzgy0920  
                Started by wzgy0920, Yesterday, 09:53 PM
                2 responses
                49 views
                0 likes
                Last Post wzgy0920  
                Started by Kensonprib, 04-28-2021, 10:11 AM
                5 responses
                192 views
                0 likes
                Last Post Hasadafa  
                Started by GussJ, 03-04-2020, 03:11 PM
                11 responses
                3,234 views
                0 likes
                Last Post xiinteractive  
                Working...
                X