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,385 / 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 dont 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?

  #51 (permalink)
Elite Member
Boston, MA
 
Futures Experience: Intermediate
Platform: NT & SC
Broker/Data: DDT and SC/CQG
Favorite Futures: NQ, ES, YM
 
bluecrow's Avatar
 
Posts: 42 since Apr 2013
Thanks: 163 given, 44 received

Hi,

I was wondering if anyone is using this great tool to export indicator data?

I managed to get it working by:
- downloading and installing the zip file in post #35 of this thread
- disabling chart trader BEFORE working with the installed strategy
- adding the new strategy and customizing the filename and path (see picture below)
- enabling the strategy by changing it's parameter to "True"

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


The file with your data will look like this.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


I'm working on exporting indicator data using this section of the code:

********************
//This is the best place to modify the code to output indicator data if required.

string data = (Time[0].ToString("yyyy-MM-dd HH:mm:ss") + dataSeparator + Close[0] + EMA(14)[0]);
if (splitDateTime == true)
{
data = data.Replace(' ',dataSeparator);
}

sw.WriteLine(data);
break;
*********************

Does anyone have working examples of how this code can be adapted to export indicator data? The EMA example provided in the code is not working for me. I'm curious if others have managed to get it working for them.

Thanks.

Reply With Quote
 
  #52 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

or you can use thus
https://futures.io/download/ninjatrader-7/strategies/1372-download.html?view

Reply With Quote
The following 3 users say Thank You to baruchs for this post:
 
  #53 (permalink)
Elite Member
Tampere, Finland
 
Futures Experience: Intermediate
Platform: NT, SC, AlphaReveal
Favorite Futures: /ES /YM
 
urghan2's Avatar
 
Posts: 7 since Sep 2012
Thanks: 68 given, 3 received

Lack of data (csv)/ separate data and time columns


Hi guys,

I'm trying to export data from NT. There are two strategies available for download to do this on futures.io (formerly BMT) (links below):

Export Data: https://futures.io/download/ninjatrader-7/misc/339-download.html?view

Data export: https://futures.io/download/ninjatrader-7/strategies/1372-download.html?view

However, there seems to be a bug/deficiency in both of them:

1. At the moment Export Data doesn't export the last 2 months of data. So there's some data lacking form csv file. Lacking data is constantly from the most recent dates. The amount of lacking data varies from time to time. Strategy is downloaded from NT downloads section on futures.io (formerly BMT).

2. Data Export exports all data (thus working correctly), but there's no option available to export date and time columns separately. The option to do that, would make it possible to compare Globex and RTH the way FT71 describes in his Statistical analysis webinar, which is what I'd like to do (among many other things). Doing this manually in Excel is too much work because file has thousands of rows of data. This one is also downloaded from futures.io (formerly BMT) downloads section.

Has anyone a solution to this one?

Thanks in advance,

- J

Reply With Quote
 
  #54 (permalink)
Elite Member
Tampere, Finland
 
Futures Experience: Intermediate
Platform: NT, SC, AlphaReveal
Favorite Futures: /ES /YM
 
urghan2's Avatar
 
Posts: 7 since Sep 2012
Thanks: 68 given, 3 received

Workaround found


urghan2 View Post
Hi guys,

I'm trying to export data from NT. There are two strategies available for download to do this on futures.io (formerly BMT) (links below):

Export Data: https://futures.io/download/ninjatrader-7/misc/339-download.html?view

Data export: https://futures.io/download/ninjatrader-7/strategies/1372-download.html?view

However, there seems to be a bug/deficiency in both of them:

1. At the moment Export Data doesn't export the last 2 months of data. So there's some data lacking form csv file. Lacking data is constantly from the most recent dates. The amount of lacking data varies from time to time. Strategy is downloaded from NT downloads section on futures.io (formerly BMT).

2. Data Export exports all data (thus working correctly), but there's no option available to export date and time columns separately. The option to do that, would make it possible to compare Globex and RTH the way FT71 describes in his Statistical analysis webinar, which is what I'd like to do (among many other things). Doing this manually in Excel is too much work because file has thousands of rows of data. This one is also downloaded from futures.io (formerly BMT) downloads section.

Has anyone a solution to this one?

Thanks in advance,

- J

Hey guys,

Found workaround while still using Data Export. Just export data and modify it in Excel using "DATE" and "TIME" functions to spread date and time to separate columns. Excel ain't my strongest field, but getting better. Thought I'll mention workaround in case someone else has same kind of problem.

- J

Reply With Quote
 
  #55 (permalink)
Elite Member
Barcelona, Barcelona, Spain
 
Futures Experience: Intermediate
Platform: NinjaTrader, TWS
Broker/Data: IB - AMP/CQG
Favorite Futures: Futures, Options
 
DaveTrading's Avatar
 
Posts: 40 since Oct 2010
Thanks: 581 given, 49 received

example for date and time


urghan2 View Post
Hi guys,

2. Data Export exports all data (thus working correctly), but there's no option available to export date and time columns separately. The option to do that, would make it possible to compare Globex and RTH the way FT71 describes in his Statistical analysis webinar, which is what I'd like to do (among many other things). Doing this manually in Excel is too much work because file has thousands of rows of data. This one is also downloaded from futures.io (formerly BMT) downloads section.

Has anyone a solution to this one?

Thanks in advance,

- J

Hello @urghan2,
You can export properly date and time using a specific format but for this you need to modify the code. And for example instead of:

 
Code
Time[0].ToString("yyyyMMdd HHmmss")
or just
 
Code
 Time[0]
You need to have something like this:

 
Code
Time[0].ToString("yyyyMMdd") + dataSeparator +Time[0].ToString("HHmmss")
here is a strategy example.
Hope this help.

DaveTrading.

Attached Files
Register to download File Type: cs urghan2Export.cs (6.7 KB, 27 views)
Reply With Quote
The following 2 users say Thank You to DaveTrading for this post:
 
  #56 (permalink)
Elite Member
Barcelona, Barcelona, Spain
 
Futures Experience: Intermediate
Platform: NinjaTrader, TWS
Broker/Data: IB - AMP/CQG
Favorite Futures: Futures, Options
 
DaveTrading's Avatar
 
Posts: 40 since Oct 2010
Thanks: 581 given, 49 received


bluecrow View Post
Hi,

I was wondering if anyone is using this great tool to export indicator data?

I'm working on exporting indicator data using this section of the code:

********************
//This is the best place to modify the code to output indicator data if required.

string data = (Time[0].ToString("yyyy-MM-dd HH:mm:ss") + dataSeparator + Close[0] + EMA(14)[0]);
if (splitDateTime == true)
{
data = data.Replace(' ',dataSeparator);
}

sw.WriteLine(data);
break;
*********************

Does anyone have working examples of how this code can be adapted to export indicator data? The EMA example provided in the code is not working for me. I'm curious if others have managed to get it working for them.

Thanks.

Hello @bluecrow,

Here there is a simplified working example. (it send data on the folder: C:\TESTNT\)

If you look at the code you can also see that its possible to format the result to have less decimal.
In your code the problem is maybe because there is not the + dataSeparator + section between Close[0] and EMA(14)[0] and also at the end of the line. Compare with the attach strategy.

Im using this king of strategy a lot in a way of a screener in daily timeframe. Then I make my analysis with an MS Access database or Excel.

DaveTrading.

Attached Files
Register to download File Type: cs DbSimpleExampleExportData.cs (8.0 KB, 52 views)
Reply With Quote
 
  #57 (permalink)
Elite Member
Netherlands
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: 6E
 
Zwaen's Avatar
 
Posts: 247 since Dec 2010
Thanks: 762 given, 221 received

Hello,

I have a fairly basic question about exporting minute and tick data in excel. I have an IQ feed subscription and use NT for charting. I want to export minute and tick data to excel to expand analysis. However, regarding the tick data, I don't understand exactly what it represents.

For example, I exported Bid-Ask-Last data for the NQ 03-14 contract for 17 Januari 2014. The High of the day was 3608.75, and 22 contracts were traded at that price:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


However, I can not find this information in the exported Bid/Ask/Last Tick data I exported:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

It seems there is something 'very basic' I do not understand about the data I export/import.

Can someone explain this to me?

Thanks!

One of my worst enemies are my own false assumptions

Last edited by Zwaen; January 20th, 2014 at 04:24 AM.
Reply With Quote
 
  #58 (permalink)
Elite Member
Portland, USA
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: ZS
 
YertleTurtle's Avatar
 
Posts: 210 since May 2011
Thanks: 41 given, 345 received

I got fed up with the available indicators that export data from NT to excel. I don't need to do any of this live so I think there is a simpler solution. All you need to do is create a strategy from the code below (the example uses time, and OHLCV each separated by commas). Open the output window (Tools -> Output Window), pull up the chart that you are interested, add the strategy to the chart and be sure to enable it. Once you run it the output window will be identical to a CSV file. Right click to save it as a text file and you can easily import the data into excel. Its an extra step but I think it is easier.

For those who want to look at 24 hour sessions versus pit sessions you need to create a chart created from 1440 minute bars. In the data series popup you can change the Session template to match the pit hours of your particular instrument. Run the strategy as above and you are done.

I'm sure this can be used to export indicator values as well.

#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Strategy;
#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// enables better export of ninjatrader data.
/// </summary>
[Description("enables better export of ninjatrader data.")]
public class DataPrinter : Strategy
{
#region Variables
// Wizard generated variables
private int myInput0 = 1; // Default setting for MyInput0
// User defined variables (add any user defined variables below)
#endregion

/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
CalculateOnBarClose = true;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnStartUp()
{
Print ("Time,Open,High,Low,Close,Volume");
}
protected override void OnBarUpdate()
{
Print(Time[0]+","+Open[0]+","+High[0]+","+Low[0]+","+Close[0]+","+Volume[0]);
}
#region Properties
[Description("")]
[GridCategory("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
}
}

Reply With Quote
 
  #59 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

Very nice,
Good for you.
Only two remarks:
1. Its better to run a strategy in the strategy analizer. That way you don't need to be connected, don't need a chart.
2. I created a little better strategy. Its in the download section for a long time.

Baruch

Reply With Quote
 
  #60 (permalink)
Elite Member
Portland, USA
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: ZS
 
YertleTurtle's Avatar
 
Posts: 210 since May 2011
Thanks: 41 given, 345 received



baruchs View Post
Very nice,
Good for you.
Only two remarks:
1. Its better to run a strategy in the strategy analizer. That way you don't need to be connected, don't need a chart.
2. I created a little better strategy. Its in the download section for a long time.

Baruch

Thanks for the input Baruch - I'm new to both NT and programming so I'm sure there are better ways to do this. There is also a limitation to how many lines can print using my method so maybe yours improves on this as well.

Reply With Quote

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)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

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 04:38 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-18 in 0.16 seconds with 20 queries on phoenix via your IP 54.221.136.62