Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 :
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.JesseNinjaTrader Customer Service
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.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Yasharandom, Today, 07:45 AM
|
0 responses
4 views
0 likes
|
Last Post
by Yasharandom
Today, 07:45 AM
|
||
Started by llanqui, Yesterday, 09:59 AM
|
4 responses
24 views
0 likes
|
Last Post
by llanqui
Today, 07:22 AM
|
||
Started by smartromain, 03-13-2024, 01:42 AM
|
5 responses
95 views
0 likes
|
Last Post
by AndreiBig
Today, 06:08 AM
|
||
Started by Noerclou, Today, 04:55 AM
|
0 responses
5 views
0 likes
|
Last Post
by Noerclou
Today, 04:55 AM
|
||
Started by ThoriSten, Today, 03:56 AM
|
0 responses
6 views
0 likes
|
Last Post
by ThoriSten
Today, 03:56 AM
|
Comment