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

Execution order question

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

    Execution order question

    Regarding item: https://ninjatrader.com/support/foru...logic-question

    Based on the response that I received in Platform Technical Support I have a follow up question.

    I have created a custom button that executes market entry orders. And using the NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy method to execute the order for each button click. Do I need to manage my own logic to ensure the target and stop orders for the 1st button click are placed before moving on to next click? Or does NT still handle that for me? So if I double click NT would still make sure that the stop and target orders of my first entry are in place before executing the second click? Thanks!

    #2
    Hello martyn73,

    Thanks for your question.

    StartAtmStrategy will submit your entry order with the ATM strategy attached. When NinjaTrader sees the order fill the target and stop are submitted because NinjaTrader knows the order is attached to an ATM strategy.

    In your mentioned case, I expect both orders will be submitted and have an ATM strategy attached to those orders. You may test the AddOnFramework example to observe this.

    https://ninjatrader.com/support/help...t_overview.htm

    If you want to have your button wait for the original order's stop/target to be placed before submitting the next order, this will require custom logic.

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment


      #3
      "StartAtmStrategy will submit your entry order with the ATM strategy attached. When NinjaTrader sees the order fill the target and stop are submitted because NinjaTrader knows the order is attached to an ATM strategy."

      Yes, this part I understand. What I'm trying to find out is if NT holds/buffers/pauzes that 2nd click entry order until the first ATM strategy has its target and stop orders placed. Or does NT not do this, in which case it's possible that both entry orders (button click 1 and click 2) are send to the broker before the target and stop orders of the first atm strategy are placed? Please see my examples in the referenced post of the two scenarios.

      Comment


        #4
        Hello martyn73,

        Or does NT not do this, in which case it's possible that both entry orders (button click 1 and click 2) are send to the broker before the target and stop orders of the first atm strategy are placed?
        This would be the case, both entry orders would be submitted before the targets and stops get submitted.

        Let us know if there is anything else we can do to help.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kevinenergy, 02-17-2023, 12:42 PM
        118 responses
        2,778 views
        1 like
        Last Post kevinenergy  
        Started by briansaul, Today, 05:31 AM
        0 responses
        9 views
        0 likes
        Last Post briansaul  
        Started by traderqz, Yesterday, 12:06 AM
        11 responses
        28 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by PaulMohn, Today, 03:49 AM
        0 responses
        8 views
        0 likes
        Last Post PaulMohn  
        Started by inanazsocial, Today, 01:15 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jason  
        Working...
        X