• 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

packing for commercial distribution with custom assembly

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

    packing for commercial distribution with custom assembly

    hi - I created an indicator that uses an external assembly of mine.
    While developing the indicator, I added reference to the assembly and compiled and all is working well.

    I am now packing and following the instructions in the help section "Adding custom assemblies or Native Dll's"

    Now when I import, I get an error. I checked the trace and I can see that there is a message that NT can't find a namespace. This namespace is defined in the custom assembly.

    Any ideas?

    #2
    Hello,

    This could be the way you are calling the custom assembly from the indicator.

    Instead of using a using statement, you can try calling each method or other by its fullname or:

    namespace.object

    If this does not work, you can try to manually import the assembly and do a compile to see all of the errors generated which would give a much better idea of what is happening.

    If the first option does not correct this please send an email to platform support @ ninjatrader.com in reference to ticket 1314873 and I can help you manually install and read the errors listed to determine what happened.

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

    Comment


      #3
      Originally posted by onnb1 View Post
      hi - I created an indicator that uses an external assembly of mine.
      While developing the indicator, I added reference to the assembly and compiled and all is working well.

      I am now packing and following the instructions in the help section "Adding custom assemblies or Native Dll's"

      Now when I import, I get an error. I checked the trace and I can see that there is a message that NT can't find a namespace. This namespace is defined in the custom assembly.

      Any ideas?
      ref: http://www.ninjatrader.com/support/f...33&postcount=1

      You may want to read the entire thread, or at the very least the post to which I was responding.

      Comment


        #4
        hi - thanks for responding and the link koganam - I read through it.

        In my indicator I am using the fully qualified name (I don't have a using statement for my namespace). So all my references look like namespace.object in my NT indicator code.

        When you create an archive like this, the auto generated "Factory" code goes in the cs file - lets call it "wizard.cs" for now. When I import the archive and look in the trace, I can see that the error is coming from wizrad.cs. I do indeed have one input parameter (property) in there that uses an enum from my custom namespaces. That said, in wizard.cs the param is also fully qualified as namespace.object.

        From your description you are referring to the case where one has a using statement in the indicator file, yes?
        Last edited by onnb1; 05-11-2015, 12:54 PM.

        Comment


          #5
          Instead of using a using statement, you can try calling each method or other by its fullname or:


          namespace.object

          If this does not work, you can try to manually import the assembly and do a compile to see all of the errors generated which would give a much better idea of what is happening.
          hi, see my reply to koganam regarding the naming which is indeed namespace.object.

          Regarding your second suggestion to import manually - do you mean

          1. open any script in the editor
          2. add a reference to my custom assembly
          3. compile

          yes?

          Comment


            #6
            Originally posted by onnb1 View Post
            hi - thanks for responding and the link koganam - I read through it.

            In my indicator I am using the fully qualified name (I don't have a using statement for my namespace). So all my references look like namespace.object in my NT indicator code.

            When you create an archive like this, the auto generated "Factory" code goes in the cs file - lets call it "wizard.cs" for now. When I import the archive and look in the trace, I can see that the error is coming from wizrad.cs. I do indeed have one input parameter (property) in there that uses an enum from my custom namespaces. That said, in wizard.cs the param is also fully qualified as namespace.object.

            From your description you are referring to the case where one has a using statement in the indicator file, yes?
            My response in the referenced thread does apply to when the namespace is referenced by a "using" statement.

            However, what you are describing may mean that your reference is not using the FQPN, but just the tail end of it. If you want to use a FQPN, determine its totality, and use the totality.
            Last edited by koganam; 07-07-2016, 07:37 PM. Reason: Corrected spelling.

            Comment


              #7
              Originally posted by koganam View Post
              My response in the referenced thread does apply to when the namespace id referenced by a "using" statement.

              However, what you are describing may mean that your reference is not using the FQPN, but just the tail end of it. If you want to use a FQPN, determine its totality, and use the totality.

              Not sure what you mean by FQPN

              For what its worth maybe this would help: my custom assembly has a top level namespace "Foo" and I have a public enum named Bar first level inside Foo.

              something like this:
              Code:
              namespace Foo
              {
                   public enum Bar
                   {
                       Top,
                       Bottom
                   }
              }
              So in the indicator file I have Foo.Bar as a property type. NT is saying on import that it doesn't recognize Foo.

              Comment


                #8
                Originally posted by onnb1 View Post
                Not sure what you mean by FQPN

                For what its worth maybe this would help: my custom assembly has a top level namespace "Foo" and I have a public enum named Bar first level inside Foo.

                something like this:
                Code:
                namespace Foo
                {
                     public enum Bar
                     {
                         Top,
                         Bottom
                     }
                }
                So in the indicator file I have Foo.Bar as a property type. NT is saying on import that it doesn't recognize Foo.
                Show the skeleton of your Property declaration, if you please?

                Comment


                  #9
                  Originally posted by koganam View Post
                  Show the skeleton of your Property declaration, if you please?

                  Code:
                  [GridCategory("Parameters")]
                  public  Foo.Bar Location
                  {
                      get { return location; }
                      set { location = value; }
                  }

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by jeliner, 02-05-2019, 09:01 AM
                  6 responses
                  336 views
                  0 likes
                  Last Post NinjaTrader_PatrickG  
                  Started by pmallya.nt, Today, 12:55 PM
                  0 responses
                  14 views
                  0 likes
                  Last Post pmallya.nt  
                  Started by itrader46, Today, 12:39 PM
                  2 responses
                  6 views
                  0 likes
                  Last Post itrader46  
                  Started by rtwave, Today, 12:46 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post rtwave
                  by rtwave
                   
                  Started by Zeos6, Today, 11:45 AM
                  2 responses
                  7 views
                  0 likes
                  Last Post Zeos6
                  by Zeos6
                   
                  Working...
                  X