![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: May 2008
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
The strategy I am developing scales in and out of a single instrument.
Sometimes when I am exiting (scaling out) two contracts at a time, and I get a partial fill, then full fill, everything works ok. Then at other times, when that scenario happens my new exit order that I try to fire gets ignored. Of course I do not throw the new exit until after fully exiting, then setting order to null (see my OnExecution logic below). I used TrackOrders and it says it is ignored because an existing exit is still in place. I've studied my log and the log says that I am completely filled on the exit. Why would NT ignore my new exit order? Here is a snipit from my log. Notice the BuyToCover gets submitted fine, then it partial exits 1 contract fine, then it fully exits fine. So NT knows that I am fully exited with no contracts left right? -------------------------------------------------------------- 9/15/2008 12:25:13 AM,Position,Instrument='ES 09-08' Account='Replay101' Avg price=1231.57857142857 Quantity=9 Market position=Short Operation=Update Currency=Unknown, 9/15/2008 12:25:13 AM,Order,Order='c05a7db10c8e43888ccaa386f51691d0/Replay101' Name='Sell short' New State=Cancelled Instrument='ES 09-08' Action=SellShort Limit price=1232.25 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', 9/15/2008 12:25:13 AM,Order,Order='c05a7db10c8e43888ccaa386f51691d0/Replay101' Name='Sell short' New State=PendingCancel Instrument='ES 09-08' Action=SellShort Limit price=1232.25 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', 9/15/2008 12:25:13 AM,Execution,Execution='30f0c1400a9d41fc885d4acb0b 9da482' Instrument='ES 09-08' Account='Replay101' Exchange=Default Price=1231.75 Quantity=1 Market position=Long Operation=Insert Order='8256a8eaa8784de688484bf5511d96ab' Time='9/5/2008 8:49:24 AM', 9/15/2008 12:25:13 AM,Order,Order='8256a8eaa8784de688484bf5511d96ab/Replay101' Name='Buy to cover' New State=Filled Instrument='ES 09-08' Action=BuyToCover Limit price=1231.75 Stop price=0 Quantity=2 Type=Limit Filled=2 Fill price=1231.75 Error=NoError Native error='', 9/15/2008 12:25:13 AM,Order,Order='c05a7db10c8e43888ccaa386f51691d0/Replay101' Name='Sell short' New State=Working Instrument='ES 09-08' Action=SellShort Limit price=1232.25 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', 9/15/2008 12:25:13 AM,Order,Order='c05a7db10c8e43888ccaa386f51691d0/Replay101' Name='Sell short' New State=Accepted Instrument='ES 09-08' Action=SellShort Limit price=1232.25 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', 9/15/2008 12:25:13 AM,Order,Order='c05a7db10c8e43888ccaa386f51691d0/Replay101' Name='Sell short' New State=PendingSubmit Instrument='ES 09-08' Action=SellShort Limit price=1232.25 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', 9/15/2008 12:25:13 AM,Position,Instrument='ES 09-08' Account='Replay101' Avg price=1231.57857142857 Quantity=10 Market position=Short Operation=Update Currency=Unknown, 9/15/2008 12:25:13 AM,Order,Order='af75f3849cd3412fa65107f763768e24/Replay101' Name='Sell short' New State=Cancelled Instrument='ES 09-08' Action=SellShort Limit price=1232.75 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', 9/15/2008 12:25:13 AM,Order,Order='af75f3849cd3412fa65107f763768e24/Replay101' Name='Sell short' New State=PendingCancel Instrument='ES 09-08' Action=SellShort Limit price=1232.75 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', 9/15/2008 12:25:13 AM,Execution,Execution='8f20bb6ee82b451fb94721cf63 133ee7' Instrument='ES 09-08' Account='Replay101' Exchange=Default Price=1231.75 Quantity=1 Market position=Long Operation=Insert Order='8256a8eaa8784de688484bf5511d96ab' Time='9/5/2008 8:49:23 AM', 9/15/2008 12:25:13 AM,Order,Order='8256a8eaa8784de688484bf5511d96ab/Replay101' Name='Buy to cover' New State=PartFilled Instrument='ES 09-08' Action=BuyToCover Limit price=1231.75 Stop price=0 Quantity=2 Type=Limit Filled=1 Fill price=1231.75 Error=NoError Native error='', 9/15/2008 12:25:12 AM,Order,Order='8256a8eaa8784de688484bf5511d96ab/Replay101' Name='Buy to cover' New State=Working Instrument='ES 09-08' Action=BuyToCover Limit price=1231.75 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', 9/15/2008 12:25:12 AM,Order,Order='8256a8eaa8784de688484bf5511d96ab/Replay101' Name='Buy to cover' New State=Accepted Instrument='ES 09-08' Action=BuyToCover Limit price=1231.75 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', 9/15/2008 12:25:12 AM,Order,Order='8256a8eaa8784de688484bf5511d96ab/Replay101' Name='Buy to cover' New State=PendingSubmit Instrument='ES 09-08' Action=BuyToCover Limit price=1231.75 Stop price=0 Quantity=2 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='', --------------------------------------------------------------- Here is my OnExecution logic, which shows that I only reset the order to null if I've had a full fill. ---------------------------------------------------------------------- protected override void OnExecution(IExecution execution) { Instr1FillPrice = execution.Price; Instr1FillQty = execution.Quantity; Instr1AvgPrice = Position.AvgPrice; ResetLimits = 1; if (Instr1BuyOrder1 != null && Instr1BuyOrder1.Token == execution.Order.Token) { LongCount += execution.Quantity; Instr1MP += execution.Quantity; if (Instr1BuyOrder1.Action == Action.BuyToCover && Instr1SellOrder1 != null) CancelOrder(Instr1SellOrder1); if (execution.Order.OrderState == OrderState.Filled) { Instr1BuyOrder1 = null; Print("Instr1BuyOrder1 = null"); } } if (Instr1SellOrder1 != null && Instr1SellOrder1.Token == execution.Order.Token) { ShortCount += execution.Quantity; Instr1MP -= execution.Quantity; if (Instr1SellOrder1.Action == Action.Sell && Instr1BuyOrder1 != null) CancelOrder(Instr1BuyOrder1); if (execution.Order.OrderState == OrderState.Filled) { Instr1SellOrder1 = null; Print("Instr1SellOrder = null"); } } } ---------------------------------------------------------------------- I have tried everything I can think of to resolve this. Everything about NT is great except 1) you can't cancel a limit exit order, then resubmit it and 2) exit orders are ignored alot. I've read all the posts about terminal exits and you guy's logic on why you won't allow it, but that risk is the traders' and he should be able to handle his order flow from his program logic, without being restricted so much by you guys 'for our protection'. Please help! Van vjsworld@gmail.com |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: May 2008
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
Also, my strategy Enters 1 or 2 contracts at a time, and Exits 1 or 2 contracts at a time. This problem never occurs when I am Entering/Exiting 1 lots. It also never happens when I am Entering 1 or 2 contracts. It only happens 'sometimes' when I am exiting 2 contracts and only after a partial fill.
Here is a snipit from my execution log that shows this: ------------------------------------------------------------------------ ES 09-08,Buy,1,1231.75,9/5/2008 8:49:24 AM,30f0c1400a9d41fc885d4acb0b9da482,Exit,9S,8256a8 eaa8784de688484bf5511d96ab,Buy to cover,0.00,1,Replay101,Market Replay Connection, ES 09-08,Buy,1,1231.75,9/5/2008 8:49:23 AM,8f20bb6ee82b451fb94721cf63133ee7,Exit,10S,8256a 8eaa8784de688484bf5511d96ab,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1232.25,9/5/2008 8:49:13 AM,ce6869c851af4c00b65776c1dfa1dbb3,Exit,11S,0de29 acdfe4c47d4b7f42378fef9db3a,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1232.75,9/5/2008 8:49:11 AM,2b6940fe48a1414886278cca7f7ac5b3,Exit,13S,ba3ed 75432824ddca1dfbdbcdbce3b36,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1233.25,9/5/2008 8:48:40 AM,369e048048014de094431b046f462f0d,Entry,15S,1c36 0b88502f4877b1341d6cdcfc5f22,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1232.75,9/5/2008 8:47:52 AM,43726896350c4c8cbbd7022b6ec3f823,Exit,13S,f4214 ac4972c4b47bee280e862c5a6ab,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1233.25,9/5/2008 8:47:39 AM,0eee85f6018648a498b1bd90d72035d8,Exit,15S,0d383 b744cf948e19d53209dad72b650,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1233.75,9/5/2008 8:47:12 AM,d727e095c16e47648597469f37109cde,Entry,17S,c9c4 a841af3e4a829ccb5aa9c9281a30,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1233.25,9/5/2008 8:47:02 AM,2db5cfaeee2d4700abe23ea749326237,Entry,15S,e75a ad3f9c9342a0b3e1f3ca6a4da6e6,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1232.75,9/5/2008 8:46:55 AM,fe99581ab75e4ccb80503ca3938d2f4e,Entry,13S,6dae 987f1edf4c9e9d0f525d06891aad,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1232.25,9/5/2008 8:46:33 AM,f2f7adc9e4fd4815867e3d3d7a62bb71,Entry,11S,ee32 8af1bae14b5f879c64080bc5bfe2,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1231.75,9/5/2008 8:46:21 AM,426754ad5d1946ac863350a7dd96dd9f,Entry,9S,276e2 1d909a7444582a1668b877fc562,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1231.25,9/5/2008 8:46:12 AM,aaaa319cc1df4ed38b92e69e57ad328c,Exit,7S,c8853a f521ed4635851258ed04e2a5b7,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1231.75,9/5/2008 8:46:07 AM,ca7a64d486f04458857e0ba9d8d11287,Exit,9S,7c1fba d16cc440c6970acb184abc1fd9,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1232.25,9/5/2008 8:45:22 AM,f47af7b3bb7f426cb7eb1c9cf457982b,Entry,11S,fa14 f5338bf64c4b94921223706dbc39,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1231.75,9/5/2008 8:45:00 AM,9b8b74c16bda4754a426724611a16c97,Entry,9S,564aa 1de358b4725a957c60e3544a548,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1231.25,9/5/2008 8:44:53 AM,33b542106bd046d5a34d8ddb4de7c1bf,Entry,7S,a1365 332211e4cbdaa5c5997da9bc46e,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1230.75,9/5/2008 8:44:38 AM,1b710bdff4d14b959910d0165905fba5,Entry,5S,692fa 8a05a414ca2a57ec4b5bdc54003,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1230.25,9/5/2008 8:44:22 AM,f89b17ed4ec244c8af2744ca00400147,Exit,3S,2fb683 01502a488c867fe0f0ed550b96,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1230.75,9/5/2008 8:44:17 AM,417f3a0e2dcc46ceac7c2274602377d2,Exit,5S,13af38 271e6544488426584c620d0e28,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1231.25,9/5/2008 8:43:40 AM,70a9ca34b7ce468d8b5c632b64ab6ca7,Exit,7S,e52e4d 0dc1504367912e4d556cae15ef,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1231.75,9/5/2008 8:43:18 AM,95729e6daccb443da2fca77efcff063b,Entry,9S,37139 75d747543b1ace634b29b084f03,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1231.25,9/5/2008 8:43:17 AM,bf1b41ac91564f1c9c435b0eb10dd43d,Exit,7S,dc3b32 9db9dd40048e4e82246cade20e,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1231.75,9/5/2008 8:43:06 AM,80b681d41d79476e9f6a571a50310bae,Entry,9S,2c58b 9e423ff4c7cbc407018ab1687b9,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1231.25,9/5/2008 8:43:03 AM,d9c94b7b54f8475a9f207740bc4e648b,Entry,7S,1ea79 6b9266746a0ab7d2759be18f55b,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,2,1230.75,9/5/2008 8:42:58 AM,c8aa2e9db5444a58a27a97cb5a20bda1,Entry,5S,fa060 d93ba414d9cb75d89fc18e618b9,Sell short,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,1,1230.25,9/5/2008 8:42:47 AM,40ec6a61aa02488dbe8d3d98bcaaa0eb,Exit,3S,dcb0c8 2b47cc47a8b6083d79e87bc804,Buy to cover,0.00,1,Replay101,Market Replay Connection, ES 09-08,Buy,1,1230.25,9/5/2008 8:42:46 AM,52931f102136419eb111aa4cc54881e9,Exit,4S,dcb0c8 2b47cc47a8b6083d79e87bc804,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Buy,2,1230.75,9/5/2008 8:42:28 AM,5c49e752f2b847389bd8e186d6b38be8,Exit,5S,fc27c0 a213674a97ac1b481729dbeae1,Buy to cover,2.11,1,Replay101,Market Replay Connection, ES 09-08,Sell,1,1231.25,9/5/2008 8:42:12 AM,2ae9b297bbf8451cbfba043242f628d1,Entry,7S,83c4a 61f3d7e4edc9273279074e1d5b5,Sell short,2.11,1,Replay101,Market Replay Connection, |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: May 2008
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
Here is my output print:
------------------------------------------------------------------------- 9/5/2008 :: 8:41:0 LongCnt: 39 , ShortCnt: 39 MP: 0 FillPrice: 1227.75 Avg:0 Open PnL: $0 Closed PnL: $192 Instr1SellOrder = null 9/5/2008 :: 8:42:0 LongCnt: 39 , ShortCnt: 40 MP: -1 FillPrice: 1228.25 Avg:1228.25 Open PnL: $-2 Closed PnL: $192 Fire Short Exit Instr1SellOrder = null 9/5/2008 :: 8:42:0 LongCnt: 39 , ShortCnt: 41 MP: -2 FillPrice: 1228.75 Avg:1228.5 Open PnL: $-27 Closed PnL: $192 Instr1SellOrder = null 9/5/2008 :: 8:42:0 LongCnt: 39 , ShortCnt: 42 MP: -3 FillPrice: 1229.25 Avg:1228.75 Open PnL: $-77 Closed PnL: $192 Instr1SellOrder = null 9/5/2008 :: 8:42:0 LongCnt: 39 , ShortCnt: 43 MP: -4 FillPrice: 1229.75 Avg:1229 Open PnL: $-152 Closed PnL: $192 Instr1SellOrder = null 9/5/2008 :: 8:42:0 LongCnt: 39 , ShortCnt: 44 MP: -5 FillPrice: 1230.25 Avg:1229.25 Open PnL: $-252 Closed PnL: $192 Instr1SellOrder = null 9/5/2008 :: 8:42:0 LongCnt: 39 , ShortCnt: 45 MP: -6 FillPrice: 1230.75 Avg:1229.5 Open PnL: $-377 Closed PnL: $192 Instr1SellOrder = null 9/5/2008 :: 8:43:0 LongCnt: 39 , ShortCnt: 46 MP: -7 FillPrice: 1231.25 Avg:1229.75 Open PnL: $-527 Closed PnL: $192 Instr1BuyOrder1 = null 9/5/2008 :: 8:43:0 LongCnt: 41 , ShortCnt: 46 MP: -5 FillPrice: 1230.75 Avg:1229.75 Open PnL: $-252 Closed PnL: $-39 Fire Short Exit 9/5/2008 :: 8:43:0 LongCnt: 42 , ShortCnt: 46 MP: -4 FillPrice: 1230.25 Avg:1229.75 Open PnL: $-102 Closed PnL: $-93 Instr1BuyOrder1 = null 9/5/2008 :: 8:43:0 LongCnt: 43 , ShortCnt: 46 MP: -3 FillPrice: 1230.25 Avg:1229.75 Open PnL: $-77 Closed PnL: $-120 Fire Short Exit Instr1SellOrder = null 9/5/2008 :: 8:43:0 LongCnt: 43 , ShortCnt: 48 MP: -5 FillPrice: 1230.75 Avg:1230 Open PnL: $-196 Closed PnL: $-120 Instr1SellOrder = null 9/5/2008 :: 8:44:0 LongCnt: 43 , ShortCnt: 50 MP: -7 FillPrice: 1231.25 Avg:1230.25 Open PnL: $-368 Closed PnL: $-120 Instr1SellOrder = null 9/5/2008 :: 8:44:0 LongCnt: 43 , ShortCnt: 52 MP: -9 FillPrice: 1231.75 Avg:1230.5 Open PnL: $-590 Closed PnL: $-120 Instr1BuyOrder1 = null 9/5/2008 :: 8:44:0 LongCnt: 45 , ShortCnt: 52 MP: -7 FillPrice: 1231.25 Avg:1230.5 Open PnL: $-284 Closed PnL: $-201 Fire Short Exit Instr1SellOrder = null 9/5/2008 :: 8:44:0 LongCnt: 45 , ShortCnt: 54 MP: -9 FillPrice: 1231.75 Avg:1230.5 Open PnL: $-399 Closed PnL: $-201 Instr1BuyOrder1 = null 9/5/2008 :: 8:44:0 LongCnt: 47 , ShortCnt: 54 MP: -7 FillPrice: 1231.25 Avg:1230.5 Open PnL: $-223 Closed PnL: $-232 Fire Short Exit Instr1BuyOrder1 = null 9/5/2008 :: 8:45:0 LongCnt: 49 , ShortCnt: 54 MP: -5 FillPrice: 1230.75 Avg:1230.5 Open PnL: $-35 Closed PnL: $-211 Fire Short Exit Instr1BuyOrder1 = null 9/5/2008 :: 8:45:0 LongCnt: 51 , ShortCnt: 54 MP: -3 FillPrice: 1230.25 Avg:1230.5 Open PnL: $52 Closed PnL: $-90 Fire Short Exit Instr1SellOrder = null 9/5/2008 :: 8:45:0 LongCnt: 51 , ShortCnt: 56 MP: -5 FillPrice: 1230.75 Avg:1230.75 Open PnL: $-31 Closed PnL: $-90 Instr1SellOrder = null 9/5/2008 :: 8:45:0 LongCnt: 51 , ShortCnt: 58 MP: -7 FillPrice: 1231.25 Avg:1230.75 Open PnL: $-195 Closed PnL: $-90 Instr1SellOrder = null 9/5/2008 :: 8:46:0 LongCnt: 51 , ShortCnt: 60 MP: -9 FillPrice: 1231.75 Avg:1230.75 Open PnL: $-430 Closed PnL: $-90 Instr1SellOrder = null 9/5/2008 :: 8:46:0 LongCnt: 51 , ShortCnt: 62 MP: -11 FillPrice: 1232.25 Avg:1231 Open PnL: $-593 Closed PnL: $-90 Instr1BuyOrder1 = null 9/5/2008 :: 8:47:0 LongCnt: 53 , ShortCnt: 62 MP: -9 FillPrice: 1231.75 Avg:1231 Open PnL: $-373 Closed PnL: $-94 Fire Short Exit Instr1BuyOrder1 = null 9/5/2008 :: 8:47:0 LongCnt: 55 , ShortCnt: 62 MP: -7 FillPrice: 1231.25 Avg:1231 Open PnL: $-116 Closed PnL: $-99 Fire Short Exit Instr1SellOrder = null 9/5/2008 :: 8:47:0 LongCnt: 55 , ShortCnt: 64 MP: -9 FillPrice: 1231.75 Avg:1231 Open PnL: $-231 Closed PnL: $-99 Instr1SellOrder = null 9/5/2008 :: 8:47:0 LongCnt: 55 , ShortCnt: 66 MP: -11 FillPrice: 1232.25 Avg:1231 Open PnL: $-643 Closed PnL: $-99 Instr1SellOrder = null 9/5/2008 :: 8:47:0 LongCnt: 55 , ShortCnt: 68 MP: -13 FillPrice: 1232.75 Avg:1231.25 Open PnL: $-1010 Closed PnL: $-99 Instr1SellOrder = null 9/5/2008 :: 8:48:0 LongCnt: 55 , ShortCnt: 70 MP: -15 FillPrice: 1233.25 Avg:1231.25 Open PnL: $-1441 Closed PnL: $-99 Instr1SellOrder = null 9/5/2008 :: 8:48:0 LongCnt: 55 , ShortCnt: 72 MP: -17 FillPrice: 1233.75 Avg:1231.5 Open PnL: $-1933 Closed PnL: $-99 Instr1BuyOrder1 = null 9/5/2008 :: 8:48:0 LongCnt: 57 , ShortCnt: 72 MP: -15 FillPrice: 1233.25 Avg:1231.5 Open PnL: $-1331 Closed PnL: $-328 Fire Short Exit Instr1BuyOrder1 = null 9/5/2008 :: 8:48:0 LongCnt: 59 , ShortCnt: 72 MP: -13 FillPrice: 1232.75 Avg:1231.5 Open PnL: $-829 Closed PnL: $-457 Fire Short Exit Instr1SellOrder = null 9/5/2008 :: 8:49:0 LongCnt: 59 , ShortCnt: 74 MP: -15 FillPrice: 1233.25 Avg:1231.5 Open PnL: $-1068 Closed PnL: $-457 Instr1BuyOrder1 = null 9/5/2008 :: 8:50:0 LongCnt: 61 , ShortCnt: 74 MP: -13 FillPrice: 1232.75 Avg:1231.5 Open PnL: $-763 Closed PnL: $-536 Fire Short Exit Instr1BuyOrder1 = null 9/5/2008 :: 8:50:0 LongCnt: 63 , ShortCnt: 74 MP: -11 FillPrice: 1232.25 Avg:1231.5 Open PnL: $-371 Closed PnL: $-565 Fire Short Exit 9/5/2008 :: 8:50:0 LongCnt: 64 , ShortCnt: 74 MP: -10 FillPrice: 1231.75 Avg:1231.5 Open PnL: $-87 Closed PnL: $-569 Instr1BuyOrder1 = null 9/5/2008 :: 8:50:0 LongCnt: 65 , ShortCnt: 74 MP: -9 FillPrice: 1231.75 Avg:1231.5 Open PnL: $-79 Closed PnL: $-545 Fire Short Exit Fire Short Exit Fire Short Exit Fire Short Exit Fire Short Exit Fire Short Exit Fire Short Exit Fire Short Exit |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: May 2008
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
When I set Enforce Partials from the simulator tab, everything works perfect. My concern is that this isn't what would happen in reality.
|
|
|
|
|
|
#5 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
vjsworld,
Because of race conditions, checking against the order object's status can lead to the behavior you have been experiencing. Essentially the order object can return an OrderState of null while their are still execution events to be processed. We are aware of the issue and are working on an approach that will yield better results. Thanks for understanding.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: May 2008
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
|
OH MY GOODNESS!
I am a former TT customer and never had a problem like this. I hope that you guys can resolve this in a reasonable time. I really like NT and want to use it, but I guess I will have to go back to TT until you guys can figure it out. Real professional traders NEED this to work. OK, the inevitable question: Will you guys fix this in a 6.5 release, or will I have to wait until 7? |
|
|
|
|
|
#7 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
No ETA yet.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Apr 2009
Posts: 161
Thanks: 0
Thanked 5 times in 5 posts
|
Hi,
Just wondered if there was any resolution to this issue. I am currently evaluating NT and pushing large volumes of data through it to assess its stability. I've noticed whilst reviewing the output of my testing that I too am seeing the the signature footprints of race conditions because of sequencing issues related to the event queue. I've had multi-threaded apps really bite me in the backside myself and so know how nasty these can be to sort out. Any news from NT support? Thanks |
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
I will find out and have someone post.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
ScoobyStoo,
The nature of these things are case by case circumstances. Please open a new thread outlining what you are experiencing and then we can comment on your particular situation. Thank you.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Apr 2009
Posts: 161
Thanks: 0
Thanked 5 times in 5 posts
|
Well, this thread already relates to one of the big issues I am seeing in my logs. The NT architecture seems to render it impossible to reliably test order status because of the race conditions resulting from the multithreading of the core execution engine.
Now I understand the issues of multithreading and so am interested in finding out how you guys intend to handle these potentially very dangerous situations where I'm guessing the order management thread is not aware of what's going on in the execution thread. |
|
|
|
|
|
#12 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Not following you which is why you need to outline what you think you are observing. There is nothing "unreliable" about checking order status. Please open a new thread. Thank you.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strange Market Order Partial Fill Exit Behavior | mrlogik | Strategy Development | 1 | 08-29-2008 10:47 PM |
| Opposite market order or close button for quickest exit fill? | nucc10 | SuperDOM and other Order Entry Windows | 1 | 03-05-2008 11:18 PM |
| Handling of Exit Long and Exit Short before EOD | Trader Rob | Strategy Development | 3 | 10-22-2007 02:13 PM |
| How to complete entry on a partial fill in V5? | Merv | Miscellaneous Support | 3 | 12-30-2005 06:24 AM |
| How to determine partial fills on exit order ...... in bracket orders ? | mkundi | Automated Trading | 3 | 06-22-2005 01:08 PM |