Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to flaten one of multiple Strategies in one trading account

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

    How to flaten one of multiple Strategies in one trading account

    If we have two systems say trading er2 in one account,
    how to we use the close all to close all contracts on the
    Strategy, not the account?


    Im doing this incase I am out of sync, its safer to go flat, rather than close out the positions ib / ninja THINKS it has.

    ie system turbotrader might be long1 er2,
    then system breakout goes long er2
    then system turbotrader goes flat er2.
    at this point I want to flatten turbo trader, but not the account as we are still long one contract from system breakout

    thanks for your help.

    #2
    Please try submitting a market order with the quantity of your actual strategy position.

    Comment


      #3
      being sure you are flat

      Im working on the assumption, one day I will get out of sync, which is very costly. Hence I still want to know how to force the strategy, not the account flat.
      i expect it to be through use of
      NTCommand CLOSEPOSITION

      Im not sure how strategyId should be used to acomplish this

      thanks again.

      Comment


        #4
        May be a misunderstanding:
        a) are you talking about a NinjaScript strategy? -> my advise applies
        OR
        b) are you talking about an ATM strategy managed through ATI? -> CLOSEPOSITION will close the position of the strategy, since you need to apply the strategy ID parameter. Please read more here:

        Comment


          #5
          My apologies: Is misread the docs on (b).

          You need to call CLOSESTRATEGY and provide the strategy id parameter. This parameter is a unique identifier which you need to pass in as you call e.g. the PLACE command to start a strategy. This parameter then identifies the running strategy.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          67 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          41 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          24 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          27 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          53 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X