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

Check if a filled ATM Limit order is still executing, or has been stopped out.

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

    Check if a filled ATM Limit order is still executing, or has been stopped out.

    Hi,

    When an ATM Limit order has been executed in a Strategy, the 3rd element of the status array shows "Accepted"; when this order is filled, it shows "Filled". It appears that it shows Filled even after that ATM strategy has been stopped out.. How can you determine whether a Filled ATM order is still executing, or has stopped out..?

    Thanks.

    RK

    #2
    Hello RK,

    Thank you for writing in.

    Which order are you referring to as the ATM Limit order? Do you mean the profit target order? Typically, ATM stop loss and profit target orders are tied together using OCO, meaning that if one order gets filled or cancelled, the paired order will be cancelled. If you develop a strategy with the Managed Approach and use SetStopLoss() and SetProfitTarget() together, those orders will also be paired up with OCO. If you are using the managed approach and have created stop loss and profit target orders without the Set methods, they will not be paired together with OCO. You would have to add additional logic to cancel the opposing order when the manually coded stop/target is filled (see the reference sample here) or use the unmanaged approach to create these orders with OCO.

    The order state definitions may be found in our help guide here:


    If this does not help resolve your inquiry, please provide a more specific example advising what order types are being used, which order(s) gets filled, and potentially even a screenshot of what you are referring to.

    Please let me know if I may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      I think I may have the answer. Still checking
      Last edited by rasdaka; 11-11-2022, 05:11 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by lightsun47, Today, 03:51 PM
      0 responses
      5 views
      0 likes
      Last Post lightsun47  
      Started by 00nevest, Today, 02:27 PM
      1 response
      10 views
      0 likes
      Last Post 00nevest  
      Started by futtrader, 04-21-2024, 01:50 AM
      4 responses
      46 views
      0 likes
      Last Post futtrader  
      Started by Option Whisperer, Today, 09:55 AM
      1 response
      14 views
      0 likes
      Last Post bltdavid  
      Started by port119, Today, 02:43 PM
      0 responses
      10 views
      0 likes
      Last Post port119
      by port119
       
      Working...
      X