Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Deleting Unexecuted Stop Orders

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

    #16
    Hello mr1997,

    I do not see such an error when I test. I suggest first to redownload the script I have attached and perform the modifications just as I have in the video below.

    Demo - https://drive.google.com/file/d/144c...w?usp=drivesdk

    I may then suggest using a diff tool to compare your modifications to what I have posted, noting that you have added the CurrentBar check, removed the State.Historical check, and also commented out the Account.Flatten code that was given for testing. If the issue comes about from other code modifications, you will want to take debugging steps to understand how your modifications hit this error.

    A publicly available diff utility is linked below.

    Compare text, files, and code (e.g. json, xml) to find differences with Diffchecker online for free! Use our desktop app for private, offline diffs.


    This error would be seen if an object is null at the time it is being referenced. The solution would be to protect that code with a null check, or if the object should not be null, to track down when the object is set to null and when the object is assigned. Tracking down how the object is set to null and assigned can help to identify if an assignment was missed, or if the order object was set to null unintentionally.

    Debugging Tips - https://ninjatrader.com/support/help...script_cod.htm

    Checking for null references - https://ninjatrader.com/support/help...references.htm

    We look forward to assisting.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    116 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    61 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    40 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    43 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    82 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X