Import Executions into NT7 - futures io
futures io futures trading



Import Executions into NT7


Discussion in NinjaTrader

Updated
    1. trending_up 1,203 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Import Executions into NT7

(login for full post details)
  #1 (permalink)
Luxembourg
 
Experience: Advanced
Platform: NinjaTrader
Broker: IB / Kinetick
Trading: ES, CL
 
Fadi's Avatar
 
Posts: 485 since Apr 2012
Thanks: 664 given, 645 received

Hi Guys
Do you think there is a practical way of importing a full database of executions into NT7 for displaying and feeding the performance tab reports and graphs?

I wish to import all my 2013 trades in NT7 as I did not connect it everyday to my broker's account, and was trading from outside NT7 on my any occasions...

I've found in the user's guide a very unpractical and manual way of inserting executions in the system; that works perhaps for adding a couple of trades, but can't do for 500+ trades unfortunately.

Can we force this through customized programming, or manual modifications of the underlying DB files?

Thanks
Fadi

Successful people will do what unsuccessful people won't or can't do!
Follow me on Twitter Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Short Interest Ratio indicator?
ThinkOrSwim
What blockvolume is visible? - order processing
NinjaTrader
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
Reading A set of Trading Signals
EasyLanguage Programming
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Battlestations: Show us your trading desks!
111 thanks
Selling Options on Futures?
109 thanks
Rank your Futures vs Stocks trading priority
37 thanks
Want your NinjaTrader indicator created, free?
26 thanks
Bitcoin storage wallet recommendations
18 thanks
 
(login for full post details)
  #2 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,787 given, 4,494 received

It might be possible in feeding the nt_execution table. But it's a bit tricky, as you'll need to find the instrument id, and so on.


Fadi View Post
Hi Guys
Do you think there is a practical way of importing a full database of executions into NT7 for displaying and feeding the performance tab reports and graphs?

I wish to import all my 2013 trades in NT7 as I did not connect it everyday to my broker's account, and was trading from outside NT7 on my any occasions...

I've found in the user's guide a very unpractical and manual way of inserting executions in the system; that works perhaps for adding a couple of trades, but can't do for 500+ trades unfortunately.

Can we force this through customized programming, or manual modifications of the underlying DB files?

Thanks
Fadi


Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
 
(login for full post details)
  #3 (permalink)
Luxembourg
 
Experience: Advanced
Platform: NinjaTrader
Broker: IB / Kinetick
Trading: ES, CL
 
Fadi's Avatar
 
Posts: 485 since Apr 2012
Thanks: 664 given, 645 received


Do you know where can I find the nt_execution table?

Successful people will do what unsuccessful people won't or can't do!
Follow me on Twitter Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,787 given, 4,494 received

It's in ninjatrader.sdf .

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
 
(login for full post details)
  #5 (permalink)
Luxembourg
 
Experience: Advanced
Platform: NinjaTrader
Broker: IB / Kinetick
Trading: ES, CL
 
Fadi's Avatar
 
Posts: 485 since Apr 2012
Thanks: 664 given, 645 received

Thank you Sam
File located, but trying to open it with CompactView, and having some issues...
Are you editing this sdf file with Visual studio usually?

Successful people will do what unsuccessful people won't or can't do!
Follow me on Twitter Started this thread Reply With Quote
 
(login for full post details)
  #6 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,787 given, 4,494 received

See a skeleton, used for an external program wrote in C# with VS :

 
Code
                            
            string path Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Ninjatrader 7\db";

            const 
string dbName "NinjaTrader.sdf";
            
SqlCeConnection c;
            
= new SqlCeConnection("DataSource=" path + @"\" + dbName + ";File Mode=Read Only;Temp Path=" + path);
            c.Open();

            string query = "
select a.marketposition,a.quantity,a.price,b.expiry,c.name,a.executiontime,d.name,a.pos,a.counterid" +
                " 
from nt_execution a,nt_instrument b,nt_masterinstrument c,nt_account d" +
                " 
where a.instrument=b.id and b.masterinstrument=c.id and a.account=d.id" +
                " 
order by a.executiontime";

            SqlCeCommand cmdGet = new SqlCeCommand(query, c);
            SqlCeDataReader reader;

            reader = cmdGet.ExecuteReader();

            while (reader.Read())
            {
                int m = (int)reader[0]; // L ou S
.... 
But like I wrote earlier, a bit tricky...

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
The following 2 users say Thank You to sam028 for this post:
 
(login for full post details)
  #7 (permalink)
Gits (Hooglede) Belgium
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,991 since Sep 2013
Thanks: 2,437 given, 5,801 received


Fadi View Post
Thank you Sam
File located, but trying to open it with CompactView, and having some issues...
Are you editing this sdf file with Visual studio usually?

Just in case if anybody else is bumping into the same problem : "Unable to open database : Internal Error : cannot open the shared memory region."... I'm writing it down here for the record... as other members may bump into this also, and find the answer helpful.

Took me 1/2 day to figure it out (thanks to MSF with their clear error message), as i don't have this on my other machine and only on this machine. I did a lot of things to nail the problem down. Uninstalling all the SQL xxx drivers and programs (i don't use it), only installing sql ce 3.5 (be sure to focus on the right version, or NT will crash after many orders) to find the the problem is exactly the same

The break-through came when i copied the "ninjatrader.sdf" file to my desktop, there it opens without any problem/error, conclusion, it's a rights issue (the error message doesn't tell you so)

The final solution is to run compactview as admin (right click, run as..)

I have this only on one of my machines...

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to rleplae for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > Import Executions into NT7


Last Updated on January 14, 2017


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts