Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Suppress Error Popups?

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

    Suppress Error Popups?



    How can I suppress error popups from "the oco id cannot be reused" error?

    I'm running into this error, and am addressing it at the code level with ErrorHandling = IgnoreAllErrorrs. The problem I'm having is, the error popups swamp the machine. I can be testing 500 strategies in Simulation mode. If I run for some hours unattended, I can have over a thousand of these popups generated. This then swamps machine resources, and I need to reboot to restore. It'd be much better if I can log these errors to a file instead, or direct to the output window.



    Your thoughts? Thanks,






    #2
    Hello timmbbo,

    Thank you for your post.

    Please see this forum post for an explanation of this error:
    https://forum.ninjatrader.com/forum/...32#post1094532

    You will need to correct the behavior of your strategy to stop reusing OCO IDs. What orders are you using that use OCO? Are you using the managed approach with Set methods or are you using the Unmanaged approach and using your own OCO ids?

    Remember each OCO needs to have a unique ID. You cannot reset OCO orders, so each pair needs it's own new ID.


    From the Help Guide:

    "Setting this property value to IgnoreAllErrors can have serious adverse affects on a running strategy unless you have programmed your own order rejection handling in the OnOrderUpdate() method"

    https://ninjatrader.com/support/help...orhandling.htm

    Have you programmed your own order rejection handling in OnBarUpdate()?

    Unfortunately, while you can log the errors to a file or have them in the Output window, this will not stop any pop-ups.

    Please let me know if I can assist further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    52 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X