Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Turn Strategy off after trade is closed
Collapse
X
-
Hello Uregon,
With the strategy builder there is not a way to physically disable the strategy but you could use a variable to prevent the logic from working once an entry has been submitted. In manual coding there is a method called CloseStrategy which lets you terminate the strategy.
To disable the logic using a variable that would be as simple as doing the following:
In the inputs and variables page create a new bool variable with a default value of false
In your entry condition set make a new condition:
Left: User variables -> your variable name
Center: equals
Right: Misc -> false
In the same set as an action add Misc -> Set your variable name and set it to true by checking the box.
This means the entry condition can happen only once and then once the position is closed it won't do anything else however it will still be enabled.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
87 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
132 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
65 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
118 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment