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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment