Need to Plot Historical Market Data

I'm not sure where this thread goes and I apologize in advance if it's in the wrong section.

I have a set of historical market data going back to the year 1900. Data for stock market indices, commodities, financials, etc. However, I'm not sure how to use this data in order to create a chart. I've tried with NinjaTrader with no luck. The data comes in Excel files, by the way.

Would someone be willing to look over the data files and suggest what I could potentially do?
 

The format of the file would need to be something like
https://ninjatrader.com/support/helpGuides/nt8/?importing.htm#UnderstandingImportFileAndDataFormats
File Name
When using the NinjaTrader format, the name of the text file to be imported must be the NinjaTrader instrument name followed by a period and "Last", "Bid", or "Ask" depending on the data type. For example:

MSFT.Last.txt for Microsoft stock last price data
ES 12-09.Bid.txt for the S&P E-mini December contract bid price data
EURUSD.Ask.txt for the Euro/U.S. dollar currency pair ask price data

Daily Bars Format
Each bar must be on its own line and fields must be separated by semicolon (;). Only 1 day bars can be imported.

The format is:
yyyyMMdd;open price;high price;low price;close price;volume

Sample data:
20061023;1377.25;1377.25;1377.25;1377.25;86
20061024;1377.25;1377.25;1377.25;1377.25;27

For example, I created the attached Grains.Last.txt with
Code:
cat Grains.txt | perl -n -e 'use warnings; use strict;
our @mmDays; our $prevCl; BEGIN { @mmDays = qw/0 31 28 31 30 31 30 31 31 30 31 30 31/; }
my $iline = $_; $iline =~ s/[",]//g;
my ($mm, $yyyy, $hi, $lo, $cl) = $iline =~ qr#^(\d\d)/(\d\d\d\d)\s+(\S+)\s+(\S+)\s+(\S+)\s+$#;
if ( !defined($cl) ) { next; }
if ( ! defined($prevCl) ) { $prevCl = $cl; }
print "$yyyy$mm$mmDays[$mm];$prevCl;$hi;$lo;$cl;0\n";
$prevCl = $cl;' > Grains.Last.txt
I don't have NinjaTrader installed, so I just looked at the output.
 

Attachments

Back
Top