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 trilliantrader, Today, 03:01 PM
    0 responses
    2 views
    0 likes
    Last Post trilliantrader  
    Started by pechtri, 06-22-2023, 02:31 AM
    9 responses
    122 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by frankthearm, 04-18-2024, 09:08 AM
    16 responses
    67 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by habeebft, Today, 01:18 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by benmarkal, Today, 12:52 PM
    2 responses
    19 views
    0 likes
    Last Post benmarkal  
    Working...
    X