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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
163 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
82 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
125 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
206 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
184 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment