Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            553 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            100 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            543 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            546 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X