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

can Ninjascript get the selected ATM parameters?

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

    can Ninjascript get the selected ATM parameters?

    would like to know how to do that...

    #2
    Hello llanqui,

    Thanks for your post.

    You could use Atm Strategy Methods if you would like to submit an entry order with an ATM Strategy Template attached to the order to control stops and targets.

    Atm Strategy Methods: https://ninjatrader.com/support/help...gy_methods.htm

    See the SampleAtmStrategy reference sample that comes default with NinjaTrader demonstrating how Atm Strategy Methods could be used. To view the script, open a New > NinjaScript Editor window, open the Strategies folder, and double-click on the SampleAtmStrategy file.

    Otherwise, there would be no other means available for getting ATM Strategy Template parameters in a custom NinjaScript.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Adding to this thread...

      How can a dropdown list be added to the Script in order to choose the ATM Strategy to use? This is for applying the Strategy to other instruments, where a static ATM strategy does not fill all.

      Comment


        #4
        Hello carlosgutierrez,

        Thanks for your notes.

        Please see the forum thread linked below detailing how to create a custom ATM selector in your script.

        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Thanks Brandon.
          Do you have a link or sample code to see how to add the selected ATM strategy to the executed trade?



          Comment


            #6
            Hello carlosgutierrez,

            Thanks for your notes.

            You could view the sample code shared by my colleague Chris on the forum thread linked in post # 4.

            In the sample, we can see that the name of the public string property is called 'AtmStrategy' which holds the selected Atm Strategy Template name. You could pass AtmStrategy in for the string strategyTemplateName argument when calling AtmStrategyCreate().

            AtmStrategyCreate(OrderAction action, OrderType orderType, double limitPrice, double stopPrice, TimeInForce timeInForce, string orderId, string strategyTemplateName, string atmStrategyId, Action<Cbi.ErrorCode, string> callback)

            See this help guide page for more information about AtmStrategyCreate(): https://ninjatrader.com/support/help...tegycreate.htm
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ageeholdings, Today, 07:43 AM
            0 responses
            10 views
            0 likes
            Last Post ageeholdings  
            Started by pibrew, Today, 06:37 AM
            0 responses
            4 views
            0 likes
            Last Post pibrew
            by pibrew
             
            Started by rbeckmann05, Yesterday, 06:48 PM
            1 response
            14 views
            0 likes
            Last Post bltdavid  
            Started by llanqui, Today, 03:53 AM
            0 responses
            9 views
            0 likes
            Last Post llanqui
            by llanqui
             
            Started by burtoninlondon, Today, 12:38 AM
            0 responses
            12 views
            0 likes
            Last Post burtoninlondon  
            Working...
            X