Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a way to programmatically know a ticker can't be shorted?

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

    Is there a way to programmatically know a ticker can't be shorted?


    LCID is an example of one such ticker. When you try to short, your order gets rejected with a message: "rejected by broker".

    Are there any NT8 API calls that I could use to determine that this is b/c this ticker can't be shorted at all? Or does a human have to get involved and notice that the ticker never accepts shorts? Or I guess my algo could try shorting X number of times and conclude after the 3rd or 4th rejection that it's not possible on this ticker.

    The real issue is that I am trading across a dynamic and potentially large set of tickers, and I'm trying to avoid having to implement a discovery process on each one where I have to store out in the file system whether it can be shorted or not.

    Do you have any suggestions?

    Cheers.

    #2
    Hello carnitron,

    There would not be any specific NinjaScript method for that. You would need to make your own condition and check the instruments name to delegate how your logic can work. The only other alternative would be to turn off rejection handling and you could then observe those rejections from OnOrderUpdate.





    JesseNinjaTrader Customer Service

    Comment


      #3
      Hmm, ok. I'm using an AddOn, btw. Does the market in general have a standardized way of handling this kind of discovery, such that APIs could be added to NT8 to support this kind of check? Or is the reason NT8 hasn't implemented it, is b/c it doesn't really exist, and the way to figure out whether a kind of trade works on a given ticker/exchange is to try it? And this applies to everyone, from vendor to hedge fund to retail trader?
      Last edited by carnitron; 11-10-2023, 01:37 PM.

      Comment


        #4
        Hello carnitron,

        That's not something which can be checked by any NinjaScript method so that wouldn't be something you could do using the features of the platform. The majority of brokers have their own sets of rules for trading so that would be highly depending on the broker being used if you were to get a rejection for an specific action.

        The only way to avoid those rejections would be to make a list of instruments that you can't short and implement logic to avoid shorting those instruments. The alternate would be to monitor for rejections using OrderUpdate event and handle it accordingly if a rejection is seen.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          The alternate would be to monitor for rejections using OrderUpdate event and handle it accordingly if a rejection is seen.
          IMO This is what you should do if you want to do it in a broker-independent way.
          Bruce DeVault
          QuantKey Trading Vendor Services
          NinjaTrader Ecosystem Vendor - QuantKey

          Comment


            #6
            Ok thanks for the info guys. I've come to the conclusion I'm going to need to track per ticker audit data out in the file system anyway, adding another field that indicates the ticker never accepts shorts shouldn't be too hard.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by giulyko00, 04-24-2024, 12:03 PM
            9 responses
            43 views
            0 likes
            Last Post giulyko00  
            Started by memonic, Yesterday, 01:23 PM
            2 responses
            24 views
            0 likes
            Last Post memonic
            by memonic
             
            Started by merc410, Today, 03:41 AM
            2 responses
            15 views
            0 likes
            Last Post merc410
            by merc410
             
            Started by sugalt, 04-30-2024, 04:02 AM
            2 responses
            13 views
            0 likes
            Last Post sugalt
            by sugalt
             
            Started by Ndakotan1313, 03-14-2024, 05:02 PM
            2 responses
            64 views
            0 likes
            Last Post blaise_code  
            Working...
            X