Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to merge database (trade performance) of two computers

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

    how to merge database (trade performance) of two computers

    Hey all,

    I have a desktop PC and a notebook. I use ladder one as a backup for my trades or when mobile. I wanna check my trade performance but I'm facing the issue that each computer has different trades in its database.

    Example:

    on day 21/03/2021 I have made 12 trades in the first half of trading day on the notebook. These trades are not visible on my desktop PC and thus not listed in the trade performance on desktop PC. On the second half of that day when I arrived home I continued trading on the desktop PC and made 8 trades. These 8 trades are not listed on the notebook and so I have a mismatch.

    How can I "merge" those two databases so I get a clean and correct view of my trades?

    any help appreciated. Thank you

    #2
    As far as I know, that's not possible.

    EDIT:
    You're best bet may be export an Excel spreadsheet from
    both systems and use your mad Excel skills to merge both
    spreadsheets together.
    Last edited by bltdavid; 12-21-2021, 12:09 PM.

    Comment


      #3
      Hello patricia70,

      Currently there is not an option available to merge information from one database file into another within NinjaTrader therefore this would need to be done manually using for example Excel as bltdavid mentioned.

      You can export your Trade Performance information by right clicking in the Trade Performance window->Export. I have provided a link below to our Help Guide that goes over the Trade Performance window.
      Christopher J.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by patricia70 View Post
        Hey all,

        I have a desktop PC and a notebook. I use ladder one as a backup for my trades or when mobile. I wanna check my trade performance but I'm facing the issue that each computer has different trades in its database.

        Example:

        on day 21/03/2021 I have made 12 trades in the first half of trading day on the notebook. These trades are not visible on my desktop PC and thus not listed in the trade performance on desktop PC. On the second half of that day when I arrived home I continued trading on the desktop PC and made 8 trades. These 8 trades are not listed on the notebook and so I have a mismatch.

        How can I "merge" those two databases so I get a clean and correct view of my trades?

        any help appreciated. Thank you
        Inspired by Erik’s Using LINQ to SQL with SQL Server Compact 4.0 (yes, you can!) blog post, here’s how you make Sync Framework work with SQL Compact 4.0 While the Microsoft documentation is very cl…

        Comment


          #5
          @koganam: sounds complicated to me. Did you try this already on your own with success? If so, what pre-requisits does it need, how do I start?

          @all and NinjaTrader staff: can you give some information on where exactly this data resides on the hard disk? Is this a database file, which database is used, where to find the involved files on the disk ?

          Comment


            #6
            The NinjaTrader database file is contained entirely within one file,
            located at <User>/Documents/NinjaTrader 8/db/NinjaTrader.sdf.

            As previously mentioned,
            You're best approach, IMHO, is export the trade performance data
            to a spreadsheet and merge multiple spreadsheets together.

            Good luck!

            Comment


              #7
              bltdavid ok, found that file. Thanks so far. But when merging into Excel spreadsheet, how should I do that with thousands of lines and some of them are existent in both computers? When I connected from one computer with my Ninjatrader account and disconnect, then connect from other computer in the same day, I got streamed the daily trades and got them saved locally on the other computer, too. That means there are some days (at which I used both computers and connected to my FCM) that contains my trades on both computers. It would need to automatically detect dupes and remove them.

              This way of exporting into Excel spreadsheet is not possible at a manual process because of scalp trading. There are sometimes over hundred trades within a day. Additionally I see no option how to import a "merged" .CSV or Excel spreadsheet back into Ninjatrader8 for better visualization in the Trade performance window. I like to access all the analyzing methods in there.

              Meanwhile I was able to successful access my NinjaTrader.sdf with Compactview it just needed to install the additional service pack SQLCE 4.0 SP 1 as mentioned and suggested on this Compactview thread. After that Compactview was able to open my NinjaTrader.sdf and I see various tables like "AccountItems, Accounts, Executions, Instrument2InstrumentList, InstrumentLists, Instruments, JournalEntries, Logs, MasterInstruments, Orders, OrderUpdates, Positions, Strategies, Strategy2Account, Strategy2Execution, Strategy2Instrument, Strategy2Order, User2Account, User2MarketDataEntitlement, Users, Versions"

              Now I need further help in understanding how to export the needed data and merge it with the NinjaTrader.sdf of my other computer. Can anyone assist further? Thanks a bunch in advance!
              Last edited by patricia70; 02-11-2022, 02:52 AM.

              Comment


                #8
                Hello patricia70,

                Thank you for your note.

                While i can understand your frustration, merging data between two databases is much more complex than merging those using the excel export process that bltdavid described.

                As Chris mentioned there is not a supported method of merging these two databases that we would be able to assist with,

                You'll need to either export the data to excel manually or start over with a fresh database keeping the other in reserve to rename if you'd like to view that information.

                Please let us know if you have additional questions.
                Heath R.NinjaTrader Customer Service

                Comment


                  #9
                  Is it possible to start a fresh-new database and import the pre-exported tables

                  - Executions
                  - Orders
                  - OrderUpdates

                  of the old two databases?

                  Comment


                    #10
                    Hello patricia70,

                    Thank you for your note.

                    No there is no supported method of merging data between these two tables. As mentioned if this is needed for analysis your best solution would be to export the data from the platform to excel and analyze and merge data there.

                    Please let me know if you have additional questions.
                    Heath R.NinjaTrader Customer Service

                    Comment


                      #11
                      but I won't be able to view and use the statistics, graphs, analyzing tool, nice filtering options, etc. that I have in Ninjatrader trade performance window

                      Comment


                        #12
                        Hello patricia70,

                        That is correct.

                        There is no supported way to merge NinjaTrader databases together.

                        Heath R.NinjaTrader Customer Service

                        Comment


                          #13
                          Heath, thanks for your kind reply. No support does not mean it is not possible, does it? I am involved in IT and there is never an expression like "this is not possible". It's just a question of time and effort

                          maybe koganam can shed some light into?

                          Comment


                            #14
                            Hello patricia70,

                            Thank you for your note.

                            To clarify, I am a Platform Support Team Lead here at NinjaTrader and I'm here to make sure all of your questions and concerns are addressed.

                            This is why i specifically stated that it's not supported, it may be possible to do with time consuming database heart surgery but in my experience every users attempt at this has failed and Platform Support would be unable to assist you with this process or any corrections should corruption of the databases occur as a result.

                            Additionally even if it appears to succeed this could result in incorrect table associations that could corrupt the created database down the road or result in trade performance reporting items incorrectly downline.

                            If any of that were to occur, our recommendation is to begin again with a fresh database in the platform or use your most recent database file. If analysis of trades are needed please use the suggested method of exporting to excel.

                            Please note that any errors resulting from an effort to merge these databases would be unable to be corrected by our team and that should you choose to merge these databases, you do so at your own risk of corruption and data loss.

                            Hopefully this clarifies our recommendations here. However we'll leave this post open so the community can provide their feedback as well.
                            Heath R.NinjaTrader Customer Service

                            Comment


                              #15
                              Hello Heath,

                              thanks for the frank words. First of all: The suggestion with the Excel spreadsheet is not an acceptable solution because it lacks all the tools that are available in Ninjatrader8 --> Trade Performance. I would like to see the statistics, the data series, the finely granulated filter options, the data preparation according to weekday, time or other periods, sorting possibilities, right-click->show chart and much more that can be found under "Trade Performance".

                              I appreciate your warning and really understand this. I wouldn't risk anything on my real and main NT8 installation (desktop PC) and database for the reasons you mentioned. However, I thought of it like this: I install a fresh new VM with Windows10 and a fresh new clean install of NT8. Then I import the backup (trade history) made on my desktop PC and so I will get the same trades on the VM NT8 installation as I have on my desktop PC. When succeeding with the merge, I will apply it onto this new VM. All tests would take place on the VM, so there's no risk of breaking my "real" installation on the desktop PC or having corrupt databases and inconsistencies.

                              all testing actions will be done on a separate VM with a fresh new NT8 installation, made only for this testing purpose

                              If the merge works on the VM, I will not execute any trades there. I only want to be able to click on Control Center-->Trade Performance on the VM with the saved data and view the desired statistics in fine granularity. I will do my screenshots, my exports and everything I need from there. When I am finished, I will completely delete the VM and I'm done.

                              Can you or someone else provide some more information on following questions related to the database structure, please?

                              1) in my understanding, I need to focus on the tables Executions, Orders and OrderUpdates. Is that correct?
                              2) what time format is used on NinjaTrader.sdf for example in table Orders and there the column "Time" ? It is obviously not Unix time as I found.
                              3) can you explain what the difference betwenn table "Orders" and "OrderUpdates" is? what is the purpose of the two different table but similar sounding table names and what is the equivalent in Ninjatrader view?

                              any further help appreciated, either from you or from the community.
                              Thanks a lot to everyone!

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by arvidvanstaey, Today, 02:19 PM
                              4 responses
                              11 views
                              0 likes
                              Last Post arvidvanstaey  
                              Started by samish18, 04-17-2024, 08:57 AM
                              16 responses
                              61 views
                              0 likes
                              Last Post samish18  
                              Started by jordanq2, Today, 03:10 PM
                              2 responses
                              9 views
                              0 likes
                              Last Post jordanq2  
                              Started by traderqz, Today, 12:06 AM
                              10 responses
                              18 views
                              0 likes
                              Last Post traderqz  
                              Started by algospoke, 04-17-2024, 06:40 PM
                              5 responses
                              48 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X