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

Comment