Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Script to assure account is flat ?
Collapse
X
-
Script to assure account is flat ?
When writing a script, as a backup to making sure that a trade really has been closed, is there a recommended way to assure that your account really is flat? eg, if one is using a trailing stop that is close to the limit price, both could be filled. So, it would be nice to have a backup in case that happens.Tags: None
-
If you are writing an AddOn, you could use Account.Flatten(), which is documented and supported. There's also the undocumented and therefore unsupported Account.FlattenEverything().
I cannot say if these will also work in a Strategy, but you can always try it.
Thanks.
-
-
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
68 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