Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw definition Error

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

    Draw definition Error

    Hello , i have stuck on a minor issue ( seems ).

    MyDrawingTool have some Draw overloads. Everything works fine.
    MyIndicator utilizes those Draw overload to plot MyDrawingTool in their code. This also works fine.
    On client side Compiled Assembly of MyDrawingToo also works fine.
    But when MyClientIndicator try to access Draw overloads of MyDrawingTool then it throws error "NinjaTrader.NinjaScript.DrawingTools.Draw does not contain definition of MyDrawingTool".

    Draw.MyDrawingTool does not work on client side at all, throwing above error.

    On client side, MyClientIndicator is not complied assembly , it is simple open source indicator.

    What i am missing ?
    Last edited by devdas; 01-09-2017, 11:10 PM.
    Devdas
    NinjaTrader Ecosystem Vendor - Devdas

    #2
    Hello Again,

    I tried yet one more (ugly seems to me) attempt which seems to solve all issue, but i am really not sure if this is the correct way to do this. I would like to know more robust way from NT team. Though this is below what i did,

    Changes in MyDrawingTool
    1) In MyDrawingTool code i moved whole public static partial class Draw snippet from NinjaTrader.NinjaTrader.DrawingTools namespace to inside the MyDrawingTool class.

    2) Successfully exported and deployed compiled assembly to my own m/c removing MyDarwingTool source file.

    Changes in MyIndicator:
    1) Changed the line
    mdt = Draw.MyDrawingTool(.........);
    to
    mdt = MyDrawingTool.Draw.MyDrawingTool(.........);

    Above changes seems to work on my m/c. I think they will work on client side with MyClientIndicator.

    Suggest other approach if it not advisable.
    Devdas
    NinjaTrader Ecosystem Vendor - Devdas

    Comment


      #3
      Hello,

      Thank you for the post.

      I would not be certain without seeing the source code and testing first, but generally for Exported items using the fully qualified name as you have shown "MyDrawingTool.Draw.MyDrawingTool" is suggested. I am unsure with the other changes on the outcome that had with the script without further testing it.

      I could suggest for your own benefit to create a testing user folder so you can test this from the "client" end. This basically involves renaming the current NinjaTrader user folder, and re installing the platform to generate a second user folder. After this is done you can easily swap between a developer install and a testing install by renaming the folders. If you would like more clear steps to do this please let me know and I can provide them.


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

      Comment


        #4
        Hello Jesse,

        thanx for looking in this. I have no doubt in client side working, so basically coming to main problem. For exact reference i have selected your same code and also similar ( yet different ) resembling situation from your thread-post



        You see static partial Draw class is in NinjaTrader.NinjaScript.DrawingTools namespace and all inbuilt NT drawing tools have similar Draw for their drawing overloads. You have also called Draw.MyCustomDrawingTool overload from DrawingToolChainTest indicator which is what i am doing in my case also. Upto this point everything works fine.

        Problem occur when say if i export compile assembly of MyCustomDrawingTool and deploy to client side and then running DrawingToolChainTest indicator on client side. Draw.MyCustomDrawingTool throw error msg NinjaTrader.NinjaScript.DrawingTools.Draw does not contain definition for MyCustomDrawingTool.
        Attached Files
        Last edited by devdas; 01-10-2017, 01:39 PM.
        Devdas
        NinjaTrader Ecosystem Vendor - Devdas

        Comment


          #5
          Hello Jesse,

          any test in progress ?
          Devdas
          NinjaTrader Ecosystem Vendor - Devdas

          Comment


            #6
            Hello,

            Thank you for the reply.

            After further testing I am uncertain of a correct approach on this subject, I will need to further test this on my end and confirm with development on the suggested way to correctly do this. Once I have further information I will reply back here.

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

            Comment


              #7
              Ok jesse,

              I will be waiting for that.
              Devdas
              NinjaTrader Ecosystem Vendor - Devdas

              Comment


                #8
                Hello Jesse

                Any progress in this ?
                Devdas
                NinjaTrader Ecosystem Vendor - Devdas

                Comment


                  #9
                  yup

                  No solution ?
                  Devdas
                  NinjaTrader Ecosystem Vendor - Devdas

                  Comment


                    #10
                    Hello,

                    Thank you for the reply.

                    At this time I have not recieved any feedback on suggested solutions for this. When I do I will reply back with that information.

                    For the time being, you may be able to create a Partial class of your own that is formed in the same way as the existing Draw class. You could create a new partial class with a new name such as DrawCustom. Because partial classes cannot be shared between assemblies this would likely be the only solution currently. Also because I do not know the extent of the complexity of your draw objects, this would be something you would need to test on your end to confirm if it works correctly in all situations.

                    You can locate the existing Draw partial class examples in the existing tools near the bottom.

                    When I have further information I will reply back to this thread.

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

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by algospoke, Yesterday, 06:40 PM
                    2 responses
                    19 views
                    0 likes
                    Last Post algospoke  
                    Started by ghoul, Today, 06:02 PM
                    3 responses
                    14 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by jeronymite, 04-12-2024, 04:26 PM
                    3 responses
                    44 views
                    0 likes
                    Last Post jeronymite  
                    Started by Barry Milan, Yesterday, 10:35 PM
                    7 responses
                    20 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by AttiM, 02-14-2024, 05:20 PM
                    10 responses
                    180 views
                    0 likes
                    Last Post jeronymite  
                    Working...
                    X