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 funk10101, Today, 12:02 AM
    0 responses
    3 views
    0 likes
    Last Post funk10101  
    Started by gravdigaz6, Yesterday, 11:40 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by MarianApalaghiei, Yesterday, 10:49 PM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by XXtrader, Yesterday, 11:30 PM
    0 responses
    4 views
    0 likes
    Last Post XXtrader  
    Started by love2code2trade, 04-17-2024, 01:45 PM
    4 responses
    28 views
    0 likes
    Last Post love2code2trade  
    Working...
    X