Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalculateOnBarClose=False: Queue processing velocity?

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

    CalculateOnBarClose=False: Queue processing velocity?

    In general, the processing velocity of incoming data and taking action of NT is pretty good for a vast majority of Strategies, above all, when CalculateOnBarClose=True; but now I'd need to know more accurate info when a strategy works with CalculateOnBarClose=False.

    When CalculateOnBarClose=False, each incoming ticks is processed by the Strategy's logic, so when the flow of incoming ticks is at "normal pace" , NT will work it out with no issues at all. Now, let's imagine that the incoming ticks are at very fast pace, under this situation, I'm aware that NT has a queue feature in order to process all incoming data, but now I have the doubts:

    1. Will NT process every single tick, regardless the cumulative amount ?

    2. What would NT do, if among those incoming ticks, a couple of trigger signals pop ? will it simply work the last signal trigger sending corresponding orders, because at such a high velocity was impossible to send the previous's signal orders?

    3. Is it possible that the queue could be overflow, thus crashing the Strategy and NT ?


    Thanks in advance

    #2
    Hi pstrusi,

    1. No, if there are too many queued events this can stop the script with an error.
    Something along the lines of:
    "Error on calling the 'OnOrderUpdate' method for strategy 'StrategyNameHere': More than 100 subsequent user events."

    The data comes in on another thread and will continue to be received steadily.

    2. If you are asking if you submit an order on one queued tick and continuously submit a new order on each new tick, this is going to overload any CPU and NinjaTrader is going to freeze. Most brokerages even have a limit to how many orders can be send within a certain amount of time and how quickly two orders can be sent back to back.

    3. Yes, if the error appears your script will stop. If the script stops NinjaTrader will continue functioning.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hi pstrusi,

      1. No, if there are too many queued events this can stop the script with an error.
      Something along the lines of:
      "Error on calling the 'OnOrderUpdate' method for strategy 'StrategyNameHere': More than 100 subsequent user events."

      The data comes in on another thread and will continue to be received steadily.

      2. If you are asking if you submit an order on one queued tick and continuously submit a new order on each new tick, this is going to overload any CPU and NinjaTrader is going to freeze. Most brokerages even have a limit to how many orders can be send within a certain amount of time and how quickly two orders can be sent back to back.

      3. Yes, if the error appears your script will stop. If the script stops NinjaTrader will continue functioning.
      Hi Chelsea,

      Thank you very much for your answer. It remains just a doubt:

      - What does exactly work that The data comes in on another thread and will continue to be received steadily ? Does this mean that the Data will continue to be registered in the database as always or in a special file?

      - By the way: what is the limit queued events that NT could process? I imagine that if you had a very fast strategy's logic, this could help to have a lower queue
      Last edited by pstrusi; 10-08-2015, 07:30 AM.

      Comment


        #4
        Hello pstrusi,

        Data is received on a different thread than the UI thread running the script.

        In other words, if you have a SuperDOM open with that instrument the data will still be coming in at normal speed. In other words, the queuing only happens for the script.

        The default limit is 100 subsequent events. However, I think this number can be increased. (I would not recommend increasing this as the error is appearing because you have overloaded the CPU and it was not able to process them before 100 ended up queued)
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by carnitron, Today, 08:42 PM
        0 responses
        5 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        6 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,974 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        8 views
        0 likes
        Last Post rbeckmann05  
        Started by rhyminkevin, Today, 04:58 PM
        4 responses
        58 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Working...
        X