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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
619 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
420 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
293 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
414 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
367 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment