Search
futures io


Categories Help    

Search Results
Searching for entries matching export, looking in keywords for any words
Found 6 matching entries

Sort by

Entries
Export Chart Data to a .csv file 5 *
Update for Bug Fix -- 12/11/2017

This version corrects a bug in the elapsed time calculation when a session break occurs. This may or may not be noticeable when a session break occurs during a weekday but is most definitely noticeable over a weekend session break.


Exported with NinjaTrader: 7.0.1000.34 Release Date: 11/17/2017

Indicator Name: fpgExportCsvData

Updated 12/6/2017

Fixes and Enhancements are as follows:

Fixes:
  1. Correct error writing to Closed file on termination
  2. Cleaned up Error messages, Initialization, and Statistical messages
  3. Eliminate extra .csv header on appended file
  4. Eliminate the Print Error option, always print the errors to the Output Window
  5. Other minor fixes

Enhancements:
  1. Remove requirement for the slash before file name
  2. Further qualify the file name by adding "_Detail" to the end
  3. Supports all bar types. Removed the bar type restriction and unneeded override facility
  4. Implemented a directory service to track the created export files.
  5. Shorten the .csv headers to save column space in the excel file.
  6. Added in an ATR, EMA, and SMA with adjustable periods
  7. Implemented the option to include up to 5 other MAs from a list of about 30.

Notes:
  1. The Directory file is in the same folder as the data files
  2. The .csv headers are different in that they are shorter and not very readable. A spreadsheet had been provided for
    both the Detail and Directory files and can be found here.
  3. Even though the headers are different with the exception of the additional columns the order is the same therefore
    any Excel sheets you may have designed can still be used.
  4. The provided and optional moving averages do not plot

Warning:
Installing this version will replace the existing one. Copy the original to a different folder if you need/want to
revert to the previous version.


Original Post Starts here

This indicator collects various chart data and exports the data to a .csv file which can be directly imported into Excel for further analysis. Both the path and filename must be specified by the user. The indicator was designed for traders that may not have Excel on their trading platform or have no need to do any real time analysis.

There are four ways that the data can be filtered as shown below. Data that is filtered by a higher level is passed to the next lower level.
  1. Historical Only, RealTime Only, or Both
  2. All dates (as controlled by the Days to load in the Data Series) or by selected date ranges. Up to 3 non-contiguous ranges date ranges can be specified (but must be in oldest to newest order).
  3. All days of the week or by selected days of the week.
  4. All 24 hours or by selected time ranges. Up to 3 non-contiguous time ranges that can be specified (again in order). The time ranges are specified in 24 hour format.
The input format of the date and time parameters are described in the indicator parameters and must be exactly as shown. However, there is a special use of zeroes and a minus one as follows:
  • A zero in the “Start” field for either the date or time section means to start collecting from the first bar according to what was specified for number 1 above. The zero is only valid for the first entry (pair 1) of both date and time.
  • A zero in the “End” field of either the date or time section means to continue collecting data unless otherwise controlled by a higher level parameter. If Used, a zero in the End field can only be in the last used pair.
  • Although zeroes can be specified in both the Start and End parameters (only in pair 1) of either the date or time section doing so is the same as the “All” option and is internally changed to an All setting.
  • A minus one is used only as a place holder and is not valid in an enabled pair
Notes:
  • If using either non-contiguous dates or times be careful when doing Excel computations between them. An easy way to check for this condition is to check for a break in the sequence of the bar numbers.
  • By default the indicator checks for Renko and Range bars and has been tested with them. However, this check can be turned off so that other bars types can be used, but only limited testing has been performed. If you have a problem with other bar types PM me with the details.
  • The complete path name must be used in the format Drv:\RootFolder\OneOrMoreSubfolders\Filename. If drive is not specified it defaults to the C: drive.
  • The path and filename are separate entries and must be entered as documented in the parameter description. The .csv file extension is automatically added and must not be specified. If the file does not exist it is created. If the file does exist the newly collected data is appended to any data that was previously collected. If for some reason the file cannot be opened an error message is displayed on the chart and a message is written to the NT log that contains additional information. The most likely causes are either the path or path permissions are set incorrectly.
WARNINGS:
  • if the file already exists the data is appended to the file therefore the data can be duplicated depending on the parameters used. This can easily happen if a refresh has occurred without an intervening file name or collection parameter change.
  • In most situations the last data buffer is not flushed out until the indicator is removed, or the chart or workspace has been closed, except as noted below.
Exceptions:
  • If Historical Only data is being collected the first RealTime record stops the recording and the file is closed, and,
  • When the last date range has been collected the recording stops and the file is closed.

In all other situations the indicator, chart, or workspace must be closed to flush the last buffer.

The easiest way to use this indicator is to create a new chart with the desired bar type and Data Series declarations, preferably in its own workspace, and add only this indicator setting the desired parameters. The workspace can be run in the background if RealTime Only or Both are being collected. For Historical Only, set up the data collection in the same way but depending on the amount of historical data being collected it may not necessary to run it in the background as it is relatively fast.

Some programs (Notepad++, …) will allow access to the file even without it being closed. Moving or deleting will require that the file be in a closed state.

Parameter checking is performed and if there are errors a warning message is displayed in the lower right section of the price panel. Also, detailed error messages can be displayed to the Output window if the appropriate parameter is set to true. A print out of the initialization parameters and data collection statistics can optionally be displayed to the output window.

The screen shot shows a partial file that was imported into Excel with the data fields names at the top.

Change Log
Date............Description
12/11/2017......Fixes elapse time calculation over session break
12/6/2017........Fixes and Enhancement described above
11/17/2017......Initial release


Category NinjaTrader 7 Indicators 
 
Suggest other entries I might like
Details: Export Chart Data to a .csv file
Category: NinjaTrader 7 Indicators 


November 17th, 2017
Size: 67.33 KB
Downloaded: 191 times

Keywords: csv excel export
StreamWriter(Strategy) -> export multiple tickers into MySQL 5 *
Essentially, it will export into MySQL full list of tickers that you'd load into the "Instrument" area of the Strategy.
Not the perfect code, however - people are are more than welcome to improve it. I did not test it on a too large list of symbols.


Category NinjaTrader 8 Indicators and More 
 
Suggest other entries I might like
Details: StreamWriter(Strategy) -> export multiple tickers into MySQL
Category: NinjaTrader 8 Indicators and More 


December 17th, 2015
Size: 125.98 KB
Downloaded: 245 times

Keywords: export in ninjatrader of 8 list symbols mysql
Data export 5 *
This is another NT data exporter.
I hope it gives some value over other exporters.
It exports Bar data (time, open, close, high, low, volume) as others and adds values of two indicators of you're choice.
An output file will be created in NT root directory, by a name of an instrument.

p.s.
Thanks to : @Gomi and @NJAMC for the inspiration.


Category NinjaTrader 7 Strategies 
 
Suggest other entries I might like
Details: Data export
Category: NinjaTrader 7 Strategies 


March 1st, 2013
Size: 3.96 KB
Downloaded: 521 times

Keywords: export
ExportData 5 *
I've converted the indicator ExportChartData to a Strategy to make it easier to apply against a basket of instruments. Thanks to BigMike and Sam for some older comments and code that inspired this .

Next releases will include enums to select various DateTime output formats. It is currently outputing POSIX-style DateTime. Feel free to make it better!

Strategy ExportData changelog:

24 February 2011: ver 3.35 posted. Significant refactor. Adds enums for DateTime output formats, delimiters, file types. Adds user-configurable output preferences for export to Matlab and R, and a code example for exporting indicator data with timeseries data.
21 February 2010: ver 3.00 posted
22 February 2010: ver 3.01 posted. Deleted Print statements that were used for debugging and changed an if/if to an if/else to save processor power.
22 February 2010: ver 3.10 posted. Added OnStartUp() and OnTermination() methods and moved code there from OnBarUpdate() for efficiency.
2 November 2010: ver 3.2 posted. Fixed bug where spaces in path names would throw an exception, added better exception handling, added Print statements in OnStartUp() and OnTermination(). NT7b23 compile.

Compatability:
NT7 only


Category NinjaTrader 7 Miscellaneous 
 
Suggest other entries I might like
Details: ExportData
Category: NinjaTrader 7 Miscellaneous 


February 24th, 2011
Size: 5.95 KB
Downloaded: 906 times

Keywords: export mxasj
ExportChartData 5 *
This is an NT7 indicator used to write timestamped OHLC and volume data from the open chart to a text file for analysis outside of NT (Excel, Matlab, R, etc). It gives you the option to use different characters for delimiting files, as well as the option to split Date and Time into two separate fields. Upcoming features include custom DateTime formats.

Feel free to help make it better!

Change Log:
30 Jan 2010. Ver 1.0 posted.
31 Jan 2010. Ver 1.1 posted. Cleans up the code and displays variables for planned future enhancements.
20 Feb 2010. Ver 2.0 posted. Split path and file name options and added filename default to instrument name/barstype/periodicity, which should make batch usage easier. MXASJ stopping development of this as an INDICATOR in favor of a STRATEGY called ExportData which will be posted seperately.


Category NinjaTrader 7 Miscellaneous 
 
Suggest other entries I might like
Details: ExportChartData
Category: NinjaTrader 7 Miscellaneous 


January 30th, 2010
Size: 3.42 KB
Downloaded: 295 times

Keywords: export mxasj
Bardata Export (like for Excel)
This is a very simple strategy that will export the OHLC to a text file. The file path is hard coded because I was lazy and wrote this a long time ago, so open the code and change it or it won't work for you.

While you're in there, you'll see it is easy to get it to write any data you wish.

Mike


Category NinjaTrader 6.5 Strategies 
 
Suggest other entries I might like
Details: Bardata Export (like for Excel)
Category: NinjaTrader 6.5 Strategies 


September 12th, 2009
Size: 1.01 KB
Downloaded: 308 times

Keywords: excel bar data bardata export
 


 
Category
 



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.