Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

downloading/uploading files from web

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

    downloading/uploading files from web

    Hello everybody.
    How can I download/upload files from web using NT7?

    #2
    daglas,

    Can you please clarify what type of files you are looking to upload and download?
    MatthewNinjaTrader Product Management

    Comment


      #3
      any type of files, but I think text files with a small size will be downloaded/uploaded at majority of cases. What solutions for working with web you can recommend to me?

      Comment


        #4
        daglas,

        I'm not aware of a supported method you could use, but it should be possible.

        I'm including our reference sample on Using StreamWriter to write to a text file:



        This should give you information on how to read/write to text files from your hard drive, however I would not be able to give you a full solution for working with files on the web.
        MatthewNinjaTrader Product Management

        Comment


          #5
          I found such code, and it compiles good. I just need to check how good is work
          WebClient myWebClient = new WebClient();

          Uri ftp_path = new Uri("ftp://FTPLOGIN:[email protected]/file.txt"); // file.txt
          myWebClient.UploadFile(ftp_path.ToString(), @"/temp/anyfile.txt"); // anyfile.txt -

          Comment


            #6
            Originally posted by daglas View Post
            I found such code, and it compiles good. I just need to check how good is work
            WebClient myWebClient = new WebClient();

            Uri ftp_path = new Uri("ftp://FTPLOGIN:[email protected]/file.txt"); // file.txt
            myWebClient.UploadFile(ftp_path.ToString(), @"/temp/anyfile.txt"); // anyfile.txt -
            What I'm looking to do is add a step of saving a screenshot to a temp location, then running the above code to send it to a FTP site.

            Is there a way to execute a "save screenshot" from ninjascript?

            Ultimately, I would create a button to "send screenshot to FTP" which would do all of the above.

            Thanks!
            Daniel

            Comment


              #7
              Hello,

              There is not a supported NinjaScript method we could assist with, however I'd recommend taking look at the SendChartEmail function that a user has developed from the following link:

              MatthewNinjaTrader Product Management

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by nissan200sx55, Today, 06:25 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by elirion, Yesterday, 10:03 PM
              5 responses
              13 views
              0 likes
              Last Post elirion
              by elirion
               
              Started by ftsc2022, 10-25-2022, 12:03 PM
              6 responses
              277 views
              0 likes
              Last Post AvaHost
              by AvaHost
               
              Started by RaddiFX, Yesterday, 09:55 PM
              2 responses
              24 views
              0 likes
              Last Post RaddiFX
              by RaddiFX
               
              Started by f.saeidi, Today, 01:12 AM
              1 response
              19 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X