Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

OnOrderUpdate with more than 100 user events

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

    OnOrderUpdate with more than 100 user events

    Hi guys,
    a strategy places a lot of orders at once, to form a ladder of entry orders. It seems to be causing the "more than 100 user events"inside OnOrderUpdate() just from valid order state changes. I count 105 sequential lines in the log to do with order state changes.

    Is this a known limitation, and thus not "too many" orders can be placed at once? Or is this definitely NOT the problem and I need to look further?

    Thanks,
    saltminer

    #2
    Hello,

    This is a warning letting you know the strategy is submitting too many orders at once, was this intended to submit the orders in this way?

    If not this would need to be controlled logically, depending on the chart series this will be running on and your other requirements this can be accomplished in multiple ways.

    It sounds like something is either causing a loop and triggering multiple orders or there is no logic checking if you are already in a position before submitting an order.

    If you would like to post the script we could take a look at it and see what logic is being used and determine why that is happening.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I cannot post the code as it is both proprietary to a customer and very lengthy.

      It is placing 17 Limit entry orders at once, as a ladder. It is all the order state changes of this single collection of orders (NOT in a loop) that created over 100 events to OnOrderUpdate().
      I realise I can issue some limited number of orders in any one occasion, for example issuing 10 on this tick and 7 on the next, however my main question is "Is this actually the problem?". Can many correctly issued orders on the one tick generate this error?

      Thanks,
      saltminer

      Comment


        #4
        Hello,

        This is not an error, this is the way the platform was designed to detect these type of occurrences. Because there is a warning being displayed this means there is internal code checking for this to happen.

        I have never tried in this situation but there is a unsupported property that is for Custom User Events which this may or may not fall into. You can try this to see if it clears the message for you, if not I am unsure if there would be a way around the message as this is built in aside from what you had mentioned in the prior message.

        I would try this on my end first but it may take me longer to create a script that re produces the message than it would for you to try it so I think this would be more efficient.

        Code:
        MaxProcessedEvents = 500;
        This would go in the Initialize section, please try this and if you could let me know either way if that resolves the message for you that would be great. There is no documentation on this property so I only know of one situation where this is used but relates to your question as far as the warning message it supresses.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        30 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        943 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        9 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        4 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        28 views
        0 likes
        Last Post wzgy0920  
        Working...
        X