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

using System.Xml.Linq

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

    using System.Xml.Linq

    What is the trick to use System.XML.Linq? I am getting an error "The type or namespace name 'Linq' does not exist in the namespace 'System.Xml' (are you missing an assembly reference?) CS0234 - click for info 23 18 " Line 23 is the declaration for using it. Thanks.

    #2
    Hello TAJTrades,

    Thank you for your post.

    Please note that this kind of programming is unsupported with NinjaTrader.

    However, you will need to add the reference for the System.Xml.Linq.dll to the script in order to use this library.

    Let me know if I can be of further assistance
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Hello TAJTrades,

      Thank you for your post.

      Please note that this kind of programming is unsupported with NinjaTrader.

      However, you will need to add the reference for the System.Xml.Linq.dll to the script in order to use this library.

      Let me know if I can be of further assistance
      Cal, Fully aware of the"unsupported" thing as 80% of my NT stuff falls in that category. ' add the reference for the System.Xml.Linq.dll' is that Right clicking on a Ninjascript code and at the bottom of the pop up select "References"? Will I need to restart NT for it to catch?
      Last edited by TAJTrades; 02-20-2014, 04:17 PM.

      Comment


        #4
        Correct. You will need to right click in the editor and select References.
        You don't need to restart NinjaTrader as I was able to add the reference in and compile but when you are adding references they are loaded in the Config file and it is nice to restart after you are done with the script so it gets saved in the Config.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Thank you

          Thank you is too short. Threw an error msg lol. So I had to write it again.

          Comment


            #6
            Btw, why do we have to add manually reference for System.XML.Linq and not for example for System.XML (there, it's just enough to just add: "
            Code:
            using System.Xml;
            "
            NT 7 requires .NET framework 3.5 and System.XML.Linq is part of the 3.5 so I would expect to use it without adding extra reference to DLL file manully.

            Comment


              #7
              Hello rasto800,

              I do not have any information on why it was this way in NT7. I do know that you do not need to add a reference for these in NT8.
              Josh G.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by PaulMohn, Today, 12:36 PM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by yertle, Yesterday, 08:38 AM
              8 responses
              36 views
              0 likes
              Last Post ryjoga
              by ryjoga
               
              Started by rdtdale, Today, 01:02 PM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by alifarahani, Today, 09:40 AM
              3 responses
              16 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by RookieTrader, Today, 09:37 AM
              4 responses
              19 views
              0 likes
              Last Post RookieTrader  
              Working...
              X