CSTM_RPT module routines

Company Information Software Products TDF Market Reports Download Area take me Home

CSTM_RPT.C

A program to easily run multiple indicators and systems in parallel against a data set and then generate a custom report for the user.

The basic program logic is that the user gives us a report template file and 1 (or more) data ticker strings. We first process the template file into process records. The template lines consist of file constant verbs or action verbs. The concept is that process records process data items into output values. Once the template file is parsed, each of the user requested data files are loaded in turn and run against the report template.

Function main
Include file CSTM_RPT.H
Prototype void main( int argc , char **argv )
Remarks Program entry point: expected command line input - CSTM_RPT report_template_file ticker_str [ ticker_str ... ]

Function cntl_c_handler
Include file CSTM_RPT.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 CSTM_RPT.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 local_exit
Include file CSTM_RPT.H
Prototype void local_exit( int exit_code )
Remarks Master program exit catcher. All fatal library errors will also come here.

Function dspy_debug_hook_vars
Include file CSTM_RPT.H
Prototype void dspy_debug_hook_vars( int exit_code )
Remarks Display program defined debug vars at image-rundown if debug_flag == TRUE.

Function final_exit_cleanup
Include file CSTM_RPT.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 chk_config_args
Include file CSTM_RPT.H
Prototype void chk_config_args( void )
Remarks Do a check that necessary run-time stuff has been defined and that the user command line arguments make sense.

Function chk_data_tables
Include file CSTM_RPT.H
Prototype void chk_data_tables( void )
Remarks This is a run-time check that all the definition tables are the same size.

Function process_template_file
Include file CSTM_RPT.H
Prototype void process_template_file( char *template_file )
Remarks Load and process a report template file into the process_records.

Function process_1_template_line
Include file CSTM_RPT.H
Prototype void process_1_template_line( char *input_line )
Remarks Worker routine to process a single template line into a process_record.

Function process_ticker_list_file
Include file CSTM_RPT.H
Prototype void process_ticker_list_file( char *ticker_file_name )
Remarks Process a file of ticker_strs and run the defined report template against each of them.

Function process_1_ticker
Include file CSTM_RPT.H
Prototype void process_1_ticker( char *ticker_str )
Remarks Run the defined report for one ticker.

Function init_global_vars
Include file CSTM_RPT.H
Prototype void init_global_vars( void )
Remarks Initialize the program global and permanent variables.

Function free_global_vars
Include file CSTM_RPT.H
Prototype void free_global_vars( void )
Remarks A nice hook to free global vars. Not really needed in this application.

Function init_process_vars
Include file CSTM_RPT.H
Prototype void init_process_vars( void )
Remarks Called on each pass through process_1_ticker. Init all vars needed for defined report's process records and zero the output buckets.

Function free_process_vars
Include file CSTM_RPT.H
Prototype void free_process_vars( void )
Remarks Called at the end of each pass through process_1_ticker to free the ticker's DATA_RECs.

Function validate_primary_verb
Include file CSTM_RPT.H
Prototype void validate_primary_verb( void )
Remarks Validate that the first token is a primary verb (or an abbreviation of one). Will set the GLOBAL var verb_idx to either the matched verb or max table size if not found.

Function chk_if_valid_data_source
Include file CSTM_RPT.H
Prototype int chk_if_valid_data_source( int found_data_src )
Remarks Check if found data source is valid for this primary verb.

Function find_data_source
Include file CSTM_RPT.H
Prototype int find_data_source( char *request )
Remarks Identify if the user request is a valid data source (or an abbreviation of one). Also remaps the file constant data source to their special flag numbers.

Function rpt_current_state
Include file CSTM_RPT.H
Prototype void rpt_current_state( void )
Remarks Do a run-time dump of the current state of all user visible indicator variables.

Function process_paren_assignment
Include file CSTM_RPT.H
Prototype void process_paren_assignment( int idx )
Remarks Called when a set of parentheses is found in a token str (tokens[ idx ]). This code identifies which trading system the user is providing overbought and oversold thresholds for, and then stores them. Example - threshold_trd_sig( 2000 , -2000 )

Table of Contents Function Index

generated on 08 February 1998 - 14:43:59
© 1998 Tierra del Fuego Ltd.