Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IB Short Stock Unavailability Disables Strategy

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

    IB Short Stock Unavailability Disables Strategy

    Hi,

    When running a strategy which places a short order on IB for which shares aren't available for shorting (if manually trading it says your order will be held while IB locates shares), I find that NT immediately disables the strategy.

    Is there a way to deal with this by putting something in the code to bypass this error. Such as if shares of A aren't available for shorting, rather than disabling the strategy, short B as a proxy instead?

    Thanks in advance.

    #2
    Hello wuilengh,
    You can set the Realtime error handling to TakeNoAction so that the strategy does not gets disabled.

    Please refer to our help guide to know more about it
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks, is this problem definitely recognized by NT as an "OrderState.Rejected" though?

      // Rejection handling
      if (order.OrderState == OrderState.Rejected)
      {
      // Stop loss order was rejected !!!!
      // Do something about it here
      }

      Comment


        #4
        Hello wuilengh,
        Yes, the rejected order will be triggered in the OnOrderUpdate event.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, Yesterday, 09:41 PM
        1 response
        20 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, Today, 02:41 AM
        0 responses
        6 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, Yesterday, 11:44 PM
        0 responses
        17 views
        0 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        33 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        32 views
        0 likes
        Last Post CarlTrading  
        Working...
        X