NexusFi: Find Your Edge


Home Menu

 





How to Export DataSeries from NT to Excel?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one MXASJ with 13 posts (28 thanks)
    2. looks_two Fat Tails with 9 posts (6 thanks)
    3. looks_3 Big Mike with 5 posts (0 thanks)
    4. looks_4 Stem1 with 4 posts (0 thanks)
      Best Posters
    1. looks_one MXASJ with 2.2 thanks per post
    2. looks_two baruchs with 1 thanks per post
    3. looks_3 DaveTrading with 1 thanks per post
    4. looks_4 Fat Tails with 0.7 thanks per post
    1. trending_up 41,335 views
    2. thumb_up 43 thanks given
    3. group 27 followers
    1. forum 65 posts
    2. attach_file 20 attachments




 
Search this Thread

How to Export DataSeries from NT to Excel?

  #1 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

My goal is to export entire DataSeries from NinjaTrader to Excel, because I want to do further analysis, basically correlation and distribution analysis.

Searching this and the NinjaTrader forum, I found two potential solutions. I would like to know, whether anybody a bit more advanced in coding than myself has tested this and found it useful. Also I am a bit reluctant to install any unknown DLL's, so would like to hear your comments.


NinjaTrader DDE


(1) There is a NinjaTrader DDE in the download section from bukkan. Has anybody tested this? How do I install it and how can I use it to export DataSeries?

NinjaTrader DDE Connection


CarlosAg Excel XML Writer Library

(2) There is a solution called CarlosAg Excel Xml Writer Library, which was published in 2005.

CarlosAg Excel Xml Writer Library

The library can be addressed by a simple NinjaTrader indicator. This was tested by Roonius in 2009, and it seems to work, although there may be issues with memory leakage and country settings. Files attached below.


Other solutions

I have come across code snippets that either use XML or OLEDB. I s there anybody out there who could give me some detailed hints to follow. I am not an expert, just trying to retrieve the data I need.


Attached Files
Elite Membership required to download: CarlosAg.ExcelXmlWriter.Signed.zip
Elite Membership required to download: SimpleExcelWriter.cs
Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
NexusFi Journal Challenge - April 2024
Feedback and Announcements
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 thanks
  #3 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800


Try this. More importantly, help make it better! I use it with R but as it does OHLC CSVs its easy to import into Excel, and as it is a Stratgey you can use it on a basket of instruments.

I think it is in non-Elite NT7 downloads on this site.

EDIT: Its here :

Attached Files
Elite Membership required to download: ExportData.cs
Reply With Quote
  #4 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


MXASJ View Post
Try this. More importantly, help make it better! I use it with R but as it does OHLC CSVs its easy to import into Excel, and as it is a Stratgey you can use it on a basket of instruments.

I think it is in non-Elite NT7 downloads on this site.

EDIT: Its here :


Thank you, but my intention was not to use R, which I have never used, but to directly export data into Excel workbooks.

Started this thread Reply With Quote
  #5 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

If it is not for live data than a CSV file is a CSV file. I use it for Excel as well. If you need live data then one thing to keep in mind is that DDE has been deprecated.

Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


MXASJ View Post
If it is not for live data than a CSV file is a CSV file. I use it for Excel as well. If you need live data then one thing to keep in mind is that DDE has been depreciated.

No, I do not need it for live data. Basically, I want to run an indicator on a chart during the week-end, and export the results to an excel file, so I can further use the results for analysis.

If you use it for Excel as well, how is this done?

Started this thread Reply With Quote
  #7 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

Here is DBA Daily. Not that exciting as-is but when you think it is a part of Ninja Instrument List I apply the Strategy to... one can get creative. Any Instrument List you can create in Ninja, any time frame (down to the tick if you are paying for that data)>Stratgey Enable/Disable and you have a CSV file (if you chose @"," as a seperator) that you can open in Excel, R, Matlab, or whatever and play with.

The programming isn't brilliant (I wrote it six months ago ) and there is room to make it better, but it does what it does well.

If you have a particular Instrument/Timeframe you want Excel OHLC data for let me know (I'm on IQFeed). Its only a few mouse clicks away.

EDIT: I coded it for OHLCV

Attached Files
Elite Membership required to download: DBA_1_Day.xls
Reply With Quote
Thanked by:
  #8 (permalink)
 
jagui's Avatar
 jagui 
Italy - Roma
 
Experience: Intermediate
Platform: Ninja + proprietary
Broker: IB
Trading: Index futures, Forex, Stocks
Posts: 205 since Jul 2010
Thanks Given: 298
Thanks Received: 313


Fat Tails View Post
No, I do not need it for live data. Basically, I want to run an indicator on a chart during the week-end, and export the results to an excel file, so I can further use the results for analysis.

If you use it for Excel as well, how is this done?


Excel can open .csv files directly. Since the solution creates .csv files, you simply open these files with excel. Then you can save them in native .xls format.

Reply With Quote
Thanked by:
  #9 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271

currently the ninjascript make a dde connection and is designed to pass double value to the client application (like excel). for example Close[0] or SMA(14)[0] etc.

but i suppose theoretically the entire data series (i.e. Close or SMA(14) etc) too can be exported but for that one has to edit the dll. though i have not done that so cant say for sure.

Reply With Quote
Thanked by:
  #10 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



MXASJ View Post
Here is DBA Daily. Not that exciting as-is but when you think it is a part of Ninja Instrument List I apply the Strategy to... one can get creative. Any Instrument List you can create in Ninja, any time frame (down to the tick if you are paying for that data)>Stratgey Enable/Disable and you have a CSV file (if you chose @"," as a seperator) that you can open in Excel, R, Matlab, or whatever and play with.

The programming isn't brilliant (I wrote it six months ago ) and there is room to make it better, but it does what it does well.

If you have a particular Instrument/Timeframe you want Excel OHLC data for let me know (I'm on IQFeed). Its only a few mouse clicks away.

EDIT: I coded it for OHLCV

I have imported the indicator ExportChartData, replaced the path with my folder own documents, and these are the error messages, which I get when running the indicator on a 15 min ES chart:


Quoting 
2010-09-12 19:14:34:500 ERROR: You cannot write and read from the same file at the same time. Please remove SampleStreamReader.
2010-09-12 19:14:34:500 ERROR: Error on calling 'OnBarUpdate' method for indicator 'ExportChartData' on bar 0: A part of the path"C:\Dokumente_und_Einstellungen\...\Eigene_Dateien\ES_12_10Minute15.txt" could not be found.


Started this thread Reply With Quote




Last Updated on April 28, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts