Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
IB and NT placing multiple entries at the same bar
Collapse
X
-
IB and NT placing multiple entries at the same bar
I am having a problem with a strategy in IB and NT in placing multiple entry orders at the same bar. It says Error=OrderRejected Native error='OCA Group (401)' but I have check the OCO of the 3 entry long orders it's different and I even included the time of the bar and a string which indicates if it's a first, second, third entry. If I submits only 1 long entry, it will be filled but the stop 1 and target 1, stop 2 and target 2, stop 3 and target 3 will be rejected even do each bracket have different OCO.Tags: None
-
Hello luxurious_04, and thank your for your question.
I would like to ask if you can add this trace code to your OnOrderUpdate method :
I would then like to ask if you could send us your log and trace files, and if possible a stripped down code sample from your strategy, so that we can look into what occurred.You can do this by going to the Control Center-> Help-> Mail to Platform Support.Code:[FONT=Courier New]protected override void OnOrderUpdate(IOrder order) { Log("For order " + order + ", the oco id is " + order.oco, LogLevel.Information); // ... your code here }[/FONT]
Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.
Please reference the following ticket number in the body of the email:1543336Jessica P.NinjaTrader Customer Service
-
I will include that in the code of the strategy.Last edited by luxurious_04; 07-14-2016, 09:45 AM.
Comment
-
Hello,
Thank you for the reply.
Unfortunately I was unable to see the Prints requested previously in this log to know what the OCO id's are being set as.
I did note that the error being listed is :
Error=OrderRejected Native error='OCA Group (401)'
A native error is an error reported from the broker, in this case it seems error number 401 is a possibility for what is happening.
I reviewed the API error listing here: http://interactivebrokers.github.io/...html#gsc.tab=0
Error 401 lists as a Length restriction.error, unfortunately that is all of the information I can locate on this error number if this is indeed the correct error I am looking at on the site. At this point if you have not yet contacted IB, I would suggest to do so to question the error listed specifically and why the order was rejected. They may be able to provide further information on the OCO ids used and why the order was rejected.
In the case this is the actual error causing the reject, if this is associated with some sort of length it could be possible the OCO id being used is too long or too short, but without knowing what OCO was used it is hard to say if this is related or not.
I look forward to being of further assistance.
Comment
-
If it`s too long then I will reduce it. I think NT has more than 30 characters too in OCO. I count it and it`s more than 30 characters.
Comment
-
Hello,
Thank you for the reply.
Without further details from the broker on why the orders were specifically rejected or without further information on what the error means this is only a guess that the length may be a factor. Based on the message seen, this may be a possibility.
Again I would suggest to contact the broker to first see if they can provide further details on the specific rejection.
Please let me know if I may be of additional assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 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
545 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