Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Read lock / write lock - deadlock error

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

    Read lock / write lock - deadlock error

    I have an indicator which is loading multiple timeframes, one of them being a 1 tick bar series as required for the OrderFlowCumulativeDelta (OFCD) to work. This indicator is then loaded inside a strategy that also loads the same data series in the state.configure

    When I enable the strategy I get this error:
    Code:
    'OrderFlowCumulativeDelta' tried to load additional data. All data must first be loaded by the hosting NinjaScript in its configure state. Attempted to load ES 03-23 Globex: 1 Tick
    Indicator 'pivotsCDdiv': Error on calling 'OnBarUpdate' method on bar 974: Write lock may not be acquired with read lock held. This pattern is prone to deadlocks. Please ensure that read locks are released before taking a write lock. If an upgrade is necessary, use an upgrade lock in place of the read lock.
    Not sure how to troubleshoot this. How do I make sure all data is loaded? Is the hosting script the strategy or the indicator?​

    #2
    SOLVED. Solution: I had a line where I did not reference the indicator as the variable instance defined in state.configure

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    421 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    279 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    239 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    326 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    288 views
    0 likes
    Last Post CarlTrading  
    Working...
    X