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

.NET Classes

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

    .NET Classes

    Is it intentional on the part of the NT development team, that we cannot use some of the .NET Classes? I would like to use some stuff in System.Windows.Input, but just get an error message.

    #2
    DaveS, I'm not aware of such 'blocks' to limit classes, which exact error message do you get? Have you added proper refefences to the NinjaScript editor for accessing and using those classes?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi bertrand.
      If I add a line - using System.Windows.Input; to the Using Declarations region I get the error "The type or namespace name 'Input' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) Error CS0234

      On typing 'System.', possible choices are offered in a list, one item of which is Windows{}, So choosing that and adding the dot - using System.Windows. the only iem offered in the list is Forms{} but if you look at
      Most of the types in this namespace support the Windows Presentation Foundation (WPF) input system. This includes device abstraction classes for mouse, keyboard, and stylus devices, a common input manager class, support for commanding and custom commands, and various utility classes. However, some of the types are applicable beyond WPF.

      you will see the System.Windows.Input namespace.
      Am I wrong to add this to the using declarations if I want to use classes within it?

      Comment


        #4
        Right click in the Editor and add a reference to the dll first.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Is there any documentation on this, It's new to me. When I do Add References I get a 'Select Assembly' window which invites me to look for Files of Type Assembly in a subfolder called Custom. There are a load of proprietary dll's in there along with some folders and -
          NinjaTrader.Custom.dll and NinjaTrader.Vendor.dll

          Not sure what to do next and don't want to experiment with it.

          Comment


            #6
            You need to add the DLL to the System.Windows.Input one you want. Browse to C:\Windows\Microsoft.NET\Framework\v2.0.50727 and select the correct DLL.

            Edit: In fact, the DLL you are looking for is not available for .NET 2.0 which is what NT6.5 uses. You will not be able to use System.Windows.Input as the MSDN article states it is for .NET 3.5 only.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Oh, right, thats that then.
              Thanks josh

              Comment


                #8
                This does beg another question. Will NT7 use .NET3.5 or .NET4 ?

                Comment


                  #9
                  7 will use .NET 3.5
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    From what I've read Ninja v7.0 supports .NET 3.5. Perhaps you could get on the Beta & target your App for that.
                    Dave
                    PS:
                    Be interesting to see what ships first. Ninja Trader 7.0 or Microsoft .NET 4.0.
                    TIP: if you are coding anything really ambitious in .NET, try loading up the Visual Studio 2008 Development environment & see if you can get your code to work there, You can get the express version for free http://www.microsoft.com/downloads/d...displaylang=en

                    Clearly what you can test is limited, but you can sort out the references, mousemove & other .NET logic bits. And it is a much richer diagnostic environment. You can also load the Ninja DLL's. You just can run it.

                    Comment


                      #11
                      Thanks for your suggestions David. In fact I just wanted to try to get round NT6.5's lack of access to the keyboard in strategies. As you say, NT7 will use .NET 3.5, but that may mean that NT will provide methods that do the job anyway. I can wait for NT7 and I think they are not looking for beta testers at the moment. I am an ancient programer, more at home with languages from the 1970's than C#. I think that fighting C# and trying to handle a load of bugs at the same time might finish me off!

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by rtwave, 04-12-2024, 09:30 AM
                      2 responses
                      20 views
                      0 likes
                      Last Post rtwave
                      by rtwave
                       
                      Started by tsantospinto, 04-12-2024, 07:04 PM
                      5 responses
                      67 views
                      0 likes
                      Last Post tsantospinto  
                      Started by cre8able, Today, 03:20 PM
                      0 responses
                      6 views
                      0 likes
                      Last Post cre8able  
                      Started by Fran888, 02-16-2024, 10:48 AM
                      3 responses
                      49 views
                      0 likes
                      Last Post Sam2515
                      by Sam2515
                       
                      Started by martin70, 03-24-2023, 04:58 AM
                      15 responses
                      115 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Working...
                      X