Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Identifying ATM orders

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

    Identifying ATM orders

    I'm traversing the orders list and would like to identify orders that are ATM TP/SL orders based upon the entry order id. Is this possible?

    #2
    Hello ellington,

    Thanks for your notes.

    Could you please provide us with more detail about exactly what you want to accomplish so we may accurately assist?

    Are you referring to ATM Stop/Targets submitted from a NinjaScript strategy using Atm Strategy Methods?

    Or, are you referring to manually submitted orders that use ATM Strategy Templates?

    We look forward to assisting further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Sure. I'm working on a trade logging database and using updates to orders and executions to log state changes. For any given open position, I'd like to be able to understand which Stop/Targets are associated with the initial opening order, irrespective of whether the Stop/Target was submitted using an ATM Strategy Template or a NinjaScript strategy.

      Comment


        #4
        Hello ellington,

        Thanks for your notes.

        Are you referring to manually submitted orders or ATM strategies submitted from a NinjaScript strategy.

        If the stop/target was submitted from a script using Atm Strategy Methods, only Atm Strategy Methods could be used to get information about those orders.

        GetAtmStrategyStopTargetOrderStatus() would be used to get information about the stop/target submitted from Atm Strategy Methods.

        From the 'Using Atm Strategies' help guide:

        "Executions from ATM Strategies will not have an impact on the hosting NinjaScript strategy position and PnL - the NinjaScript strategy hands off the execution aspects to the ATM, thus no monitoring via the regular NinjaScript strategy methods will take place (also applies to strategy performance tracking)"

        Using Atm Strategies: https://ninjatrader.com/support/help...strategies.htm

        If you want to get the orders on a specified account you could loop through the Account.Orders collection.

        Account.Orders: https://ninjatrader.com/support/help...rs_account.htm

        You could subscribe to Account OrderUpdate events to get information about orders when changes occur.

        Account.OrderUpdate: https://ninjatrader.com/support/help...rderupdate.htm
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          I'm mainly looking at manually submitted orders Brandon. Sure I can loop through Account.Orders but I don't see what connects orders submitted as part of an ATM Strategy to the parent order that triggered the TP/SL orders. This is what I'm looking for.

          Comment


            #6
            Hello ellington,

            Thanks for your notes.

            You could view this Ecosystem User App Share script called "AtmStrategyIdentifier" to get an idea of how to get chart trader account orders and save ATM orders, IDs, and names to a dictionary in the script and sort orders into arrays of stop orders and target orders.

            AtmStrategyIdentifier: https://ninjatraderecosystem.com/use...egyidentifier/

            For information about working with dictionaries you could do a Google search for something like 'Working with Dictionary C#'. Note that this would fall under C# education which we do not provide in our support at NinjaTrader.


            The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fx.practic, 10-15-2013, 12:53 AM
            5 responses
            5,406 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by Shai Samuel, 07-02-2022, 02:46 PM
            4 responses
            98 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by DJ888, Yesterday, 10:57 PM
            0 responses
            8 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            160 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Yesterday, 09:29 PM
            0 responses
            9 views
            0 likes
            Last Post Belfortbucks  
            Working...
            X