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

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!
      cassb
      NinjaTrader Ecosystem Vendor - Logical Forex

      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.
          cassb
          NinjaTrader Ecosystem Vendor - Logical Forex

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Stanfillirenfro, Today, 07:23 AM
          9 responses
          23 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by George21, Today, 10:07 AM
          0 responses
          6 views
          0 likes
          Last Post George21  
          Started by DayTradingDEMON, Today, 09:28 AM
          2 responses
          18 views
          0 likes
          Last Post DayTradingDEMON  
          Started by navyguy06, Today, 09:28 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          8 responses
          32 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X