Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What limitation are there using a Custom built Add-In

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

    What limitation are there using a Custom built Add-In

    Hello,

    I am working on a custom add-in, that loads a single instrument in a seperate tab instances. and have several questions? The logic behind the tab, goes like this, in each instance of the tab it monitors a folder path for tickets, that contain instructions to place buy/sell order. Also each instance writes a sperate file, that contain things, like a price, order status, market position that another program reads.

    1. how many tabs am i able to load using ninja trader?
    2. The more tabs i load the more un-stable it seems to run is there a limitation on how many tabs that we are able to load?
    3. The bars during the course of when the program runs, are delayed for some instruments a bit, seen a bar come in as late as over 60 second(s) is there an expect time frame that i should expect to receive bars? Or is normal for bars to arrive minutes later at certain times during the day this happens?
    4. Also during startup, i keep track of the connection state for each instrument, the times before each instrument is connected varies, if i request bars before the state is connected, sometime i get a bar, then after because it sent a request to get bars to early in the start-up process while it was still connecting, it stops sending bars all together what is your recommend solution to handle startup, what delay should i use, before i have the program request bars, and perform other startup task that my add-in needs?
    5. The other day, i place a sell order with buy limit order for take and stop for a QTY of 2 using the said add-in, then sometime later, sent request to close the order using buy order, to close the position, on the board it said it was filled. On the order summary, it showed that the buy limit orders were filled too. Which was not what i was expecting, i was expecting the position to close, instead ended up with a position that was still open, and the quantity of 4. Doesn't happen all the time, but it did happen this time, and a few other times. Are the order guaranteed to fill right away or sometime later? Did notice in a past order, i keep track of orders using an internal ticket number.
    6. how many instruments am i able to load and subscribe to at any given point in time using ninja trader custom add-in?
    7. I have worked on other API before, most have rate limitations, do are there any such limitation when using ninja custom i should be aware of? also are there any documentation i can review?

    #2
    Hello digitalsolvers,

    Welcome to the NinjaTrader forums!

    "how many tabs am i able to load using ninja trader?"

    C# does not impose a limit on the number of tabs, that I am aware of.

    "The more tabs i load the more un-stable it seems to run is there a limitation on how many tabs that we are able to load?"

    More tabs would mean more class instances which will require CPU and memory resources. The limit of the resources on each computer will be unique to that computer's hardware. C# itself does not impose a maximum limit of tabs, that I am aware.

    "The bars during the course of when the program runs, are delayed for some instruments a bit, seen a bar come in as late as over 60 second(s) is there an expect time frame that i should expect to receive bars? Or is normal for bars to arrive minutes later at certain times during the day this happens?"

    If in an indicator or strategy is having OnBarUpdate() run late or a BarsRequest from an addon is late, this may indicate that CPU and memory resources are exhausted or could indicate that the instrument is low volume and OnBarUpdate is waiting for tick before updating OnBarUpdate() or the BarsRequest.Update event.
    I would recommend testing a single script at a time to see if the issue is resource related.

    " Also during startup, i keep track of the connection state for each instrument, the times before each instrument is connected varies, if i request bars before the state is connected, sometime i get a bar, then after because it sent a request to get bars to early in the start-up process while it was still connecting, it stops sending bars all together what is your recommend solution to handle startup, what delay should i use, before i have the program request bars, and perform other startup task that my add-in needs?"

    If you need a delay, you could use a timer.


    "The other day, i place a sell order with buy limit order for take and stop for a QTY of 2 using the said add-in, then sometime later, sent request to close the order using buy order, to close the position, on the board it said it was filled. On the order summary, it showed that the buy limit orders were filled too. Which was not what i was expecting, i was expecting the position to close, instead ended up with a position that was still open, and the quantity of 4. Doesn't happen all the time, but it did happen this time, and a few other times. Are the order guaranteed to fill right away or sometime later? Did notice in a past order, i keep track of orders using an internal ticket number."

    Orders will fill once they are in a working state on the exchange (or simulation engine) and a trade transaction occurs on the exchange or a valid price of market data is received to fill the order.
    In historical, fills are calculated from the historical fill algorithm.
    It sounds like a race condition / in-flight-execution where you may have had multiple orders working at the same time that all filled. We suggest if you want to guarantee only one order fills, that you cancel the order, and trigger the submitting of a replacement from the order update of the cancelled order. (for example cancelling a stop order and when its state is state.cancelled, submit a market order to replace it)

    " how many instruments am i able to load and subscribe to at any given point in time using ninja trader custom add-in?"

    This will be limited by your specific computers hardware, as well as the maximum number of simultaneous instrument subscriptions allowed by your data provider or broker.
    With NinjaTrader Brokerage, my understanding is the limit is 200, however I do not have a documentation page that can confirm this.

    "I have worked on other API before, most have rate limitations, do are there any such limitation when using ninja custom i should be aware of? also are there any documentation i can review?"

    Many brokerages do have an order action rate limit.

    With CQG/Continuum the limit was around 10 per second, the NinjaTrader connection type is likely comparable, however I unfortunately do not have any documentation I can point to for this.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi ChelseaB​,

      Thx, for the reply. This helps clear quite a few things up for me. I will reach back out to you if i have any more questions. thx, once again. digitalsolvers

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      80 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      46 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      29 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      66 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X