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, 10:10 PM.

    #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.

    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

        http://ninjatrader.com/support/forum...61&postcount=4

        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, 12:39 PM.

        Comment


          #5
          Hello Jesse,

          any test in progress ?

          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.

              Comment


                #8
                Hello Jesse

                Any progress in this ?

                Comment


                  #9
                  yup

                  No solution ?

                  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 WaveAtElliot, Today, 05:11 PM
                    0 responses
                    4 views
                    1 like
                    Last Post WaveAtElliot  
                    Started by bosajin, Yesterday, 09:15 AM
                    5 responses
                    35 views
                    0 likes
                    Last Post NinjaTrader_Jim  
                    Started by Dolfan, Today, 12:24 PM
                    4 responses
                    22 views
                    0 likes
                    Last Post NinjaTrader_Jim  
                    Started by WeyldFalcon, Today, 11:09 AM
                    7 responses
                    25 views
                    0 likes
                    Last Post WeyldFalcon  
                    Started by DTSSTS, 08-10-2020, 09:48 AM
                    12 responses
                    67 views
                    0 likes
                    Last Post DTSSTS
                    by DTSSTS
                     
                    Working...
                    X