Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Release control of draw objects
Collapse
X
-
Release control of draw objects
Is there a way to force and indicator to make its created objects user objects. Just as a simple example... Let's say I have an indicator that I use to draw some trend lines on a chart based on some captured mouse click locations. Currently, if I drop down a timeframe, all the analysis I would do gets wiped. Is there a way to force the indicator to keep them on the chart, or convert those objects to user-objects?Tags: None
-
Hello Antny,
Thank you for your note.
A solution would be to have your indicator write to a file, then upon reloading the chart this file would be ran and the drawing objects could be redrawn.
To do this you would need to use streamwriter,
Then stream reader,
Then you would need to design some logic for which to save to the file, either on each new drawing object or a loop before the time changes or at some regular interval.
Here would be an example of looping through drawing objects.
You could use a custom button to trigger the objects to be saved to the .txt file, here would be an example of creating a button,
Or a timer to trigger the saving of the objects, an example which uses a timer.
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
161 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
309 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
245 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
349 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
179 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment