here's way to convert tick data from NT to comma-separated format, with Mac or Linux - Platforms and Indicators | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators

here's way to convert tick data from NT to comma-separated format, with Mac or Linux
Started:July 1st, 2012 (04:00 AM) by theorist Views / Replies:1,189 / 1
Last Reply:July 1st, 2012 (04:00 AM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

here's way to convert tick data from NT to comma-separated format, with Mac or Linux

Old July 1st, 2012, 04:00 AM   #1 (permalink)
Elite Member
Los Angeles, California, USA
Futures Experience: Beginner
Platform: TradeStation, AmiBroker
Favorite Futures: ES
Posts: 9 since Jun 2012
Thanks: 17 given, 11 received

here's way to convert tick data from NT to comma-separated format, with Mac or Linux

If you have access to a Mac or Linux box, here's a single line of shell code (using awk) that will convert a tick file from NT (Ninja Trader) format to comma-separated (just substitute the name of your NT-formatted input file, and the desired name of your comma-formatted output file):

awk '{print $1"," $2}' input_file.txt | awk -F ";" '{print $1"," $2","$3}' > output_file.txt

For instance, if this is the contents of the input file:

20090610 153000;00936.00;21
20090610 153000;00935.75;1
20090610 153010;00935.50;1

Then this will be the contents of the output file:


The input file will be untouched.

Awk is very powerful, and can do many other data file manipulations as well.

Here's how you would actually use it on a Mac:
Create a new folder directly under your home directory (it can be anywhere, but this makes it easy). Let's assume you name this folder "data"; save your input file there.
Open the Terminal application (Applications->Utilities->Terminal).
At the shell prompt (which ends with "$" -- not to be confused with the "$" in awk!), type the following, and hit return:
cd data
This will put you in "data" (note it's case-sensitive) ("cd" means "change directory")
To confirm the file is there, type the following and hit return ("ls" means "list"):
This gives you a list of all the files and subfolders within data
Then enter the awk command given above and hit return.

It's the same on Linux, once you open a shell.

For those of you who are curious, here's how it works:

$N in awk means the Nth field in a line. In looking at the NT-formatted input file shown above, awk defaults to thinking there are two fields in each line (because we haven't specified a field separator, it takes the space as the separator). So the first part of the command, awk '{print $1"," $2}' input_file.txt, means take the input file, and, going through it line-by-line, print the first field, then a comma, then the second field; the output of this by itself would look like, for the first line: 20090610,153000;00936.00;21. Now we have to convert the semicolons to commas. So we pipe (using "|") the output of the first awk command to the second, where we tell it (using the -F flag) that the field separators are semicolons. So now awk thinks there are three fields, where the date and time together are the first, the price is the second, and the volume is the third. So the second awk command says to print the first field, then a comma, then the second, then a comma, and then the third (for each line in the input). Finally, the ">" symbol says to output the result to what follows (so here we specify the output file name) (note that ">" means "overwrite and output", while ">>" means "append.")

Last edited by theorist; July 1st, 2012 at 07:43 AM.
Reply With Quote
The following 2 users say Thank You to theorist for this post:

Old July 1st, 2012, 04:00 AM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > here's way to convert tick data from NT to comma-separated format, with Mac or Linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
possible to convert downloaded historical data to replay format (.ntm) gztanwei NinjaTrader Programming 10 August 23rd, 2012 11:37 PM
convert metatrader indicators to easy language for multicharts kdmezz EasyLanguage Programming 1 May 10th, 2011 06:45 PM
Simple template to convert NT Strategy to NT IUndicator visounds NinjaTrader Programming 4 March 31st, 2011 07:16 AM
NT on Mac using Vmware vishwas99 Tech Support 9 March 21st, 2011 10:51 PM
Convert MT4- Indicator-Help : Easy Trend Visualizer Rickb The Elite Circle 4 May 31st, 2010 07:18 AM

All times are GMT -4. The time now is 09:56 PM.

Copyright © 2016 by 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 2016-10-23 in 0.08 seconds with 20 queries on phoenix via your IP