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 aussugardefender, Today, 01:07 AM
          0 responses
          3 views
          0 likes
          Last Post aussugardefender  
          Started by pvincent, 06-23-2022, 12:53 PM
          14 responses
          238 views
          0 likes
          Last Post Nyman
          by Nyman
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          9 responses
          384 views
          1 like
          Last Post Gavini
          by Gavini
           
          Started by oviejo, Today, 12:28 AM
          0 responses
          4 views
          0 likes
          Last Post oviejo
          by oviejo
           
          Started by pechtri, 06-22-2023, 02:31 AM
          10 responses
          125 views
          0 likes
          Last Post Leeroy_Jenkins  
          Working...
          X