Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Execution vs Position not matching

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Execution vs Position not matching

    Hi

    I´m using version 8.1.3.0 of Ninjatrader to report the following issue I´ve encountered, and I attach 4 screenshots illustrating it.

    Basically, I´ve got a script that places orders using this ... (I´m not using OCO):

    accountLong1.Submit(new[] {longEntryOrder1}); // enters a long position
    accountLong1.Submit(new[] {longProfitTargetOrder}); // sets profit target
    accountLong1.Submit(new[] {longStopLossOrder}); // sets the stop loss

    Looking at account SIM101 and when the stop loss order "longStopLossOrder" is FILLED the expectation is that the position "longEntryOrder1" should be automatically closed and all I have to do is to check for the FILLED signal in methoc OnExecutionUpdate() to make sure it´s done.

    But, what actually happens is that in the control panel, the ORDERS and EXECUTIONS tabs show accurately "longStopLossOrder" is FILLED and done, however in the POSITIONS tab shows the long position on SIM101 still open and active instead closed, which I don´t think that´s correct?

    Also, if I open new->Trade Performance report and filter by SIM101 it clearly shows SIM101 long position was closed just as expected and reported in the ORDERS and EXECUTIONS tabs.

    Therefore, I think something must be wrong with the way Ninjatrader is reporting or updating POSITIONS information, or at least in my particular scenario?

    This issue isn´t happening every single time, but obviously I want to make sure that in a real live account the position is really closed as reported by the ORDERS and EXECUTIONS info received.

    Any support will be really helpful,
    Thanks

    Click image for larger version

Name:	NT position issue screenshot 1.png
Views:	230
Size:	72.1 KB
ID:	1304638
    Click image for larger version

Name:	NT position issue screenshot 2.png
Views:	167
Size:	71.2 KB
ID:	1304639
    Click image for larger version

Name:	NT position issue screenshot 3.png
Views:	171
Size:	62.4 KB
ID:	1304640
    Click image for larger version

Name:	NT position issue screenshot 4.png
Views:	161
Size:	53.5 KB
ID:	1304641


    #2
    Hello, any updates on this issue and when we´ll get a fix?

    Thanks

    Comment


      #3
      Hello juartur,

      In the code provided that could lead to the target filling before the entry or at the same time. Have you tried submitting the order, waiting for its fill in OnExecutionUpdate and then submitting the targets?

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      40 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      27 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      45 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      37 views
      0 likes
      Last Post CarlTrading  
      Working...
      X