![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
|
I have already submitted an email from NT using the send facility to attach the logs and traces.
Here is the zip file: TracesAndLogs.zip This is probably linked to the difficulties I had re-enabling the strategies last night. I am running strategies on several forex pairs and at the moment I am running them side-by-side in my IB live and IB simulation accounts. On one strategy NT registered an overfill and immediately submitted a market order which it seems was completely unrequired. I had to reverse the order. Fortunately this was on the simulation account. The strategy on the live account did not suffer and overfill. It made the same execution on a stop order. What I don't understand is whether the second order - the market order - was the problem or an attempt by NT to correct the overfill. I had to buy back to correct the situation and now the Positions tab for the DU account shows rubbish values - it has really got totally out of sync with the actual positions. |
|
|
|
|
|
#2 |
|
Member
Join Date: Jan 2009
Location: Erlangen
Posts: 49
Thanks: 0
Thanked 0 times in 0 posts
|
Hi adamus,
had the same issue (see http://www.ninjatrader.com/support/f...ad.php?t=33870). The team NT examines just the problem... Hope this helps. |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
|
It's done it again.
Here are the traces & logs: TracesAndLogs.zip It occurred in both the live account and the simulation account and lost me $50 before I could close the overfill. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
|
I'm just checking up on the strategy to work out whether it did something wrong.
I can't see anything wrong. The market order is called "Close" so it's not from the strategy, it's generated by NT. Why did it do that? There was only one order near the market - the other part of the bracket was miles away. Here's the logging I did: Code:
2010-09-28 12:25:00 ThreeDucks002 $EURGBP LS tf:5Min Q:100000 BarUpdate Short O[0.84965] H[0.85060] L[0.84960] C[0.85060] 2010-09-28 12:25:00 ThreeDucks002 $EURGBP LS tf:5Min Q:100000 BarUpdate OOs: BuyToCover 100000@0.85090 STP (Accepted), BuyToCover 100000@0.82280 LMT (Working) **NT** An over fill was detected on order 'Order='512731311/DU58298' Name='Exit1Stop' State=Filled Instrument='$EURGBP' Action=BuyToCover Limit price=0 Stop price=0.8509 Quantity=0.1M Strategy='ThreeDucks002' Type=Stop Tif=Gtc Oco='-ee5e7d033c7a43338f4214934d22eebb' Filled=100000 Fill price=0.851 Token='101c81a8668e4359af48578a7ceb987e' Gtd='01/12/2099 00:00:00'' generated by strategy 'ThreeDucks002/ee5e7d033c7a43338f4214934d22eebb' : This strategy will be disabled and NinjaTrader will attempt to cancel/close any strategy generated orders and positions. Please check your account orders and positions and take any appropriate action. **NT** An over fill was detected on order 'Order='812667891/U618350' Name='Exit1Stop' State=Filled Instrument='$EURGBP' Action=BuyToCover Limit price=0 Stop price=0.8509 Quantity=0.1M Strategy='ThreeDucks002' Type=Stop Tif=Gtc Oco='-18a6574af0c0426ab658783be27c04c6' Filled=100000 Fill price=0.85098 Token='ce5614a76e604012a998f8d4db2138f4' Gtd='01/12/2099 00:00:00'' generated by strategy 'ThreeDucks002/18a6574af0c0426ab658783be27c04c6' : This strategy will be disabled and NinjaTrader will attempt to cancel/close any strategy generated orders and positions. Please check your account orders and positions and take any appropriate action. 2010-09-28 12:25:00 ThreeDucks002 $EURGBP LS tf:5Min Q:100000 Execution BuyToCover 100000@0.85090 STP (Filled) 2010-09-28 12:25:00 ThreeDucks002 $EURGBP LS tf:5Min Q:100000 OrderUpdate Flat BuyToCover 0@0.82280 LMT (Cancelled) 2010-09-28 12:25:00 ThreeDucks002 $EURGBP LS tf:5Min Q:100000 Execution BuyToCover 100000 MKT (Filled) **NT** Disabling NinjaScript strategy 'ThreeDucks002/18a6574af0c0426ab658783be27c04c6' **NT** Disabling NinjaScript strategy 'ThreeDucks002/ee5e7d033c7a43338f4214934d22eebb' What can I do from here? Thanks |
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
Hello,
This can be seen here: 2010-09-28 12:25:00 ThreeDucks002 $EURGBP LS tf:5Min Q:100000 Execution BuyToCover 100000@0.85090 STP (Filled) 2010-09-28 12:25:00 ThreeDucks002 $EURGBP LS tf:5Min Q:100000 OrderUpdate Flat BuyToCover 0@0.82280 LMT (Cancelled) 2010-09-28 12:25:00 ThreeDucks002 $EURGBP LS tf:5Min Q:100000 Execution BuyToCover 100000 MKT (Filled) Looks like in the same microsecond a stop order was filled when a MKT order was submitted and both where filled at the same time. you sent your traces into Bert and Bertrand responded to you that he was going to test this and get back to you. I will leave this open for bertrand to look into as it looks like you even got an overfill on the overfill protection. How many stop orders are you submitting to the market at one time with the strategy? Does this only occur with one strategy? Or do you have multiple strategies this is occuring on? I look forward to assisting you further.
Brett
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
|
Initially I thought it was my strategy code but I have the strategy running on a live account and a simulation account at the same time, for 11 forex pairs.
So far both overfills have been on EURGBP. The first overfill was only on the simulation account and the live account functioned as planned, i.e. it exited its position on the stop and the OCO limit was cancelled. In the simulation account, this extra market order was submitted. The second overfill happened simultaneously on both the live and the simulation account. I shall check the code to see where and why I would submit market orders. It may be a reversal technique. |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
|
Argh! Why couldn't it just be a simple mistake in my script? That would have been too easy.
Unfortunately I don't use market orders in this strategy. It was another one I was thinking about which has position reversals. Nor do I label any of my orders "Close". The order labels are all "EntryXxxxx" or "ExitXxxxx" where xxxx = something useful. So I'm afraid I can't see how any of the orders my strategy placed could have morphed into those market orders. |
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
adamus, when IgnoreOverFill is not set to 'true' going unmanaged, the strategy would terminate itself if an overfill is detected, as part of this process it would attempt to close it's open position, hence you see the 'Close' market order being issued.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#9 | |
|
Senior Member
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
|
Quote:
Going forward what I see as the crucial discussion point here is whether that overfill was caused by my bad script or it was generated by NT7. I would love to find the error in my script because I could fix it. But it seems that it's you guys who have to fix something. The way I see it, there were two orders in the market, an OCO bracket, one stop and one limit. The stop got hit and executed, the limit got cancelled. So what caused the overfill? I answered Brett's questions above. For my part, I'm going to put more log statements in my order submit clause.I'd be interested to know if you can make any progress analyzing the situation too. What bugs me is that the market order reverses my position. If it were really my strategy causing an overfill through poor order management, and the market order was meant to 'fix' the overfill, where is the actual overfill that it's trying to reverse? It's not the stop order execution - that's the normal end of the trade. |
|
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
Thanks for clarifying Adam, will recheck your logs submitted for this case - ultimately it would boil down to run a reproducible scenario to closely investigate. The strategy termination behavior would just be attempting to flatten it's strategy position, it would not try 'fixing' the overfill per se (default behavior in managed mode and with enabled RealTimeErrorHandling is the strategy termination).
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
|
I took my eye off the ball on this issue over the last week but just this morning I have had two overfills, fortunately both on the IB simulated trading account, shortly after I re-enabled the strategies there.
I have sent in my logs. TracesAndLogs.zip I still don't have a clear idea of what you are trying to tell me about the last overfill situation, i.e. I don't know why it placed a market order which I had to take action to sort out. This time I think both overfill situations are different. On GBPUSD, there was one order at 11:53 and EDIT: Sorry I'm talking rubbish here: ""in the Orders tab it was for 150000 but in the execution tab it was 300000. I will attach images. "" It's the position that's double. This is all too far gone for me to work out what was going on. Unfortunately I just closed NT to try to get it to sort out its idea of what forex positions I've got, because it is way out of whack at the moment. But by closing it I lost my output window logging so I now can't tell what the sequence of order was that the strategy thought it was doing. For EURJPY, I don't see anything wrong - apart from the presence of the error.
Last edited by adamus; 10-04-2010 at 06:04 AM.
|
|
|
|
|
|
#12 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
Adam, I just responded to your note sent to support - we'll need to review the logs closely and get back to you, it looks to me as if you're dealing with a sync issue here.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#13 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
|
Bertrand, another log to review
http://www.ninjatrader-support2.com/...cesAndLogs.zip What happened this time - AUDUSD just closed out a trade. I can't see any sign of an overfill. I am beginning to suspect that the overfill detection is based on NT's idea of the position, which could be bad news as it looks like the position is the first thing that NT loses track of when things start to go wrong. |
|
|
|
|
|
#14 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
Thanks Adam - the overfill condition is not position tied, it would occur if you send a cancel request, but the order comes back either partfilled / filled, thus you got an unexpected fill for it and hence it was overfilled comparing to the expected outcomes.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#15 |
|
Senior Member
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
|
Do you mean that overfills are a random but constant threat?
Is there no error handling that I could do? Or is that something that can only be done in unmanaged mode? |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Order Overfill | gg80108 | Strategy Development | 3 | 06-18-2010 10:38 AM |
| Please add Bid size, Ask size, Last size to Market Analyzer | Profitmake | Version 7 Beta General Questions & Bug Reports | 3 | 05-26-2010 09:21 AM |
| Order by Account Size triggers confusion | tooearly | Automated Trading | 2 | 06-22-2009 08:12 AM |
| change of signal name triggers new order | junkone | Strategy Development | 9 | 06-02-2009 07:38 AM |
| Recalculating position size based on account size, % risked and stop loss | clivehunt | Strategy Development | 18 | 03-22-2009 11:25 AM |