Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Access a drawing object that is hand drawn, in NinjaScript?
Collapse
X
-
Access a drawing object that is hand drawn, in NinjaScript?
If I were to hand draw a trend line for example in a chart with the line drawing object, is it possible to reference that configured drawing object by Tag in my Ninjascript code and gauge how far away my previous close was to that line?Tags: None
-
Hi Erik, thanks for writing in.
You can use the DrawObjects array to find a draw object on the chart by its Tag, see the link below for an example use case:
https://ninjatrader.com/support/help...rawobjects.htm
Best regards,
-ChrisL
- Likes 1
-
I think you may need to look to the anchor of the object. Draw.Line has signatures that include startTime and endTime properties of the ANCHOR as DateTime objects...you should be able to access these with something like myline.StartAnchor.Time or similar...
I do similar things in OnRender with other drawing objects like up/downarrows...not lines
[Edit: Well... actually what I do is on NinjaScript-created objects... not hand-drawn... hope that does not render my advice incorrect. It's 4 AM where I am... I'll revisit this tomorrow and do a test debug with a hand-drawn Line ... unless NT Support provide an answer beforehand]
Cheers,
T.Last edited by tgn55; 05-21-2021, 12:27 PM.
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
589 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
342 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
555 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment