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 CarlTrading, Yesterday, 11:51 AM
|
0 responses
12 views
0 likes
|
Last Post
by CarlTrading
Yesterday, 11:51 AM
|
||
|
Started by CarlTrading, Yesterday, 11:48 AM
|
0 responses
18 views
0 likes
|
Last Post
by CarlTrading
Yesterday, 11:48 AM
|
||
|
Started by CaptainJack, 03-25-2026, 09:53 PM
|
0 responses
13 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:53 PM
|
||
|
Started by CaptainJack, 03-25-2026, 09:51 PM
|
0 responses
12 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:51 PM
|
||
|
Started by Mindset, 03-23-2026, 11:13 AM
|
0 responses
18 views
0 likes
|
Last Post
by Mindset
03-23-2026, 11:13 AM
|

Comment