Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM for CreateOrder and Submit

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

    ATM for CreateOrder and Submit

    In NT7 I could submit an order with the selected ATM using an OIF file....I see this is still available in NT8

    However, there is a slight delay in placing the order with an OIF file and so I want to avoid this in NT8

    The Submit works very well, but it does not have a parameter for ATM strategy

    ?????

    How can I include an ATM name with the Submit()?

    Thx

    #2
    Hello llanqui,

    You can use the StartAtmStrategy method with CreateOrder to start an ATM, you wouldn't use submit in that case.

    Comment


      #3
      Ok, will try that...thanks

      Comment


        #4
        would this work to get the ATM Name for StartAtmStrategy?

        string this_ATM = ChartControl.OwnerChart.ChartTrader.AtmStrategy.Na me;

        Comment


          #5
          ChartControl.OwnerChart.ChartTrader.AtmStrategy.Te mplate

          Comment


            #6
            thank you David

            Comment


              #7
              --- Using Chart Trader values only ---

              First you need the Chart Trader account,
              Account acct = ChartControl.OwnerChart.ChartTrader.Account;

              You'll also need the Chart Trader quantity,
              int quantity = ChartControl.OwnerChart.ChartTrader.Quantity;

              Now create your entry order, such as a Buy Market,
              Order entryOrder = acct.CreateOrder(Instrument, OrderAction.Buy, OrderType.Market, TimeInForce.Day, quantity, 0, 0, "", "Entry", null);

              Now bind the Chart Trader ATM strategy template name to your entry order,
              NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy(ChartControl.OwnerChart.ChartTrader.AtmStrategy .Template, entryOrder);

              Then submit your entry order,
              acct.Submit(new[] { entryOrder });

              -=o=-

              Good reading (with full example from NT support) here.






              Comment


                #8
                Ok, how do I get the name of the ATM Strategy...would prefer to use that so I can also print it....???

                Comment


                  #9
                  Have you tried printing it?

                  Comment


                    #10
                    and...how can I tell if there is no ATM selected? In NT7 I tested for the string <None>

                    Comment


                      #11
                      If that value is null, then no ATM is selected.

                      You'll need to experiment a little here.

                      I don't think it's documented very well, but I presume
                      whatever behavior you do discover, that behavior
                      will be consistent.

                      Comment


                        #12
                        yes, very little doc...will have to give it some time...thanks

                        Comment


                          #13
                          Ok, found what I was looking for

                          ChartControl.OwnerChart.ChartTrader.AtmStrategy.Di splayName

                          this can be used to test for <None>

                          and also works as the text override for StartAtmStrategy

                          will need to do more testing

                          Comment


                            #14
                            well, not sure if it is working right yet...

                            Comment


                              #15
                              yeah, it is working

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              624 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              359 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              105 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              562 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              567 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X