Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Where can I learn to code a new drawing tool?

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

    Where can I learn to code a new drawing tool?

    My title says it all. I want to create a custom drawing tool and was wondering where I can learn how to do it?
    Thanks

    #2
    Hello dniezby,

    Drawing tools are fairly complex so there are not any tutorials that I could recommend, you can view the code for the existing tools to get an idea of what would be required. Drawing tools make use of a lot of advanced concepts in NinjaScript that need to be covered before trying to work with a tool. For example drawing tools exclusively use OnRender so knowledge of using OnRender would be a base requirement. Drawing tools use mouse events to control their state and anchor placement so some knowledge of using mouse events in WPF applications would be required for that. Beyond that the drawing objects are a NinjaScript type so the overall structure of the file should be familiar, they are similar to indicators or strategy except they do not use an OnBarUpdate event for calculation, that is all done in either the mouse events when anchors are set or in OnRender for simple tasks.

    I would suggest looking at the Line drawing objects script that is one of the most simple however many different line type objects are contained in that file. You would need to look at the Line class in that file which starts with the code: public class Line : DrawingTool

    Comment


      #3
      Thanks for the quick response...However, I didn't realize that's it's just an extension of C# so I'm writing the script now. I will have two new drawing tools by the end of the day.

      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