ANAL_CYC.C - ANALyze CYCle
A Q & D program to read a file of ASCII cycles and track where a
market is in relation to them. Another goal is to track what Jeff
Bower at FNN humbly calls Bower power shifts (cycle confluences).
And now cross-ref the market high/low extremes and Fibonacci time
projections from a FIB_RPT report in too.
Function
|
main
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void main( int argc , char *argv[] )
|
Remarks
|
Program entry point: expected command line input -
ANAL_CYC cycle_definition_file
|
Function
|
lc_local_exit
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void lc_local_exit( int exit_code )
|
Remarks
|
Master program exit catcher. All fatal library errors will also come here.
|
Function
|
final_exit_cleanup
|
Include file
|
ANAL_CYC.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
|
output_a_timestamp_msg
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void output_a_timestamp_msg( char *msg )
|
Remarks
|
Output a message with a time stamp to the tube.
|
Function
|
allocate_data_structures
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void allocate_data_structures( void )
|
Remarks
|
Allocate the program GLOBAL variables.
|
Function
|
free_data_structures
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void free_data_structures( void )
|
Remarks
|
Deallocate the program GLOBAL variables.
|
Function
|
load_cycle_data_file
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void load_cycle_data_file( char *cycle_file )
|
Remarks
|
Load and process the cycle definition data file.
|
Function
|
process_cycle_data_rec
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void process_cycle_data_rec( char *data_line )
|
Remarks
|
Called by ld_ascii_data_file to process each line of the user's cycle
definition file. This routine will dispatch to the individual verb
process routines.
|
Function
|
process_ticker_dt_rec
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void process_ticker_dt_rec( char *ticker_line )
|
Remarks
|
Process a ticker string data record from the cycle definition file.
The ticker_line will look like - "ticker dow".
|
Function
|
process_cycle_dt_rec
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void process_cycle_dt_rec( char *cycle_line )
|
Remarks
|
Process a cycle definition data record from the cycle definition file.
The cycle_line will look like - "cycle 01/03/95 25 bottom".
|
Function
|
save_cycle_rec
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void save_cycle_rec( float base_date , int length , int node_type )
|
Remarks
|
Allocate and initialize a CREC to track this individual cycle.
|
Function
|
process_blend_dt_rec
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void process_blend_dt_rec( char *blend_line )
|
Remarks
|
Process a blend cycle definition data record from the cycle definition
file. A blend is the mathematical combination of 2 or more cycles
yielding a sigmoidal curve. A blend_line will look like - "blend 10 20 30".
|
Function
|
calc_days_needed
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void calc_days_needed( void )
|
Remarks
|
Calculate the number of bars of market data we need. The controlling
variables are the longest cycle and oldest anchor_date.
|
Function
|
calc_all_cycle_positions
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void calc_all_cycle_positions( void )
|
Remarks
|
Calculate all of the cycle positions for all the programmed cycle
definitions.
|
Function
|
calc_one_cycle_position
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void calc_one_cycle_position( CREC *cycle_rec )
|
Remarks
|
Calculate all the cycle positions for a single CREC cycle_rec.
|
Function
|
find_date_offset
|
Include file
|
ANAL_CYC.H
|
Prototype
|
static int find_date_offset( float target )
|
Remarks
|
Find the target_date in the dates[] array. Return either it's index or
-1 as not found.
|
Function
|
calc_blended_cycles
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void calc_blended_cycles( int blend_idx , int cycle_idx )
|
Remarks
|
Process cycle blend number - blend_idx against the current cycle
positions found at cycle_idx.
|
Function
|
output_pending_cycles
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void output_pending_cycles( void )
|
Remarks
|
Output the cycle position report.
|
Function
|
output_blend_structs
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void output_blend_structs( void )
|
Remarks
|
Output to the report a description of all cycle blends that were
programmed.
|
Function
|
output_one_blend_struct
|
Include file
|
ANAL_CYC.H
|
Prototype
|
static void output_one_blend_struct( int blend_idx )
|
Remarks
|
Output a single cycle blend description.
|
Function
|
output_data_4_metastock
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void output_data_4_metastock( void )
|
Remarks
|
This is a hack to dump some data for importation into Metastock. I have
left this in to show how to do it.
|
Function
|
do_fibonacci_crossref
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void do_fibonacci_crossref( void )
|
Remarks
|
Load the data to cross-reference the Fibonacci time projections and the
high / low market extremes generated by FIB_RPT to the cycle positions.
What we need to do is read the ASCII text report generated by FIB_RPT,
watch for various keywords in the report and process their data when found.
Needless to say this code will only work if you buy FIB_RPT (or at-least
it's demo). I left this code in also as an example (not a sales pitch).
This code is controlled by the /F command line switch so ANAL_CYC will
run fine without FIB_RPT.
|
Function
|
process_fib_rpt_line
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void process_fib_rpt_line( char *data_line )
|
Remarks
|
Called by ld_ascii_data_file to process an individual report line from
a FIB_RPT run.
|
Function
|
store_a_fib_projection
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void store_a_fib_projection( int type , float date )
|
Remarks
|
Store a Fibonacci time projection.
|
Function
|
store_a_fib_node
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void store_a_fib_node( int type , float date )
|
Remarks
|
Mark a day as a short-term market high/low node.
|
Function
|
blank_pad_2_length
|
Include file
|
ANAL_CYC.H
|
Prototype
|
void blank_pad_2_length( char *str , int length )
|
Remarks
|
Pad the caller's string to the request length with spaces.
|
Table of Contents
Function Index
generated on 22 September 1998 - 12:54:27
© 1998 Tierra del Fuego Ltd.
|