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 cmtjoancolmenero, Yesterday, 03:58 PM
          8 responses
          31 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by helpwanted, Today, 03:06 AM
          2 responses
          21 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by DayTradingDEMON, Today, 09:28 AM
          0 responses
          9 views
          0 likes
          Last Post DayTradingDEMON  
          Started by navyguy06, Today, 09:28 AM
          0 responses
          2 views
          0 likes
          Last Post navyguy06  
          Started by rjbtrade1, 11-30-2023, 04:38 PM
          2 responses
          77 views
          0 likes
          Last Post DavidHP
          by DavidHP
           
          Working...
          X