Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade Performance DB error

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

    Trade Performance DB error

    When using market replay I am have errors with the trade performance.

    it will either not update when generate is clicked on.

    Or It will keep the results from the previous test I performed.
    I perform a test... generate trade performance... disable the strategy... use the go to function on the market replay... enable the strategy and run the test again with new parameters.

    Below is the error I get when it doesn't update after pressing generate. When it keeps the previous tests results there is no error.

    I do not know if this has anything to do with it but I have never had this problem till I updated NT to the most recent build.

    5/3/2021 3:14:19 PM DB Error on executing DB command: System.Data.SqlServerCe.SqlCeException (0x80004005): A duplicate value cannot be inserted into a unique index. [ Table name = Executions,Constraint name = PK__Executions__0000000000000300 ] at System.Data.SqlServerCe.SqlCeCommand.ProcessResult s(Int32 hr) at System.Data.SqlServerCe.SqlCeCommand.ExecuteComman dText(IntPtr& pCursor, Boolean& isBaseTableCursor) at System.Data.SqlServerCe.SqlCeCommand.ExecuteComman d(CommandBehavior behavior, String method, ResultSetOptions options) at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQue ry() at NinjaTrader.Cbi.Execution.DbAdd() at NinjaTrader.Cbi.DB.DBThread()

    #2
    I can also see this error appearing in the log as the strategy is running.

    Comment


      #3
      Hello sdauteuil,

      Thank you for your post.

      First, what version of the platform are you using? This can be found under Help > About. The current version is 8.0.24.2.

      Are you able to hit this error when using the Sample MA Crossover as the strategy you're testing with? Or do you only see it when testing a specific strategy?

      Thanks in advance; I look forward to assisting you further.

      Kate W.NinjaTrader Customer Service

      Comment


        #4
        I have version
        8.0.24.2 64-bit

        The problem started after I updated to this version. Again I am not sure that has anything to do with the problem.

        Yes I am getting the same errors when using the Sample MA Crossover strategy.

        Thank you

        Comment


          #5
          When I initially connect to market replay it seems to function fine.

          After I complete a test and use "go to" back to the time I started the previous test then I start getting that error.
          It also happens if I simply disconnect from market replay and reconnect after running the initial test.

          If I run the initial test and then disconnect from market replay and restart NT I am not getting the error, at least from the testing I have done.

          It seems that data from the initial test is not being cleared.

          Comment


            #6
            Hello sdauteuil,

            Thank you for your reply.

            I'm unable to replicate this in my testing. It does appear to be a database issue, so let's have you try temporarily renaming your database to see if that resolves it.

            To rename the database please follow the steps below:
            • Shutdown NinjaTrader and Go to the Start Menu
            • Select My Documents--> NinjaTrader 8--> db--> "NinjaTrader.sdf" file (may only say 'NinjaTrader' depending on your Windows File Explorer settings)
            • Right click on NinjaTrader.sdf and select "Rename" *Name it "OLDNinjaTrader.sdf"
            • Then restart the software and NinjaTrader will create a fresh database file to use
            • Test with Playback using the Sample MA Crossover - do you still see the error?
            If the error no longer occurs, you will need to keep this new database. Unfortunately the following items stored in the old database will be lost - Trading Hours templates, Instrument Lists / Custom Instruments, historical trade execution data, saved Strategy Analyzer backtest results.

            Should you need to refer back to the prior database, or the error still occurs with the new database, you may switch back by following the directions above, but naming the current NinjaTrader.sdf to NinjaTraderTEMP.sdf, then renaming OLDNinjaTrader.sdf back to just NinjaTrader.sdf.

            To prevent running into situations where you can potentially lose important data, we advise running regular backups via our inbuilt backup feature in NinjaTrader - https://ninjatrader.com/support/help...up_archive.htm

            Thanks in advance; I look forward to assisting you further.
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              Wanted to pass this along in case somebody has a similar issue in the future.

              I read that the sim101 and market replay accounts are somehow connected.

              I reset the sim101 account and that cleared up the problem.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by DanielTynera, Today, 01:14 AM
              0 responses
              2 views
              0 likes
              Last Post DanielTynera  
              Started by yertle, 04-18-2024, 08:38 AM
              9 responses
              40 views
              0 likes
              Last Post yertle
              by yertle
               
              Started by techgetgame, Yesterday, 11:42 PM
              0 responses
              10 views
              0 likes
              Last Post techgetgame  
              Started by sephichapdson, Yesterday, 11:36 PM
              0 responses
              2 views
              0 likes
              Last Post sephichapdson  
              Started by bortz, 11-06-2023, 08:04 AM
              47 responses
              1,615 views
              0 likes
              Last Post aligator  
              Working...
              X