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 carnitron, Today, 08:42 PM
      0 responses
      5 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Today, 07:51 PM
      0 responses
      6 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,974 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Today, 06:48 PM
      0 responses
      8 views
      0 likes
      Last Post rbeckmann05  
      Started by rhyminkevin, Today, 04:58 PM
      4 responses
      58 views
      0 likes
      Last Post dp8282
      by dp8282
       
      Working...
      X