• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Way to find out active Atm Strategy Id?

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

    Way to find out active Atm Strategy Id?

    Is there a means to find out what Atm strategy Ids are currently active?

    My desire for this is if am running Strategy (on chart) with no active positions but over in the DOM manually initiate an Atm entry. Would like my Strategy running on the chart be able to "intercept the ball" and then manage the manually opened Atm based position.

    As far as examples have seen they all initiate and own the AtmStrategyId, but would like to have flexibility for discretionary trading as well while primary Strategy continues to run.

    Thx,

    -Jim

    #2
    Hello JimB17,

    Thanks for writing in.

    Is there a means to find out what Atm strategy Ids are currently active?
    I am unaware of a supported means where you can intercept the ATM strategy ID's. They are typically created from a random number along with an increment based on time. If you had the ATM strategy ID and the order ID's you could use NinjaScript to fully take control of the ATM strategy using the ATM strategy methods. Since they are not created in a way that is intended to be unique and not solely based on time, there is not a convenient way to parse orderID's to associate them with the ATM strategy.

    One approach that might be possible for you would be to monitor the account positions. If a position is created that has not been created by the strategy, you can use logic within the strategy to take certain action. However without the ATM ID and order ID's you cannot take full control of the ATM strategy.

    Please elaborate more on what you would exactly like to do with taking control of ATM strategies. If we cannot find a solution, we can submit a feature request to allow this functionality in the future.

    Documented ATM strategy order methods can be found here: https://ninjatrader.com/support/help...gy_methods.htm

    I look forward to being of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jim View Post
      Hello JimB17,

      Please elaborate more on what you would exactly like to do with taking control of ATM strategies. If we cannot find a solution, we can submit a feature request to allow this functionality in the future.
      Generally I want to pull an Atm driven position which initiate from the JigSaw DOM using a keystroke over on a running strategy on my chart window. This lets me use the DOM with single key entry then "auto manage" the position with code in the Strategy.

      I can currently create and modify Atm driven positions using an Indicator which adds Buttons to the ChartTrader, which interacts with the Strategy itself. This for example can turn on "Auto Trade Longs" for the Strategy but also other things.

      Having the flexibility to take an existing Atm position and continue guiding it would be useful. Also if I have an active Atm strategy running and have to shutdown and restart the NT session it becomes an orphan as the Id associated with the Strategy is no longer around.

      Just retaining Atm Ids somewhere and giving code access to them can poll for them in the Strategy. Don't know about between NT sessions but at least within one running instance would be useful. My work has numerous Addons and Indicators in addition to the primary Strategy, not sure why making everyone except the Strategy blind to the live Atm Id is needed. These guys all party together after all...

      If this seems reasonable a low priority feature request would be nice eventually.
      Last edited by JimB17; 04-04-2017, 02:20 PM.

      Comment


        #4
        Hello JimB17,

        Thanks for the reply.

        I will submit a feature request to allow tracking of orders entered with an ATM strategy through NinjaScript. I will update this post with the ticket ID once I have received it.

        In the meantime, you may wish to consider these ideas:

        If you are submitting ATM strategies through NinjaScript then you have the ability to set your own order ID's and ATM strategy ID's. For example, you can set the ID based off of the tool used to submit the strategy and the current time, and then you can search for matching order ID's within your script to see if any orders have been submitted since the strategy last iterated OnBarUpdate(). With the matching ID's you can then take control over the ATM strategies either by cancelling the orders or modifying the ATM strategy using the ATM strategy methods.

        Since NinjaScript is built over C#, you can use your own C# code to detect key presses. In this way, you can have a strategy that can detect a key press and then enter an ATM strategy the same way that can be done in the DOM or Chart Trader. Since you are creating the ATM strategy in NinjaScript, you can assign your own trackable ID's and assign them to variables for later use in that script.

        For the thread's reference, I will provide some information on key presses in C#: https://msdn.microsoft.com/en-us/lib...(v=vs.80).aspx

        Thanks for providing input to improve NinjaTrader.
        JimNinjaTrader Customer Service

        Comment


          #5
          Thanks for the reply. Yes if I am the originator of the Atm Strategy have no issues managing it, just keep around the various Ids.

          If the Atm strategy is kicked off via the Jigsaw DOM or the Jigsaw order entry dialog though this is the situation where the Ids are out of sight to my logic and am looking to find them programmatically.

          Even if somehow I looked at keystrokes or mouse / button input on these windows whatever Ids they generate to initiate the Atm are still unknown.

          Think this is obvious from my prior description but wanted to clarify. This feature request simply allows me to use other means to initiate managed trades external to the logic directly under my domain, while retaining the ability to modify/augment the trades once they are live.

          Simply a call like "GetAtmActiveStrategyIds()" returning a string list or something like that would work great. Even just retaining the last Id would be fine for the implementation.

          This is all frosting on the cake though, generally NT8 programming has been working great like it very much.

          Comment


            #6
            Hello JimB17,

            I have gotten word back on the feature request.

            The ticket number for the feature request is SFT-2132. When it is implemented, you can reference this ticket number in the Release Notes of the version of NinjaTrader 8 that includes this feature.

            Release Notes can be found here: https://ninjatrader.com/support/help...ease_notes.htm

            Please let me know if I may be of further assistance.
            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ballboy11, Today, 01:04 PM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by Linda1507, Today, 01:22 PM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by ntbone, Today, 12:15 PM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by ballboy11, Today, 12:32 PM
            2 responses
            3 views
            0 likes
            Last Post ballboy11  
            Started by brownsfan019, Today, 12:04 PM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Working...
            X