Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Calling Account.Flatten doesn't specify the OrderEntry type
Collapse
X
-
Calling Account.Flatten doesn't specify the OrderEntry type
In testing the API's for the Account class that create and modify orders, it was discovered that the Account.Flatten function doesn't allow the OrderEntry type to be specified for the orders used to close the position. The orders were flagged with the OrderEntry.Manual type. This seems like a potential problem with the Flatten function since an automated system may be the one calling this function and it would create orders with the wrong parameter.Tags: None
-
Hello ntbone,
The account.Flatten() only takes a list of Instruments which should be flattened, the remainder of the flatten process would be handled internally and the appropriate order types would be used for the method that was called.
Are you seeing a specific error surrounding a broker being used or situation? If so we could look into that in more detail.
I look forward to being of further assistance.
-
If the account.Flatten as part of a automated trading process, the orders to close are marked as OrderEntry.Manual but since the orders would be part of an automated process I believe they need to be flagged as OrderEntry.Automated per the documentation for CME Tag 1028 referenced in the documentation.
Comment
-
Hello ntbone,
Thank you for the reply.
If you are seeing a problem with an order being submitted to a broker in this situation, we can certainly collect the details surrounding that use case and provide that to development for further review. Is there a specific case where you are seeing a rejection or other error based on the result of flatten or is this just an observation at this point?
Please let me know if I may be of further assistance.
Comment
-
This is an observation at this point. I haven't had a chance to try it with a real broker and only with paper trading account. It is a concern for submitting invalid orders. The broker would not necessarily know the difference between an automated trade system submitting the order vs the manual method so they wouldn't know to reject the order. The concern is with using the Flatten function as part of an automated trading system and having the broker/exchange discover that orders were being submitted by such a system incorrectly with this flag set to manual.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
560 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
325 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
547 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment