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

Displaying an image from URL

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

    Displaying an image from URL

    I found this post helpful in understanding how to display an image that is stored locally:
    http://ninjatrader.com/support/forum...ad.php?t=82765

    How can the same be done for an image that is on a web server, i.e. accessed via http?

    Thanks.

    #2
    Hello drmartell,

    Thanks for writing in.

    We do not have any reference samples on doing this, but it is certainly possible within C#.

    I found a StackOverflow article that shows you how to do this using the System.Net namespace. I will link it below:

    Is it possible to download a file from a website in Windows Application form and put it into a certain directory?


    Following that approach, you can create a function to download your file. I would advise to then check if the file exists so you can avoid a situation where you are trying to draw an image that is not downloaded yet.

    Please let me know if I may be of further help.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,769 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    30 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    943 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    10 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by rocketman7, Today, 01:00 AM
    0 responses
    7 views
    0 likes
    Last Post rocketman7  
    Working...
    X