[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GEN: Metastock format



PureBytes Links

Trading Reference Links

WLBaker628@xxxxxxx wrote:

> Any Realtraders know the details of Metastock data files?  I think that they
> are an ASCII data format but I need to know the nitty-gritty stuff, e.g., the
> number and sequence of the data items, if the records are space-delimited or
> comma-delimited, if the data items are in quotes, etc.  A file attachment of
> a valid Metastock file would also help.  Thanks.

NO, not ASCII.  Metastock (same as the old Computrac) is a binary data format.
Specifically, it uses Microsoft Binary Format (MBF), as used in Microsoft Basic 
random access files, and not the more usual IEEE format.

Up to 255 data files per directory are indexed by a "Master" file, which contains a 
53-byte data record for each data file.  The data files themselves are named as 
Fn.DAT, where n is a number between 1 and 255.  There is no record of the 
symbol or security name in the data file - the Master record must be accessed for 
this. The record length is 28 bytes for the 7-field format (D,O,H,L,C,V,OI) - there is 
also a 5-field format (20-bytes) which omits O and OI.  Both master and data file 
have a header record which references the number of records in the file.  For the 
master record this includes the header record itself, but for a data file it does not!

It will do no good for me to send sample files as you cannot read them with a text 
editor.  I maintain a large database in Metastock format, and have written routines 
to convert from ASCII to MS and vice versa.  I can provide code (in Basic) for this 
to anyone who would find it useful.

Bob Young