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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
363 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
234 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
205 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
290 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
246 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment