NC CSV Exporter Description
NC CSV Exporter is an indicator for NinjaTrader 8 that exports the historical values of any indicator plot to a CSV file, and it comes with the full C# source code. Sooner or later you want to study your indicator values outside NinjaTrader, in a spreadsheet or in Python, or share them with someone who doesn't use the platform. Copying them by hand from the Data Box is no fun, so I made it a right-click. To be clear: it exports indicator plots, not the price bars themselves.
How it works. Add it to a chart with the indicators you want to export. It draws nothing; it adds an Export Indicator Values item to the chart's right-click menu, which shows up when you right-click with nothing selected. It lists every indicator on the chart by name and, under each one, every plot. Click a plot and the file is written right away. Nothing is written in the background or in real time: one click, one file, with the values the chart has at that moment.
What you get. The file goes to the Export Folder, by default a folder called NCCSVExporter inside your NinjaTrader 8 user folder (usually Documents\NinjaTrader 8), created if it doesn't exist. The file name joins the FileName setting (Inst_1 by default), the indicator name, the plot name and the date and time of the export, like Inst_1_SMA_SMA_20261008_143005.csv, so a new export never replaces an old one. Inside is a Time;Value header and one row per bar that has a value, from the first bar loaded on the chart to the last. Times are written as yyyy-MM-dd HH:mm:ss, values use a dot for decimals, and the columns are separated by a semicolon. The full file path then appears in the NinjaTrader log.
How to use it. Set FileName to something that tells your files apart, like the instrument and timeframe, because the name doesn't include them by itself. Load as much history on the chart as you want in the file, since it exports exactly the bars the chart has. When you open the file in a spreadsheet or in Python, set the separator to a semicolon.
Make it yours. Use it as is, learn from the code, or change it yourself or with AI like Claude. You could add open, high, low, close and volume columns next to the value, put all plots of an indicator into one file, switch the separator to a comma, or append a new row on every bar close. Building the menu, naming the file and writing the rows each live in their own small method, so changes stay simple. Have some good trades!