Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Close ALL unique entries generated from ATM Strategy and reverse position

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

    Close ALL unique entries generated from ATM Strategy and reverse position

    Hi,

    I’m using GetAtmStrategyUniqueId() to create multiple ATM entries for my position.Creating a separate ATM strategy for each entry is fine however when switching from long to short Position for example, how can I do this within the ATM realm, whereas unmanaged approach is simple enough doubling up the quantity but there are no attributes for quantity to make the swap in the same manner. How can I achieve the same result?

    For a single entry I just close the position before creating the reversal entry, but doing this for multiple entries I am only closing the last entry, is there a work around to close all the unique entries at once?

    thanks for help in advanced

    #2
    https://ninjatrader.com/support/help...gement_atm.htm

    Comment


      #3
      Thanks for the link to the manual. However I can’t see how this is relevant to my question about triggering ATM’s and controlling them via a strategy?

      Comment


        #4
        EntriesPerDirection = 4;

        atmStrategyId = GetAtmStrategyUniqueId();
        atmStrategyId1 =GetAtmStrategyUniqueId1();

        Check ATM Strategy Methodsfrom NinjaTrader 8 Help Guide.
        Last edited by Emma1; 08-08-2020, 06:23 PM.

        Comment


          #5
          Thanks Emma, that makes sense, so simple loop should work nicely then, wasn’t thinking

          Comment


            #6
            Hello mr_trade,

            You could save the ids to variables (or an array) and use GetAtmStrategyEntryOrderStatus() and GetAtmStrategyStopTargetOrderStatus() to check when the Atms are still working or have closed.
            https://ninjatrader.com/support/help...rderstatus.htm
            https://ninjatrader.com/support/help...rgetorders.htm
            https://ninjatrader.com/support/help...etposition.htm

            You could also check that the Account position for that instrument is flat.
            https://ninjatrader.com/support/help...ns_account.htm
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by guenni7, Today, 09:43 PM
            0 responses
            5 views
            0 likes
            Last Post guenni7
            by guenni7
             
            Started by jonfan45, Today, 06:06 PM
            0 responses
            9 views
            0 likes
            Last Post jonfan45  
            Started by rustyspring, Today, 05:15 PM
            0 responses
            13 views
            0 likes
            Last Post rustyspring  
            Started by xulu13, Today, 05:01 PM
            0 responses
            15 views
            0 likes
            Last Post xulu13
            by xulu13
             
            Started by Pbarrionuevo, Today, 04:30 PM
            0 responses
            13 views
            0 likes
            Last Post Pbarrionuevo  
            Working...
            X