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:	217
Size:	72.1 KB
ID:	1304638
    Click image for larger version

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

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

Name:	NT position issue screenshot 4.png
Views:	150
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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      57 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      37 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      18 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      20 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      49 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X