Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
change parameters of a strategy while its in motion
Collapse
X
-
Hello,
Thank you for the question.
While the strategy is running the user interface properties you see in the strategies menu would be disabled and would be expected. Unfortunately there is no way from the Properties menu its self to edit these values while the strategy is enabled. Only the strategies code could change the variables from that point on.
I look forward to being of further assistance.
-
Hello,
If you are using a script that has a Public property, lets just say your script has a "Period" property.
Initially you set the Period to 10 from the user interface.
In OnBarUpdate you have a condition:
if(Close[0] > Close[1])
Period = 33;
In this case, when the Close is greater than the Open of the prior bar, the Public property Period was changed to 33, this is the same property from the user interface but changed via script.
If you then re open the strategy menu it would likely reflect the new value but to be absolutely sure you could use a Print(Period) to print the value of the property in OnBarUpdate. This would show the change as it happened.
I look forward to being of further assistance.
Comment
-
Hello,
Yes this is correct and expected, the user interface would be disabled while the strategy is running.
There are no documented ways to do this but other users have used undocumented code to create custom buttons or other interface items to change values in the strategy which added the button as an example.
These types of topics are not one we can assist with through support though because you are essentially just developing in C# at that point and doing modifications to the user interface which can be complicated or cause errors if not done correctly.
The simple answer is no this is not possible, the more detailed and complicated answer would be its certainly possible but would require a fair knowledge of C# winform application design to accomplish this.
I look forward to being of further assistance.
Comment
-
Hello,
For NinjaTrader 7 there are not many items I could provide, there is a lot of information spread throughout the forum on more specific topics.
One item you could look at is the Toolbar shortcut indicator, that creates a toolbar and assigns buttons to that toolbar in a chart. Its a good first step to understanding Controls in C# and how to modify the interface.
I look forward to being of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
566 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
547 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
548 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment