• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

adding references

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

    adding references

    in a VS C# project I can add a reference to say a com object and then add

    Code:
    using myCOMObject
    to my code. can I do this in NT8?

    #2
    Hello,

    You are able to do most things you would in C# normally in NinjaTrader. The best way to answer this question would be to just test it.

    Unfortunately I do not have a com item to test to provide an answer on this topic, if you have a item you have been testing in VS, I would suggest using the syntax from that project and try it in NinjaTrader.

    In the case you can not get it working please let me know what errors you are running into or other issues and we can try to look further into it.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      getting "type or namespace could not be found. see attached reference in VS C# project.
      Attached Files

      Comment


        #4
        Hello,

        If the error is in VS I would not be certain of the cause, the error is simply saying that some type in some reference can not be found. This may come from using syntax without a using statement or fully qualified name for that syntax.

        I would not be certain how to get the item you have pictured to work in Visual studio, it appears this is an assembly for TradeStation, do they have any documentation surrounding the assembly you are trying to use?

        If you are able to get the item to work in visual studio after finding what references it requires, you may be able to duplicate the same steps in NinjaTrader or mainly referencing the correct files to allow for compilation.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          the error is in NT8 when I add "using GSDLib"

          Unless I'm missing something I don't think NT will be able to use all objects without adding a reference (as shown in attached VS C# project) that is also "Using GSDLib"?

          Comment


            #6
            Hello,

            You are correct, NinjaTrader would need a reference to use the external code as would visual studio. Visual studio has an additional Com library section where NinjaTrader does not to link com libraries registered with windows.

            If you are able to utilize the library as a standard reference in a .net project it should be able to be loaded in NinjaTrader depending on the code used. If the assembly can not be added as a reference specifically using the References menu, there would be no way for the compiler to know about the item in that context. The only time external code could be used without a reference would be in the case you are using PInvoke methods to call on an external assembly, outside of that any .net assembly code will need a reference.


            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by spikeruk, Today, 01:49 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by Yandychang, Today, 02:16 PM
            5 responses
            16 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by priceisking, Today, 01:16 PM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by kashyapjdave, 03-23-2017, 12:12 AM
            11 responses
            1,956 views
            0 likes
            Last Post forextrader2003  
            Started by Gav_G, 07-26-2018, 04:29 PM
            5 responses
            422 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Working...
            X