Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Stop Order question

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

    Unmanaged Stop Order question

    Hi NT,

    I saw Brandon answered a similar question recently, so no need to be verbose here in your replies.

    When I placed an unmanaged stop order today, I got an exception saying the stop price can't be above the current price. Can you confirm if this is a restriction? If you place an unmanaged stop order with a stop price that is already breached, does the order get rejected by NT?

    In addition, Do we need to wait for the long/short order to execute prior to placing the stop ?

    Number1
    Last edited by number1; 05-08-2025, 10:57 AM.

    #2
    Hello number1,

    Thank you for your post.

    This message means that the strategy attempted to place an order to the wrong side of the market. Buy stop market orders must be placed above the current Ask price, and sell stop market orders must be placed below the current Bid price.

    You can use GetCurrentBid() and GetCurrentAsk() to make sure that the price you are submitting or changing the order to is a valid price and on the correct side of the market.

    Help Guide: NinjaScript > Language Reference > Common > Analytical > GetCurrentBid()
    Help Guide: NinjaScript > Language Reference > Common > Analytical > GetCurrentAsk()

    Please note that if the error occurred due to market volatility, then there is no way to 100% avoid this occurring, as in volatile markets the market could move so far and fast that this would occur.

    Comment


      #3
      Gaby,

      I understand now. Yes, it was a fast market as has been every day recently. I did have a GetCurrentBid() immediately before the order and placed the stop a point away (emini S&P)

      I wouldn't mind at all for that stop order to be accepted and filled at current price, however. I am sure I am not the first to suggest this, as why not right? (hint, is this a CME thing or a NT restriction (placing a stop order that is immediately activated and executed)? And I apologize in advance, as I must be the millionth person to ask that question. Has to be good reason I am sure).
      Last edited by number1; 05-08-2025, 01:48 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      72 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X