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
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by GLFX005, Today, 03:23 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by nandhumca, Yesterday, 03:41 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by The_Sec, Yesterday, 03:37 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by vecnopus, Today, 06:15 AM
    0 responses
    1 view
    0 likes
    Last Post vecnopus  
    Working...
    X