Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

When stop orders turn to limit orders

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

    #16
    Hihi. Bryan, then checking the status manually tick by tick is not a bad solution

    Pi
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #17
      OK, that's what I thought too. Thank you!

      Comment


        #18
        Originally posted by cassb View Post
        OK thanks. Yes, this is my code to check the state:

        Code:
        string[] entryOrder = GetAtmStrategyEntryOrderStatus(orderIdLong);
                        if (entryOrder.Length > 0)
                        {
                            if (entryOrder[2].ToString() == "Filled" || entryOrder[2].ToString() == "Rejected")
                            {
                                if (GetAtmStrategyMarketPosition(atmStrategyIdLong) == MarketPosition.Flat) orderIdLong = string.Empty;    // Order has been filled and has closed
                            }
        //                    if (entryOrder[2].ToString() == "Working" && Close[0] > )
        //                    {
        //                        if (GetAtmStrategyMarketPosition(atmStrategyIdLong) == MarketPosition.Flat) orderIdLong = string.Empty;    // Order has been filled and has closed
        //                    }
                        }
        This line has me confused though:

        if (entryOrder[2].ToString() == "Working" && Close[0] > x) // cancel a skipped order

        How do I get the price that the stop order was at that was skipped? Do I just need to keep track of that with an internal variable or is this available in a property?

        Thanks!
        Bryan
        You created the order, so you already know the entry parameters, no?

        Comment


          #19
          Originally posted by koganam View Post
          You created the order, so you already know the entry parameters, no?
          Yes... I think the conclusion was that there is no property to check for the stop price when you are using the ATMCreate... methods, so you must keep track of it internally -- unlike the EnterLongStop... method which does have a property for that value.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          558 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X