Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Duplication of orders
Collapse
X
-
Hi NinjaTrader_ChelseaB,
The problem appeared again. I have a log file and a trace file. Could you give me mail where I can send them?Originally posted by NinjaTrader_ChelseaB View PostHello webus,
I will not be able to confirm without reviewing the log and trace files.
Leave a comment:
-
Hi NinjaTrader_ChelseaB,
Each order, which is called "Long" or "Short" and which has passed the "Accepted" state, I save to the array and log it every new bar (to see its status at the moment).Originally posted by NinjaTrader_ChelseaB View PostHello webus,
Do you see that the original ID was cancelled or filled?
If not, the ID of the order probably changed.
Thus, I saved two orders: "'NT-00233-4559'" and "'6204f69369794841ad37f830b12b897d'". A few candles after that, the order '6204f69369794841ad37f830b12b897d' became 'Filled' and became a market position. 'NT-00233-4559' remained "Working" and did not become "Filled". Based on the logging, it remained "Working", it did not change to "Changed", "Cancelled", "Rejected", "Filled", etc.
In other words, one call to the EnterShortStopMarket () function resulted in two orders, one of which became "Filled", and the second remained "Working."
Ok, if I encounter such a problem again, I will also try to add the Trace log.Originally posted by NinjaTrader_ChelseaB View PostI will not be able to confirm without reviewing the log and trace files.
Leave a comment:
-
Hello webus,
Do you see that the original ID was cancelled or filled?
If not, the ID of the order probably changed. I will not be able to confirm without reviewing the log and trace files.
Leave a comment:
-
Hi NinjaTrader_ChelseaB,
Sorry, maybe this is important. This is a log from the NinjaScript output window.Originally posted by NinjaTrader_ChelseaB View PostHello webus,
Initially the order is submitted and has an internal ID. Then the broker will generate an ID and this will be the new ID for the order.
The order likely started with ID 6204f69369794841ad37f830b12b897d, and may have become NT-00233-4559.
The message:
"NinjaScript strategy 'XXX/183993646' submitting order"
This would mean that a NinjaScript Strategy named XXX has submitted a real-time order.
The message:
"6/23/2020 1:30:00 AM Strategy 'XXX/183993646': Entered internal SubmitOrderManaged() method at 6/23/2020 1:30:00 AM: BarsInProgress=0 Action=SellShort OrderType=StopMarket Quantity=1 LimitPrice=0 StopPrice=10110.00 SignalName='Short' FromEntrySignal=''"
This message is actually unexpected in the Log. This information looks like TraceOrders which I would not be expecting in the log file..
Without the log and trace files it's hard to say what is going on.
In general log and trace questions should be emailed to platformsupport [at] ninjatrader [dot] com so that we may review your log and trace.
I think I can’t agree with you.
Based on the log file, I see that “NT-00233-4559” was created after the order was opened, and only then “6204f69369794841ad37f830b12b897d” was created (please look at the order of the lines in the log above).
My main question is why did NT8 create two different instances of the Order class from one call to the "EnterShortStopMarket()" function?
Leave a comment:
-
Hello webus,
Initially the order is submitted and has an internal ID. Then the broker will generate an ID and this will be the new ID for the order.
The order likely started with ID 6204f69369794841ad37f830b12b897d, and may have become NT-00233-4559.
The message:
"NinjaScript strategy 'XXX/183993646' submitting order"
This would mean that a NinjaScript Strategy named XXX has submitted a real-time order.
The message:
"6/23/2020 1:30:00 AM Strategy 'XXX/183993646': Entered internal SubmitOrderManaged() method at 6/23/2020 1:30:00 AM: BarsInProgress=0 Action=SellShort OrderType=StopMarket Quantity=1 LimitPrice=0 StopPrice=10110.00 SignalName='Short' FromEntrySignal=''"
This message is actually unexpected in the Log. This information looks like TraceOrders which I would not be expecting in the log file..
Without the log and trace files it's hard to say what is going on.
In general log and trace questions should be emailed to platformsupport [at] ninjatrader [dot] com so that we may review your log and trace.
Leave a comment:
-
Duplication of orders
Hi!
I use functions:
I came across duplicate orders, this is what I see in the log:Code:EnterLongStopMarket(0,true,pmLot,Highs[0][0] + 2 * TickSize,"Long"); EnterShortStopMarket(0,true,pmLot,Lows[0][0] - 2 * TickSize,"Short");
Further, the order 6204f69369794841ad37f830b12b897d became market ("filled"), and the order NT-00233-4559 remained "working."HTML Code:6/23/2020 1:30:00 AM Strategy 'XXX/183993646': Entered internal SubmitOrderManaged() method at 6/23/2020 1:30:00 AM: BarsInProgress=0 Action=SellShort OrderType=StopMarket Quantity=1 LimitPrice=0 StopPrice=10110.00 SignalName='Short' FromEntrySignal='' name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='NT-00233-4559' account='Sim101' name='Short' orderState=Submitted instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Submitted name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='NT-00233-4559' account='Sim101' name='Short' orderState=Accepted instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Accepted name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='NT-00233-4559' account='Sim101' name='Short' orderState=Working instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Working NinjaScript strategy 'XXX/183993646' submitting order name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='6204f69369794841ad37f830b12b897d' account='Sim101' name='Short' orderState=Submitted instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=18047 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Submitted name='XXX' id=183993646 Logger: NQ 09-20 6/23/2020 1:30:00 AM OnOrderUpdate1:Order (orderId='6204f69369794841ad37f830b12b897d' account='Sim101' name='Short' orderState=Accepted instrument='NQ 09-20' orderAction=SellShort orderType='Stop Market' limitPrice=0 stopPrice=10110 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=18047 time='2020-06-23 01:30:00' gtd='2099-12-01' statementDate='2020-06-23') update: Accepted
Every time when I see the line "NinjaScript strategy 'XXX / 183993646' submitting order" - I see that the order is duplicated.
Questions:
1. Why was the order duplicated by creating two different instances of the Order class?
2. What exactly does the string "NinjaScript strategy 'XXX / 183993646' submitting order" mean? It occurs only a few times, while the string "... Entered internal SubmitOrderManaged () ..." occurs more than 500 times.Tags: None
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by kinfxhk, 07-14-2026, 09:39 AM
|
0 responses
15 views
0 likes
|
Last Post
by kinfxhk
07-14-2026, 09:39 AM
|
||
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
59 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
42 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
47 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
38 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|

Leave a comment: