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.
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 elirion, Yesterday, 09:32 PM
|
0 responses
8 views
0 likes
|
Last Post
by elirion
Yesterday, 09:32 PM
|
||
Started by cre8able, Yesterday, 09:15 PM
|
1 response
8 views
0 likes
|
Last Post
by bltdavid
Yesterday, 09:24 PM
|
||
Started by cummish, Yesterday, 08:43 PM
|
0 responses
16 views
0 likes
|
Last Post
by cummish
Yesterday, 08:43 PM
|
||
Started by Option Whisperer, Yesterday, 07:58 PM
|
4 responses
21 views
0 likes
|
Last Post Yesterday, 08:32 PM | ||
Started by ETFVoyageur, 05-07-2024, 07:05 PM
|
13 responses
87 views
0 likes
|
Last Post
by ETFVoyageur
Yesterday, 08:14 PM
|
Comment