Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy stops OnBarUpdate event

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

    Strategy stops OnBarUpdate event

    I have a strategy which throws the following error in the log.

    6/22/2011 1:39:57 PM Strategy Error on calling 'OnBarUpdate' method for strategy 'RiskStrategy/bab9e0dab3f747e68001d63d27de8fc3': Collection was modified; enumeration operation may not execute.

    The strategy does not crash. It keeps going.

    It seems that the OnBarUpdate() event does not trigger after this.

    The reason for the above error is very involved and I haven't figured out how to fix it just yet. Can you confirm that this is the expected behavior? Any ideas?

    Rich

    #2
    Hi Rich,

    Unfortunately we can't say for sure if it's expected or not. If you have a simplified script and steps to see the issue, we can reproduce here and run it past development.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      resolved

      I figured out how to eliminate the error and then onbarupdate() started working again. thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      110 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      59 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      37 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      41 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      78 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X