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 burtoninlondon, Today, 12:38 AM
            0 responses
            5 views
            0 likes
            Last Post burtoninlondon  
            Started by AaronKoRn, Yesterday, 09:49 PM
            0 responses
            14 views
            0 likes
            Last Post AaronKoRn  
            Started by carnitron, Yesterday, 08:42 PM
            0 responses
            11 views
            0 likes
            Last Post carnitron  
            Started by strategist007, Yesterday, 07:51 PM
            0 responses
            13 views
            0 likes
            Last Post strategist007  
            Started by StockTrader88, 03-06-2021, 08:58 AM
            44 responses
            3,983 views
            3 likes
            Last Post jhudas88  
            Working...
            X