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

Exported Custom Drawing tool as Compiled Assembly wont show up

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

    Exported Custom Drawing tool as Compiled Assembly wont show up

    Hello,

    I made a custom Drawing tool and after I exported it as a compiled assembly to proceed to distribute it ,I noticed on different PCs where I tested it after imported, the Custom Drawing tool is nowhere ( no in the Drawing tools), and no error messages

    When I am using it on my PC, it works just fine from MyCustomDrawingTool.cs

    I followed the steps at Exporting NinjaScript as Assembly https://ninjatrader.com/support/help...assemblies.htm
    and Imported it won't show the Custom Drawing anywhere

    Can someone give me a hand with this issue?

    ### update, but still same issue ###

    also, I read found Exporting custom drawing tools as assembly / DLL https://ninjatrader.com/support/help...assemblies.htm

    and I created a new non partial static class for MyCustomDrawingTool with no help

    Regards,
    Ale
    Last edited by alejandro888; 09-14-2021, 07:10 AM.

    #2
    Hello alejandro888,

    Thank you for the post.

    If you have a way to see this problem or reproduce it then I would suggest to make a new empty drawing tool which just has a custom name/id set so that you can see it in the menu. Then test that in the same use case to see if it still has the problem. If you find that the empty script works that would indicate that some code you had used is contributing to the problem. If so we could look at the code and use case to see what may be happening.

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

    Comment


      #3
      Hi Jesse,

      is there anything way to send it privately? because I was about to distribute my tool, and it has IP

      Regards,
      Ale

      Comment


        #4
        Hello alejandro888,

        Thank you for the reply.

        Our support cannot debug scripts for you but we can try to help provide direction toward your own debugging. If the script contains IP that would likely not be a good sample to provide to our support for testing. I would suggest to try making a new empty drawing tool first to check if that also has a problem. If that does not have a problem the next step would be to duplicate your existing tool and start commenting out the custom code you added until you find the point which it is able to be seen after importing it. finding the code responsible would allow you to form a simple sample surrounding that portion of code instead of your IP.

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

        Comment


          #5
          Hi Jesse,


          I followed your suggestion creating a new empty drawing tool, then I was adding the functionalities and exploring it to a different PC, I noticed when added the custom Icon to the Drawing tool(you gave a hand with this in the past), Then my drawing tool won't appear anymore after being imported as a compiled assembly

          So how should I have to include custom images, icons in the code, to be exported as a DLL and it not stop working?

          Regards,
          Ale

          Comment


            #6
            Hello alejandro888,

            Using a Path for the icon rather than an image is generally the best approach so that nothing additional needs to be included. The alternative when using an image would be to move the image to the Templates folder so that it can be extracted when importing. Extra files can be extracted to the templates folder.

            https://ninjatrader.com/support/help...lyzerTemplates

            You would need to manually include the image in the zip in a folder named templates and then after importing reference the path to the templates folder instead of the path you had it originally.

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

            Comment


              #7
              Hi Jesse,

              Then when using an Imagen, should I keep it using the same path for it? or should I need to include a new path for the template folder, something like: templates/MyResources/image.jpg?

              Comment


                #8
                Hello alejandro888,

                You would need to use the new folder path to the templates folder. On your local development machine you could place it in the templates folder and modify the path in code so that when you export it the path is correct.

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

                Comment


                  #9
                  Hello Jesse,

                  What path can I use for the template folder in my dev machine? And is there any generic way similar to
                  Uri(NinjaTrader.Core.Globals.InstallDir) for root instalation folder, but for templates folder

                  Regards,
                  ale

                  Comment


                    #10
                    Hello alejandro888,

                    You can use the property NinjaTrader.Core.Globals.UserDataDir to get the user documents directory. You would need to build the remainder of the string to have the templates folder but that property will always point to the users data folder.


                    I look forward to being of further assistance

                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      Hi Jesse,

                      Thanks again for your help and time, I fixed my issue

                      Cheers,
                      Ale

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Ousher, Yesterday, 11:12 PM
                      1 response
                      8 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by You4Life, Yesterday, 08:20 PM
                      1 response
                      5 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by focus333, Yesterday, 05:56 PM
                      3 responses
                      15 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by itsthefriz, Yesterday, 04:19 PM
                      1 response
                      6 views
                      0 likes
                      Last Post NinjaTrader_ShawnB  
                      Started by johnMoss, Yesterday, 04:06 PM
                      0 responses
                      8 views
                      0 likes
                      Last Post johnMoss  
                      Working...
                      X