Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Where can I learn to code a new drawing tool?
Collapse
X
-
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
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
557 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment