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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
64 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
93 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
48 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
106 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
63 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment