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 Christopher_R, Today, 12:29 AM
    0 responses
    10 views
    0 likes
    Last Post Christopher_R  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    166 responses
    2,235 views
    0 likes
    Last Post sidlercom80  
    Started by thread, Yesterday, 11:58 PM
    0 responses
    3 views
    0 likes
    Last Post thread
    by thread
     
    Started by jclose, Yesterday, 09:37 PM
    0 responses
    8 views
    0 likes
    Last Post jclose
    by jclose
     
    Started by WeyldFalcon, 08-07-2020, 06:13 AM
    10 responses
    1,415 views
    0 likes
    Last Post Traderontheroad  
    Working...
    X