The Hull Moving Average (HMA) was developed by Alan Hull and is mainly used to identify the current market trend. The HMA is composed of three weighted moving averages (WMA).
The Exponential Hull Moving Average (EHMA) has those weighted moving averages replaced with exponential moving averages.
The Exponential Hull Moving Average exhibits an excellent balance between smoothing and lag (also see "Moving Averages for Financial Data Smoothing" by Aistys Raudys, Edmundas Malčius, and Vaidotas Lenčiauskas – Vilnius University, Faculty of Mathematics and Informatics)
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:
Correct error writing to Closed file on termination
Cleaned up Error messages, Initialization, and Statistical messages
Eliminate extra .csv header on appended file
Eliminate the Print Error option, always print the errors to the Output Window
Other minor fixes
Enhancements:
Remove requirement for the slash before file name
Further qualify the file name by adding "_Detail" to the end
Supports all bar types. Removed the bar type restriction and unneeded override facility
Implemented a directory service to track the created export files.
Shorten the .csv headers to save column space in the excel file.
Added in an ATR, EMA, and SMA with adjustable periods
Implemented the option to include up to 5 other MAs from a list of about 30.
Notes:
The Directory file is in the same folder as the data files
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.
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.
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.
Historical Only, RealTime Only, or Both
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).
All days of the week or by selected days of the week.
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
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.
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.
Use this in Strategy Analyzer like any other Ninja Trader 8 strategy.
// NOTE: Make sure that historical data exists first. To do so, connect to your Data Source and then
// Go to Tools -> Historical Data,
// then click Load tab,
// then under Download section, select Instrument(s), Intervals, Start/End Dates, Data Type,
// then click Download
--------------------------------------------------------------------------------------------------------------------
CHANGE LOG:
version 4.3
// 23 February 2017 ver 4.3 MURTY ROMPALLI: Fixed non-working default properties, Added NOSEC formats (NOSEC stands for NO SECONDS in time field. If exporting 1-minute bars, skipping :00 seconds saves disk space)
version 4.2
// 25 October 2016 ver 4.0 NT 8 version released by MURTY ROMPALLI; Will not work with older versions
// 26 October 2016 ver 4.1 MURTY ROMPALLI: Code cleanup and simplification
// 28 October 2016 ver 4.2 MURTY ROMPALLI: Support for Stocks, Code improvement
// KNOWN PROBLEMS:
// Throws errors: "Error on calling OnStateChange method: Object reference not set to an instance of an object
version 4.0
25 October 2016: ver 4.0 NT 8 version released by MURTY ROMPALLI; Will not work with older versions of Ninja Trader
October 25th, 2016
Size: 6.12 KB
Downloaded: 233 times
1763
murty
Printing to the log is good for debugging, but sometimes I end up with loads of entries in the output window, and I have no idea which indicator on which chart triggered the printout. I have therefore written a global method, which can be used for printing to the Output window for debugging purposes.
level: log level 1-5. A corresponding number of "*" are prefixed to the text.
In addition the following information is printed by default:
* Instrument.MasterInstrument.Name
* BarsPeriod.BasePeriodValue.ToString()
* BarsPeriod.BasePeriodType.ToString()
* Time[0].ToString()
and finally the text passed to the method is added to this string.
This global method obviously cannot be run as a standalone indicator, but can be used in your own indicators to print to the Output window.
October 19th, 2016
Size: 1.24 KB
Downloaded: 48 times
1761
Geir
FatTail_AdvBar is a paintbar study to show volume on advanced bar types. I have no idea where I got the original code which I chopped up and changed. I use this on a Kase Bar chart OHLC- makes a nice candle volume appearance. Use on a Renko chart with the box color completely transpareant to see gaps and highlight support and resistance areas. The bar width is determined by volume over n periods and the color gets brighter based on the uptick/downtick ratio. I have RedGreen set to false, show color= true, show Tails True. Mess around with the length to get the volume representaion you like.