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 bortz, 11-06-2023, 08:04 AM
    47 responses
    1,606 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    9 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    19 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    6 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    15 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X