images/contents.gifimages/index.gifimages/prev1.gifimages/next1.gif

Using the Hist Topic

The Hist topic type enables you to display an array of prices derived from one of your Aspen Systems database files. The Hist topic can be used to pass Aspen Systems data to any spreadsheet program that supports DDE. By default, the Hist topic will create a 30-day array of daily prices. However, you can also display arrays based on tick or intraday data and manipulate the time base as you would in a chart.

The syntax for the Hist item is as follows:

images/aspen00000158.gif

You can state the item using any of the parameters shown above. While you are not bound by the order of items as shown above, you may find it helpful to remember this order and use it. Lets look at each parameter separately:

images/aspen00000159.gif

The .INT, or interval, parameter specifies the database file from which you want data. Defining the interval parameter as DAY uses data from the DAYS.DAT file, defining the interval parameter as MIN uses data from the BARS15.DAT file, and defining the interval parameter as TICK uses data from the TICKS.DAT file. The default definition is DAY.

images/aspen00000160.gif

The .SPAN parameter defines the time base. The number you use to define the span parameter is closely linked to your interval definition. For example, a span parameter of 7 can mean three things: 7 days, 7 minutes, or 7 ticks, depending on how you define the .INT parameter. The default is 1 (1 is the SPAN and DAY is the INTERVAL, so the default is 1 day, which is how data is stored in the DAYS.DAT datafile).

images/aspen00000161.gif

The .PRDS, or periods, parameter defines the number of periods returned by the link. The period parameter can be defined at any number that does not create a block larger than 64 Kb. The default is 30, or an array of 30 database records.

images/aspen00000162.gif

The .NEARD, or near date, parameter enables you to specify a date in recent history as the beginning of the array (the array displays data descending by date and, optionally, time). The default is the current date. The date must be entered in MM/DD/YYYY or MM/DD/YY format.

images/aspen00000163.gif

The .NEART, or near time, parameter enables you to specify a time that serves as the beginning of the array (the array displays data descending by date and time). The default is the current time. Enter time in HH:MM format.

images/aspen00000164.gif

The .FARD, or far date, parameter enables you to specify a date that ends the array. Enter dates in MM/DD/YYYY or MM/DD/YY format.

images/aspen00000165.gif

The .FART, or far time, parameter enables you to specify a time that ends the array. Enter time in HH:MM format.

images/aspen00000166.gif

The .MAXDAYS parameter enables you to limit the length of the array using a number of days. Combined with the .NEARD and .NEART parameters, .MAXDAYS can be used to retrieve a defined range of data.

images/aspen00000167.gif

The .QE, or quote element, parameter enables you to specify which database fields you want to appear in an array. The default is to show all fields. Your choices are as follows:

Datafile
Fields
TICKS.DAT
DATE,TIME,PRICE,VOLUME

BARS15.DAT
DATE,TIME,OPEN,HIGH,LOW,CLOSE

DAYS.DAT
DATE,TIME,OPEN,HIGH,LOW,CLOSE,VOLUME,OPEN-INTEREST