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

AtmStrategyStart - where can I find the AtmStrategyId?

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

    AtmStrategyStart - where can I find the AtmStrategyId?

    Hi,
    I'm creating an AtmStrategy from an indicator, by setting up an order using Account.CreateOrder() and then using NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy(templateName, order);

    This works very well. The AtmStrategy fills and proceeds to manage its position without any further ado from my code.


    But, if I now want to control the stoploss and target myself, how can I do that? I need to know the AtmStrategyId string so that I can use the AtmStrategyChangeStopTarget() method.
    The StartAtmStrategy() returns an instance of AtmStrategy, which contains some information but NOT the AtmStrategyId string. Is there a way to get that string?

    An alternative would be to change the orders directly in the account. I have tried that by finding the orders and setting the StopPrice of the order to a new value then using Account.Change(ordersList) but I'm not seeing the orders change. Perhaps the AtmStrategy overrides the changes - I don't know for sure.

    Thanks in advance for any assistance,
    saltminer

    #2
    Hello saltminer,

    Thanks for your post.

    A unique Atm strategy id will have to be created and assigned to the atmStrategyId parameter in AtmStrategyCreate() for the Atm strategy to have an appropriate id. This is usually done using GetAtmStrategyUniqueId() to generate a unique Atm strategy id.

    You may see the SampleAtmStrategy example that comes with NinjaTrader for a walk through on creating a NinjaScript strategy that initiates Atm strategies. I've also included links to our associated documentation for further reading.

    AtmStrategy Methods - https://ninjatrader.com/support/help...gy_methods.htm

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

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      He said "from an indicator"
      Same applies from an Addon, this is related to Ticket ID: SFT-2511)
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        Thanks pmaglio,

        Yes, we only offer support for manipulating Atm Strategies through NinjaScript strategies that initiate them. We do not have any documentation or advise for manipulating Atm Strategies from an AddOn once initiated. SFT-2511 is the feature request ticket id tracking interest on this.

        @saltminer, I'll make sure your interest is tracked on this feature request as well.

        Interested is collected with feature requests before it is considered to be implemented, so we cannot offer an ETA. The ticket id number will be noted in the help guide if it is implemented.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 01:16 PM
        2 responses
        9 views
        0 likes
        Last Post cre8able  
        Started by chbruno, 04-24-2024, 04:10 PM
        3 responses
        48 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by samish18, Today, 01:01 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by WHICKED, Today, 12:56 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by WHICKED, Today, 12:45 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X