How to Export DataSeries from NT to Excel? - NinjaTrader Programming | futures io social day trading
futures io futures trading


How to Export DataSeries from NT to Excel?
Updated: Views / Replies:24,248 / 65
Created: by Fat Tails Attachments:20

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 20  
 
Thread Tools Search this Thread
 

How to Export DataSeries from NT to Excel?

  #11 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

The first error would indicate you have two programs trying to access a file at the same time. The way the code works is it opens a file in OnBarUpdate() and doesn't close it until OnTermination() ie you can not access the file until the Strategy is disabled.

It also looks like you are trying your own naming convention for the files. You might want to try the defaults first (UseDefaultFilename = true, in which case the Filename variable is not used by the code). It should look like "ES_12_10_5_Minute." Once it works with the defaults you can then play around to make it suit your needs.

Note I use this on NT7 and haven't tried it on 6.5. Also note declaration "using System.IO" needs to be up top.

EDIT: Just noted you referred to that code as an "Indicator." It is a Strategy. There may still be some older code of mine floating around this site as this was originally started as an Indicator. Suggest you use the one I posted, which is v3.10 released 22.2.2010.


Last edited by MXASJ; September 12th, 2010 at 09:11 PM.
Reply With Quote
The following user says Thank You to MXASJ for this post:
 
  #12 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,599 received
Forum Reputation: Legendary


MXASJ View Post
The first error would indicate you have two programs trying to access a file at the same time. The way the code works is it opens a file in OnBarUpdate() and doesn't close it until OnTermination() ie you can not access the file until the Strategy is disabled.

It also looks like you are trying your own naming convention for the files. You might want to try the defaults first (UseDefaultFilename = true, in which case the Filename variable is not used by the code). It should look like "ES_12_10_5_Minute." Once it works with the defaults you can then play around to make it suit your needs.

Note I use this on NT7 and haven't tried it on 6.5. Also note declaration "using System.IO" needs to be up top.

EDIT: Just noted you referred to that code as an "Indicator." It is a Strategy. There may still be some older code of mine floating around this site as this was originally started as an Indicator. Suggest you use the one I posted, which is v3.10 released 22.2.2010.

Yes, I have used the indicator ExportChartData.cs and applied it to my chart.

There are not two programs trying to access the file. I have only applied the indicator and nothing else. I have not tried any own naming conventions, but this might be due to country settings. So far there are two error messages pointing to a problem with the code.

Prior to this I had tried the stategy, but it did not run either.

Reply With Quote
 
  #13 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received


Sorry to hear that FT. I've got it running on three NT7 beta 21 installs (2 Win7/1 Server 2008R2) without any issue. If it gets figured out what the problem is I'll update my code to make it more robust.

Reply With Quote
 
  #14 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,599 received
Forum Reputation: Legendary


MXASJ View Post
Sorry to hear that FT. I've got it running on three NT7 beta 21 installs (2 Win7/1 Server 2008R2) without any issue. If it gets figured out what the problem is I'll update my code to make it more robust.

I will have a look again. Only had a short try yesterday. There is no urgence.

Reply With Quote
 
  #15 (permalink)
Elite Member
Quebec
 
Futures Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker/Data: Stage 5 trading/AMP/CQG
Favorite Futures: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,697 since Oct 2009
Thanks: 3,041 given, 4,496 received

These two tasks, exporting datas and opening a DDE connection between Excel and the charting app are so easy in Metatrader. Why must this be so complex in a more modern application ?

Reply With Quote
The following user says Thank You to trendisyourfriend for this post:
 
  #16 (permalink)
Elite Member
Calcutta, India
 
Futures Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 259 received


trendisyourfriend View Post
These two tasks, exporting datas and opening a DDE connection between Excel and the charting app are so easy in Metatrader. Why must this be so complex in a more modern application ?

because DDE is obsolete which M$ or .Net (which Ninja is built on) no longer supports.

Reply With Quote
 
  #17 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received


bukkan View Post
because DDE is obsolete which M$ or .Net (which Ninja is built on) no longer supports.

It is also slow and expensive, but I digress...

Reply With Quote
 
  #18 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

Hi Fat Tails,

I fixed a bug in my ExportData code that would throw an exception if there was a space in the path name (such as "My Documents"), and added a Try/Catch block around the StreamWriter functions.

Hope it helps. cs file attached.

Attached Files
Register to download File Type: cs ExportData.cs (8.7 KB, 113 views)

Last edited by MXASJ; October 24th, 2010 at 03:32 AM. Reason: EDIT: Also added an enum to select txt or csv export and tested csv with Excel OK.
Reply With Quote
The following 6 users say Thank You to MXASJ for this post:
 
  #19 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

If anyone finds this using the "Search" function please note the ExportData code has been updated in the Downloads section. The URL is referenced in post #3.

Reply With Quote
The following user says Thank You to MXASJ for this post:
 
  #20 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received

There is the easy way and the harder way



Fat Tails View Post
I will have a look again. Only had a short try yesterday. There is no urgence.

Fat Tails,

There is an older discussion thread on the NT forum that I think might be useful for you:
Problem writing to file during strategy optimisation - NinjaTrader Support Forum

Jon

Reply With Quote
The following user says Thank You to Trader.Jon for this post:

Reply



futures io > > > > > How to Export DataSeries from NT to Excel?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple dataseries Breakout NinjaTrader 28 March 30th, 2015 01:14 PM
How to export a non-indicator from NT aslan Help, Tutorials, and How-Tos 0 July 9th, 2010 11:44 PM
NT7 Beta17, Excel, indicator link export dynamic nanook77 Traders Hideout 3 June 21st, 2010 03:12 PM
Redeclaring a dataseries to use as a trailing stop Davidnmfarrell NinjaTrader Programming 5 April 26th, 2010 01:54 PM
catching dataseries from DoubleMA max-td NinjaTrader Programming 1 June 12th, 2009 07:56 AM


All times are GMT -4. The time now is 05:01 PM.

Copyright © 2017 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
Page generated 2017-12-11 in 0.13 seconds with 20 queries on phoenix via your IP 54.226.132.197