|
|
|
|
Purpose |
Place a bar in an Aspen server database. | ||
|
|
| ||
|
Call Syntax |
#include <aspen.h> … AspenRequest(GLOBAL_session, ASPEN_ApplyBar, &bar_input, NULL); … | ||
|
|
| ||
|
Parameters |
Input A pointer to an ASPEN_APPLY_BAR_INPUT structure.
Output None. | ||
|
|
| ||
|
Structures |
typedef struct { ASPEN_INUM inum; ASPEN_BAR bar; short bar_width; | ||
|
|
| ||
|
Remarks |
bar_width identifies the duration of bar in minutes (usually 15). | ||
|
|
| ||
|
Return Value |
| ||
|
|
| ||
|
See Also |
|||
|
|
| ||
|
Example |
int CAspenRequestDlg::DoASPEN_ApplyBar() { ASPEN_APPLY_BAR_INPUT bar_input; server_list *slp = list; char symbol_xlat[ASPEN_SYMBOL_SIZE]; int retval;
strcpy(symbol_xlat,strSymb); retval = AspenRequest(slp->server_session, symbol_xlat, &a_inum); if (retval == ASPEN_OK) { time_of_day = time(NULL); localTime = gmtime(&time_of_day); localTime->tm_hour = atoi(strHour); localTime->tm_min = atoi(strMinute); localTime->tm_mday = atoi(strDay); localTime->tm_sec = 0; localTime->tm_mon = atoi(strMonth) -1; localTime->tm_year = atoi(strYear) - 1900; ANSITimeToAspenTime(localTime, localTimeZone, &bar_input.bar.time); bar_input.bar.volume = atol(strVolume); bar_input.bar.open_interest = atol(strOI); bar_input.bar.close = atol(strClose); bar_input.bar.low = atol(strLow); bar_input.bar.high = atol(strHigh); bar_input.bar.open = atol(strOpen); bar_input.bar_width = barwidth; bar_input.inum = a_inum; retval = AspenRequest(slp->server_session, &bar_input, NULL); } return retval; } |
©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.