Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Error Message Question
Collapse
X
-
edgeliner,
An overfill is categorized as when an order returns a "Filled" or "PartFilled" state after the order was already marked for cancellation. The cancel request could have been induced by an explicit CancelOrder() call, from more implicit cancellations like those that occur when another order sharing the same OCO ID is filled, or from things like order expirations.
In my experience, this message can occur for example when you call an ExitLong() and EnterShort() at the same time, or some set of conditions occur at the same time (or close to the same time) so that both are called by your strategy.
Please let me know if I may assist further.Adam P.NinjaTrader Customer Service
-
Adam......
You are on the right track....I have this particular system exiting long when a certain condition exits and entering short when another condition exists...... they could sometimes happen at the same time. If I separate the system into 2 separate systems and run it on 2 separate charts, would that solve the problem???
Comment
-
edgeliner,
Yes that would most likely solve the overfill issue but it may also cause account syncing issues if you are running the two strategies on the same account.
You could try using a flag here.
Then reset your flag to be true whenever its a new bar or something.Code:if ( ConditionSet1 && Flag ) { EnterLong(); Flag = false; } if( ConditionSet2 && Flag) { ExitShort(); Flag = false; }
Something like that may help if COBC = true. In the false case you may want to monitor orders and if the order isn't filled then reset the flag to "true" as well.
Please let me know if I may assist further.Adam P.NinjaTrader Customer Service
Comment
-
edgeliner,
CancelOrder() works something like this : http://www.ninjatrader.com/support/h...ancelorder.htm
I am still reviewing your other thread so thank you for your patience.Adam P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
77 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
45 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
27 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
63 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment