Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers
Thanks: 79 times
Was thanked: 149 time(s) in 145 post(s)
MetaStock XV can read 3 Local Data formats:
*MSLocal (New MetaStock format created via MetaStock XV DownLoader)
*Legacy MetaStock (MSFL format created via The DownLoader 11)
The CSV / Text format that MetaStock 13, 14, and 15 read are formatted as follows. Once the data is formatted correctly, you can link the files to MetaStock 15 by double clicking on Local Data Lists within the Power Console and browsing for your data...
A compatible .CSV or .TXT file must start with a header. The header declares the fields and the order they will occur on each row in the file. The fields can be listed in any order desired but must include at least the date and closing price.
The following is an example of a header:
The remaining lines in the local data file contain the actual data. A maximum of 65,550 lines of data is supported.
The field names in the header row are not case sensitive. They can be enclosed in quotes, angle brackets, square brackets or left open. Therefore the date field, for example, could be listed in any of the following ways:
DATE, “DATE”, <DATE>, [DATE], “Date”, date, <DaTe>
The date and time fields must contain a date and time respectively, in a proper format, or MetaStock will be unable to properly read the data. All other fields can contain any numerical value.
[date]. The date of the data contained on the line of the file. Each line of the file must have a date and the dates must be in ascending order (i.e., the most recent date is listed on the last line of the file). The date field has three valid names. Any of the following can be used in the header row:
The DATE field name is the most flexible with respect to the date formats supported (shown below).
Sat, 21 Jan 2008
21 Jan 2008
Important: if the Date field name is DTYYYYMMDD or DTYYMMDD then any time field MUST be named HHMMSS.
[time]. The time of the data contained on the line of the file. This field should only be used if the file contains intraday price data. The following field names are supported for the time field name:
Time values should be entered using a 24 hour clock (e.g., 3:30 PM = 15:30).
The TIME field name supports the following formats:
Important: The HHMMSS field name must be used if the date field was named DTYYYYMMDD or DTYYMMDD
The first hour digit may be omitted for hours 0 - 9. Thus fields formatted this way could use either of the following for the time 9:45 AM:
[open]. The opening price of the instrument.
[high]. The high price of the instrument.
[low]. The low price of the instrument.
[close]. The closing (last) price of the instrument.
[vol]. The volume of the instrument.
[open interest]. The open interest of the instrument. This field name could also be written as [o/i].
Note: The fields other than Date and Time could be used to store any numerical data. However, if the data does not meet the following criteria, the standard prices styles will display in an unexpected manner, if at all
the High must be equal to or greater than the Open, Low, and Close.
the Low must be equal to or less than the Open, High, and Close.
the Open and Close must be between the High and Low
Indicators applied to the chart expect Open, High, Low, and Close prices in the above relationship and run the calculations accordingly. It the data does not meet this criteria, the indicators will produce unexpected, and possibly unusable,results.
Examples of Local Data Files:
This shows how the time must be formatted in conjunction with the DTYYYYMMDD date field name
The following is the minimum number of fields needed for a data file
*Note that the typical order is changed in this example (i.e.; time appears after open and high). The data does not have to be in a specific order as long as the data matches the order in the header row.