Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order cancel below Market

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

    Order cancel below Market

    I got the following error in my log today running live SIM:
    8/31/2011 07:20:10 Order MySIM_ImteractiveBroker, Buy stop or buy stop limit orders can't be placed below the market. affected Order: BuyToCover 1 Stop @ 1.4428

    My question is do you have a suggested piece of code for a edit check to make sure this does not happen? I am dynamically moving my stops at particular times and there sems to be a RARE situation where I get this condition.

    #2
    Hello bbucha_stk,

    Maybe submit at the higher of current market price compared to desired stop price.

    myBuyStopPrice = Math.Max(Close[0] + TickSize, myDesiredStopPrice);
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I am struggling with what is wrong in my code?
      First off this issue has been very seldom over many months. First thought it was a market replay issue.
      Maybe if you could better explain what the log is telling me
      The situation was I placed a short and at sometime later I believe I was moving my stop and got the error. Is it saying I tried to place my stop below my target price
      or below the current price

      Comment


        #4
        bbucha_stk,

        The error is stating that the price that the Stop was submitted was not valid by the time it was accepted.

        If you're placing orders very close to the last traded price, the price it is sent might not be valid at this time. For example a Buy Stop order can only be placed above the market.

        If the market is currently trading at 1.4427 and you placed a buy stop order at 1.4428 , but the market quickly jumped to 1.4429 , a buy stop would not be valid at the intended price of 1.4428 and will be rejected.
        MatthewNinjaTrader Product Management

        Comment


          #5
          That is probably what is happenning since the order sits on th IB site.
          So if it gets rejected does your old stop stay in tack or are you "flying without a
          net"...no stop?

          Comment


            #6
            I don't know if this is a IB question...
            So if it gets rejected does your old stop stay in tack or are you "flying without a
            net"...no stop?

            Comment


              #7
              It's a good question, but best to direct to IB their handling for rejected stop orders, both those initially placed at invalid price levels and those modified to invalid levels.

              NinjaTrader default action for strategy orders returned in a rejected state is to stop the strategy, cancel all orders, and close the position.
              Ryan M.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              656 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              371 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              109 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              574 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              579 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X