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

Custom Drawing Tool Copy

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

    Custom Drawing Tool Copy

    Hello... Can someone confirm this... It appears it is not as "simple" to copy a drawing tool as it is with an indicator.

    I tried to copy the Fib tool to make some customizations in order to have a 2nd Fib tool that draws with different percentages by default. I am familiar with using Templates for the Fib tool, but that is a bit of a hassle to change since I want to be able to use (2) different use cases for the Fib tool regularly.

    When I create a copy of the Fib tool code I get errors like this...


    "The Namespace "NinjaTrader.NinjaScript.DrawingTools' already contains a definition for 'FibonacciLevels'


    So perhaps this rabbit hole to copy the code is much deeper than copying an indicator...

    Can someone confirm this is NinjaScript 201 and beyond type coding...

    Thanks







    #2
    Hello MattD888,

    It would be necessary to ensure all class names, namespaces, enums, etc are unique.

    Below is a link to a custom line script that was separated from the Lines script included with NinjaTrader to get you started.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      OK I'm going to see what I can do to isolate the FibonacciLevels code and do what's needed above.

      Can you clarify.... does this tool "call out" to more global assets in Ninja Trader libraries that I will run into issues changing names, etc... I feel like I ran into this when I tried in the past.

      (Sorry.... I am very green on coding so my terminology and concepts is likely "off" a bit. I'm hoping the meaning will carry through.

      Comment


        #4
        Hello MattD888,

        I'm not certain to what you are referring to by libraries, but these are drawing tool scripts that Extend the DrawingTool class.

        As a heads up, what you are trying to do would be advanced.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I wanted to do the exact same thing. To have a second Fibonacci drawing tool. Did it work out for you MattD888?

          Comment


            #6
            I did eventually get it to work through some trial and error. I just had to go through and change some name properties... frankenstein style... and see if it worked. Eventually it did. However I get some fatal errors at times... I think mostly when I try and make the drawing global.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by PaulMohn, Today, 03:49 AM
            0 responses
            3 views
            0 likes
            Last Post PaulMohn  
            Started by inanazsocial, Today, 01:15 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by rocketman7, Today, 02:12 AM
            0 responses
            10 views
            0 likes
            Last Post rocketman7  
            Started by dustydbayer, Today, 01:59 AM
            0 responses
            2 views
            0 likes
            Last Post dustydbayer  
            Started by trilliantrader, 04-18-2024, 08:16 AM
            5 responses
            23 views
            0 likes
            Last Post trilliantrader  
            Working...
            X