Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time To Flatten (All Positions) Feature

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

    Time To Flatten (All Positions) Feature

    Today I started using my new full version of NT with IB. I'm using NT to route futures day trading orders from Tradestation to IB.

    I was going to use the "time to flatten" checkbox feature to flatten my futures day trading positions but then I realized that this feature would probably flatten all of my manually-entered long-term stock holdings in my IB account, so I turned off the feature a few minutes before it was going to probably cause major havok.

    Am I correct in assuming that this feature will completely flatten EVERYTHING in my IB account at the time specified?

    Is there a way to tell NT to only flatten the futures positions, or those initiated today?

    Thank you in advance.

    #2
    Wow...good thing you disabled that since YES! your entire acccount(s) at IB would be flat.

    What you can do is enable Exit on close for each strategy running.
    RayNinjaTrader Customer Service

    Comment


      #3
      Yeah that's what I thought. Glad I turned it off.

      The reason I wanted to use the feature was because my strategy exits at 16:00 EST (at the close) and there tends to be a lot of slippage a few seconds before and after the exact close at 16:00, so I had set the timer to like 30 seconds because the close (15:59:30) or something like that. When I was trading my strategy manually at Mirus with the direct edition of Ninja, that's what I would do.

      I suppose I could just exit at 15:55 or 16:05 (using 5 minute bars) instead of right on the 16:00 close bar, though that is not what my backtested / walked-forwarded strategy prescribes.

      Thanks for the info.

      Comment


        #4
        Does it depend on brokerage's technology?

        For example, Patsystem only tells NinjaTrader the Account's PnL. So, "Flatten All Positions" would only flatten the trades that NinjaTrader knows about and it might not flatten all positions in the brokerage account.

        Correct?

        Comment


          #5
          Not sure I follow. NT knows all trades in our broker account and knows the actual position of your broker account and thus knows what to do to flatten out any pending position.

          Comment


            #6


            If there are 5 NT-initiated trades and 10 non-NT-initiated trades in the brokerage account, NT only knows about the 5 NT-initiated trades. According to the link above, NT only gets PnL. NT doesn't know about the non-NT-initiated trades.

            Thus, when NT flattens everything, the 10 non-NT-initated trades are still open in the brokerage account.

            That's what I meant.

            Comment


              #7
              Not sure where on link below you read that. Flattening an account is driven by positions and open orders and not PnL.

              NT always is aware of any open order/position in an account as it connects to this account.

              Comment


                #8
                Regarding stopping a strategy, I wonder if there is a way to stop a strategy and flatten position + cancel all orders associated with it only (e.g. if I have other strategies running concurrently, as well as trades placed manually outside of NT, they all should stay intact upon such a stop). I tried to use something like ExitLong( Position.Quantity ), but it flattens every single position for a given instrument. Thank you!

                Comment


                  #9
                  Hello,

                  Sorry for the delay.

                  You will find examples on how to do this here:
                  DenNinjaTrader Customer Service

                  Comment


                    #10
                    Great, I will check these out. Thank you Ben

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by rjbtrade1, 11-30-2023, 04:38 PM
                    2 responses
                    75 views
                    0 likes
                    Last Post DavidHP
                    by DavidHP
                     
                    Started by Stanfillirenfro, Today, 07:23 AM
                    3 responses
                    12 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by FitSpressoHonest, Today, 09:14 AM
                    0 responses
                    2 views
                    0 likes
                    Last Post FitSpressoHonest  
                    Started by Davide999, 05-18-2023, 03:55 AM
                    4 responses
                    557 views
                    1 like
                    Last Post kcwasher  
                    Started by rexsole, Today, 08:39 AM
                    2 responses
                    8 views
                    0 likes
                    Last Post NinjaTrader_Erick  
                    Working...
                    X