Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Symbol Name NT Conversion

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

    Symbol Name NT Conversion

    Trying to convert an NT7 indicator to NT8 that reads symbol names from Yahoo and print the symbol name (stock, FX, Futures, Index, etc.) on the chart.

    I am not able to find the NT8 equivalent syntax for WebClient in the following code"

    Code:
    				if (symbol == "") lookup = Instrument.FullName;
    				else lookup = symbol;
    			
    				string baseURL = "http://download.finance.yahoo.com/d/quotes.csv?s="+lookup+"&f=n&e=.csv";
    
    				[COLOR="Red"][COLOR="Blue"]using[/COLOR](WebClient client = new WebClient()) [/COLOR]
    				
    					text = client.DownloadString(baseURL);
    					text = text.Replace("\"","");
    Many Thanks.

    #2
    Hello aligator,

    Thank you for your post.

    In the declarations region at the top of the file in the NinjaScript Editor please add the using line for System.Net:
    Code:
    using System.Net;
    Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cre8able, Today, 03:20 PM
    0 responses
    2 views
    0 likes
    Last Post cre8able  
    Started by Fran888, 02-16-2024, 10:48 AM
    3 responses
    45 views
    0 likes
    Last Post Sam2515
    by Sam2515
     
    Started by martin70, 03-24-2023, 04:58 AM
    15 responses
    114 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by The_Sec, Today, 02:29 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by jeronymite, 04-12-2024, 04:26 PM
    2 responses
    31 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X