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 sjsj2732, Today, 04:31 AM
            0 responses
            20 views
            0 likes
            Last Post sjsj2732  
            Started by NullPointStrategies, 03-13-2026, 05:17 AM
            0 responses
            280 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            279 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            130 views
            1 like
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            90 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Working...
            X