Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how to merge database (trade performance) of two computers
Collapse
X
-
Originally posted by patricia70 View PostLast edited by koganam; 02-12-2022, 11:33 AM.
-
koganam thank you so much for your effort and the link. My first try was using CompactView. But when trying to open the file "NinjaTrader.sdf" I got an error that something's missing. Unfortunately the link you posted above contains a dead link to the required service pack. Here's a solution This thread helped. I just downloaded SQLCE 4.0 SP1 as suggested in that thread and after that Compactview was able to open my NinjaTrader.sdf From there on I can view the existing tables "AccountItems, Accounts, Executions, Instrument2InstrumentList, InstrumentLists, Instruments, JournalEntries, Logs, MasterInstruments, Orders, OrderUpdates, Positions, Strategies, Strategy2Account, Strategy2Execution, Strategy2Instrument, Strategy2Order, User2Account, User2MarketDataEntitlement, Users, Versions". The one I need to focus on were Executions, Orders and OrderUpdates. I can run queries and prepare the data I'm looking for.
I will dig into it but I am in good hope to achieve the goal. Thanks so far
and can anyone explain to me, please how the database column "TIME" is constructed? How can I convert this very huge number into a human-reading format to get UTC or LOCAL time ? For example: the date 2021/June/02 09:26:32 (my local time in Germany UTC+1) is shown in NT8 database as value 637582155922190000. How to reverse ?Last edited by patricia70; 02-14-2022, 04:57 AM.
Comment
-
Hello again. It is with some anticipation that I report back. I think I made it! first sample tests look good and I'm very optimistic that more detailed tests will pass as well.
Since only the evaluation tools under NT8-->New-->Trade Performance were important to me, I focused exclusively on the "Executions" table and thus did not consider the "Orders" and "OrderUpdates" further for my use case.
I worked exclusively with the SDF database program "CompactView" as already suggested and mentioned here several times. One must consolidate data, several ways lead to Rome. I did it so that I took the database from the PC (NinjaTrader.sdf) and first created a copy called "testing.sdf". I then worked with it in CompactView. Then I created a new table ExecutionsNB (suffix 'NB' = Notebook) with the same schema and PrimaryKey as the original Executions table. Relationships to the other tables were not important, I proceeded according to the KISS principle (Keep it small and simple). Then I imported the previously exported data from the notebook Executions table into the new ExecutionsNB table created on the PC. Here there was a small hurdle, which I could solve with some additional effort. So I had now in the table "Executions" the data from the PC and in the table "ExecutionsNB" the data from the notebook, both in the same database file "testing.sdf". The column "Id" serves as unique identification, I now had to filter out the duplicates. I read everything from the table "ExecutionsNB" and if ExecutionsNB.Id != Exections.Id then the INSERT INTO command was executed. The number of data series before/after I compared of course, also have many screenshots and backups of before/after.
The ready mixed testing.sdf I copied then on my VM, where I had prepared NT8 freshly installed for the tests. The original NinjaTrader.sdf from the test VM/NT8 I had deleted. The finished testing.sdf was renamed to NinjaTrader.sdf. Ninjatrader8 started without problems and so far everything looks great in trade performance. All trades are listed, now everything seems to be consolidated and I can perform my desired evaluations.
So far again BIG THANK YOU to all the helpful tips here. Am pretty happy
Comment
-
Originally posted by patricia70 View PostHello again. It is with some anticipation that I report back. I think I made it! first sample tests look good and I'm very optimistic that more detailed tests will pass as well.
Since only the evaluation tools under NT8-->New-->Trade Performance were important to me, I focused exclusively on the "Executions" table and thus did not consider the "Orders" and "OrderUpdates" further for my use case.
I worked exclusively with the SDF database program "CompactView" as already suggested and mentioned here several times. One must consolidate data, several ways lead to Rome. I did it so that I took the database from the PC (NinjaTrader.sdf) and first created a copy called "testing.sdf". I then worked with it in CompactView. Then I created a new table ExecutionsNB (suffix 'NB' = Notebook) with the same schema and PrimaryKey as the original Executions table. Relationships to the other tables were not important, I proceeded according to the KISS principle (Keep it small and simple). Then I imported the previously exported data from the notebook Executions table into the new ExecutionsNB table created on the PC. Here there was a small hurdle, which I could solve with some additional effort. So I had now in the table "Executions" the data from the PC and in the table "ExecutionsNB" the data from the notebook, both in the same database file "testing.sdf". The column "Id" serves as unique identification, I now had to filter out the duplicates. I read everything from the table "ExecutionsNB" and if ExecutionsNB.Id != Exections.Id then the INSERT INTO command was executed. The number of data series before/after I compared of course, also have many screenshots and backups of before/after.
The ready mixed testing.sdf I copied then on my VM, where I had prepared NT8 freshly installed for the tests. The original NinjaTrader.sdf from the test VM/NT8 I had deleted. The finished testing.sdf was renamed to NinjaTrader.sdf. Ninjatrader8 started without problems and so far everything looks great in trade performance. All trades are listed, now everything seems to be consolidated and I can perform my desired evaluations.
So far again BIG THANK YOU to all the helpful tips here. Am pretty happy
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by XXtrader, Yesterday, 11:30 PM
|
2 responses
11 views
0 likes
|
Last Post
by XXtrader
Today, 03:07 AM
|
||
Started by Waxavi, Today, 02:10 AM
|
0 responses
6 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
11 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
||
Started by Waxavi, Today, 02:00 AM
|
0 responses
2 views
0 likes
|
Last Post
by Waxavi
Today, 02:00 AM
|
||
Started by elirion, Today, 01:36 AM
|
0 responses
7 views
0 likes
|
Last Post
by elirion
Today, 01:36 AM
|
Comment