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 elirion, Today, 01:36 AM
              0 responses
              3 views
              0 likes
              Last Post elirion
              by elirion
               
              Started by gentlebenthebear, Today, 01:30 AM
              0 responses
              4 views
              0 likes
              Last Post gentlebenthebear  
              Started by samish18, Yesterday, 08:31 AM
              2 responses
              9 views
              0 likes
              Last Post elirion
              by elirion
               
              Started by Mestor, 03-10-2023, 01:50 AM
              16 responses
              391 views
              0 likes
              Last Post z.franck  
              Started by rtwave, 04-12-2024, 09:30 AM
              4 responses
              34 views
              0 likes
              Last Post rtwave
              by rtwave
               
              Working...
              X