Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT won't recognize that it exited a position

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

    NT won't recognize that it exited a position

    Hi,

    I'm having a weird problem in NT.

    I'm running an automated strategy live in NT. I started it for the first time last Tuesday and a couple of days later it took its first trade (long 2 ES futures contracts).

    During the time that I held the position, the PnL and position that were shown in NT and in my broker platform matched exactly.

    During the night last night, my exit condition was achieved and NT exited my long 2 ES position. Both my brokerage account and NT show filled executions for 2 lots, with the same order ID, timestamp, and price.

    The weird thing is this: my brokerage software correctly shows my position as flat. NT, however, is still showing that I am long on the 'Strategies' tab. Why is this? NT executed the order to exit the position, and it KNOWS that it executed the exit order: all the other tabs (Orders, Executions, Positions, Accounts, Account Performance) reflect that the long 2 ES position was exited last night and the PnL was realized.

    Any explanation for this? How do I get my strategy to recognize that it exited the position and is now flat?
    Attached Files

    #2
    Update: I tried restarting NT to see if the strategy would correctly show a flat position, but now it's showing the strategy as 2L (rather than 1L which it was showing before, see attachment in my last post).

    Comment


      #3
      Hello PhillyD,

      Thank you for your post.

      What does the Strategy Performance report for the Orders being submitted? Right click on the Strategy -> Strategy Performance -> Real-Time

      Could you please send me your Log and Trace files by going to Help -> Mail to Platform Support
      Put ATTN Cal in the subject and reference this thread in the body of the email
      Cal H.NinjaTrader Customer Service

      Comment


        #4
        Hi Cal,

        When I go to the Real Time performance report and look at the Orders tab, it shows one order to sell 2 ES futures contracts at market. The order state is 'Filled', the price is 2060.75, which matches what my brokerage platform shows, and the orderID in NT and my brokerage platform match as well. The only thing that doesn't match is that my brokerage platform shows a fill time of 3:45:01AM EST, where NT has the fill time in my local time (2:45:01AM CST).

        Comment


          #5
          Hello PhillyD,

          Thank you for your response.

          So do you see any orders that would constitute the reporting of the long positions on the Strategies tab?

          Do you see the correct reporting on the Account Performance tab?

          Comment


            #6
            Hi Patrick,


            In the Account Performance tab, the positions and PnL are all reported correctly.

            I see the orders that would get me to a 2L position, however what I don't see in the strategy is a strategy order that corresponds to the live market order sell of 2 contracts which would get me back to flat. i.e. The strategy executed a sale of 2 contracts in my live account (making my position flat), but then the strategy doesn't include this sale in its own historical trades, so it's showing me still long 2 lots.


            Looks like the strategy has schizophrenia!


            I found a workaround for this by just setting the number of historical backtest days to 1. That way, the strategy is never carrying historical positions around with it and is only executing live in real time.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by samish18, Yesterday, 08:31 AM
            4 responses
            14 views
            0 likes
            Last Post elirion
            by elirion
             
            Started by funk10101, Yesterday, 09:43 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by TheWhiteDragon, 01-21-2019, 12:44 PM
            5 responses
            551 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by rtwave, 04-12-2024, 09:30 AM
            5 responses
            37 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by funk10101, Today, 12:02 AM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X