Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Emulate "Close" button action in NT8 strategy script
Collapse
X
-
Emulate "Close" button action in NT8 strategy script
I have a working strategy which makes entry/exit criteria and works fine for my taste however adding any kind of a stop-loss to the strategy, tends to stop me out more frequently that I would like. I have found the "attach to indicator" in NT8 quite useful however this places an order outside the strategy (and hence needs monitoring). I am wondering if there is a way I can emulate the "Close" button action from Chart Trader in an NT8 script, which essentially closes any open positions and cancels open orders - would like to call this from the exit conditions of my strategy.Tags: None
-
Hi Chelsea - calling CloseStrategy does not cancel any open/pending orders I added through "Attach to indicator" (e.g. stop market)Originally posted by NinjaTrader_ChelseaB View PostHello WattMan,
Yes, call CloseStrategy() to close the strategy.
https://ninjatrader.com/support/help...sestrategy.htm
Comment
-
Hello WattMan,
CloseStrategy will close any orders that were submitted by the strategy and then will disable the strategy.
It will not close any manually submitted orders.
If you want to close all orders, manual and strategy, you can use Account.Flatten().
Chelsea B.NinjaTrader Customer Service
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
52 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
70 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment