Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on executing DB command

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

    Error on executing DB command

    Hello, I have alot of Error on executing DB command : System data exception: ...: A foreign key value cannot be inserted because a corresponding primary key value does not exist messages.
    I am running strategies. is it related with strategy or something different.
    thanks

    #2
    Hello Murphy67,

    This error can happen when switching from Playback to a realtime mode and not re applying the strategy. If you are using playback, please make sure to remove all strategy instances once connected to the realtime account and then re apply the strategy to the correct account.

    If that is not the situation you would need to reset the database, you can use the control center -> Tools -> Database menu to reset the database.

    Comment


      #3
      ıt si real time data.
      I reset the database and reload the chart.
      Now, last bar at 9:00 next bar at 09:45?
      same issue continue....
      Attached Files

      Comment


        #4
        Hello Murphy67,

        I reset the database and reload the chart.
        Did you use playback after doing that? The error message you provided is only known to appear for the use case where a playback strategy is reused in realtime. When you are in realtime are you applying a brand new instance of the strategy and then seeing an error? For example there are 0 strategies listed in the control center and then you apply a new strategy.

        Now, last bar at 9:00 next bar at 09:45?
        From the chart it looks like you may need to reload historical data.

        Comment


          #5
          Hi Jesse, i posted my messages to wrong place sorry.
          Can you pls help my ''data missing'' topic
          i was gonna post it there.

          Comment


            #6
            Hello Murphy67,

            If you made a new post then that went to the reply queue for the area which you posted in, someone will reply to that when we get to that point in the queue for that area. The data question would be separate from the error you are asking about here so that would be the best route anyway so that we can resolve the error/original concern here without going into side issues.

            Last edited by NinjaTrader_Jesse; 05-23-2022, 09:49 AM.

            Comment

            Latest Posts

            Collapse

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