Is there a way to save user defined ninjiscript variables to file, so on restarting the program, the variables are reloaded?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Saving Variables Between NT Sessions
Collapse
X
-
Saving Variables Between NT Sessions
If I shutdown the computer at the end of the trading day and then relaunch the program just prior to the trading day, what system variables are saved to file and reloaded on relaunch? Is there any NT documentation on this? How does this affect an autotrading?
Is there a way to save user defined ninjiscript variables to file, so on restarting the program, the variables are reloaded?Tags: None
-
In NinjaTrader 6.5, not much is saved when you shut down. All strategies settings are lost, so when you start it up again, you need to input all settings again.
NT7 will address this and save strategy information during a shutdown so it is there upon restart.
If you'd like to save variables to a file, please take a look at the samples titled Using StreamWriter to write to a text file and Using StreamReader to read from a text file.AustinNinjaTrader Customer Service
-
Austin, Thanks for the quick reply.
My strategy presents multiple buy and sell signals (triggers), so I want to enter a position on the first such trigger, then ignore any subsequent triggers while waiting for the first trigger to exit the position.
I assumed a need to set up a boolean variable for program flow control for directing which trading opportunity to look for. Do you know of another approach for handling this?
Originally posted by NinjaTrader_Austin View PostIn NinjaTrader 6.5, not much is saved when you shut down. All strategies settings are lost, so when you start it up again, you need to input all settings again.
NT7 will address this and save strategy information during a shutdown so it is there upon restart.
If you'd like to save variables to a file, please take a look at the samples titled Using StreamWriter to write to a text file and Using StreamReader to read from a text file.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
164 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
318 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
246 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
350 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