SNAPSHOT.C -
A Q & D program to load 1 to 4 charts and (and possible indicators)
maybe then call the resident EPSON driver for a snapshot suitable
for printing with G_RPT.
TDF_Lib buyers - sorry but this program release is meant only as a demo
program of the graphics subsystem so I have AWK-ed out EPSON printer stuff
and some proprietary indicators.
Function
|
main
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void main( int argc , char *argv[] )
|
Remarks
|
Program entry point: expected command line input -
SNAPSHOT ticker_str [ ticker_str ... ]
|
Function
|
local_exit
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void local_exit( int exit_code )
|
Remarks
|
Master program exit catcher. All fatal library errors will also come here.
|
Function
|
final_exit_cleanup
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void final_exit_cleanup( int exit_code )
|
Remarks
|
Do final image-rundown cleanup here. Also force debug_flag to TRUE if
exit_code != SS_NORMAL.
|
Function
|
cntl_c_handler
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void cntl_c_handler( void )
|
Remarks
|
Catch Cntl C so we can exit via exit() and get a full file flush
and close on any open files as well as any local rundown.
|
Function
|
math_exception_handler
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void math_exception_handler( int status_word , int error_type )
|
Remarks
|
Catch math errors so we can exit via exit() and get a full file flush
and close on any open files as well as any local rundown.
|
Function
|
dspy_debug_hook_vars
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void dspy_debug_hook_vars( int exit_code )
|
Remarks
|
Display program defined debug vars at image-rundown if debug_flag == TRUE.
|
Function
|
output_a_timestamp_msg
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void output_a_timestamp_msg( char *msg )
|
Remarks
|
Output a message with a time stamp to the tube.
|
Function
|
cnvt_cmd_ln_args
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void cnvt_cmd_ln_args( void )
|
Remarks
|
Convert, validate or store command switches here.
|
Function
|
allocate_data_structures
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void allocate_data_structures( void )
|
Remarks
|
Allocate the program GLOBAL variables.
|
Function
|
free_data_structures
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void free_data_structures( void )
|
Remarks
|
Deallocate the program GLOBAL variables.
|
Function
|
calc_cycle_position
|
Include file
|
SNAPSHOT.H
|
Prototype
|
float calc_cycle_position( int cycle_length , int cur_offset )
|
Remarks
|
Calculate the current position in a cycle, return x where 1 >= x >= -1
with 1 = top of the cycle & -1 = bottom of the cycle.
|
Function
|
auto_select_a_scr
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void auto_select_a_scr()
|
Remarks
|
Draw a specific pre-programmed chart by command line request. Only case 1
currently defined in this demo ( 1 is setup to chart a passed-in ASCII file
from a CSTM_RPT log). In my version of this program I use about 10
pre-defined screens which are selected at call time by the calling program
for different overlays. You would use this version like this - given a
# IND_EXP.TPL - CSTM_RPT export demo template file
date # the date will log automatically
high log # will output as the second field on each line
low log # etc.
close log
vol log
rsi 14 log # this will be exported in the 6th field - open
ema 3 rsi_14 log # and this in the open interest field
# end IND_EXP.TPL
then run CSTM_RPT and request logging of the last 50 records
CSTM_RPT IND_EXP.TPL DOW /L50 /onul
this will then produce an ASCII file named CSTM_RPT.LOG containing the
exported data which can instantly displayed by using -
SNAPSHOT /A /s1 CSTM_RPT
/A means ASCII file, /s1 - auto_select scr # 1, and CSTM_RPT means that
the ASCII ticker to load is CSTM_RPT.
|
Function
|
support_chart_movement
|
Include file
|
SNAPSHOT.H
|
Prototype
|
void support_chart_movement( void )
|
Remarks
|
Support movement between the series of charts for DEMO #3 - 1 ticker calls.
|
Table of Contents
Function Index
generated on 08 February 1998 - 14:44:11
© 1998 Tierra del Fuego Ltd.
|