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, 07: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 Hyper, Yesterday, 09:02 PM
            2 responses
            7 views
            0 likes
            Last Post Hyper
            by Hyper
             
            Started by damianfanaro, Today, 06:28 AM
            0 responses
            6 views
            0 likes
            Last Post damianfanaro  
            Started by Impeesa, Today, 12:53 AM
            1 response
            17 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by artson, Today, 05:40 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by Impeesa, Today, 03:17 AM
            0 responses
            8 views
            0 likes
            Last Post Impeesa
            by Impeesa
             
            Working...
            X