WMVAVG_R module routines - WIN32

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

WMVAVG_R.C - Weighted MoVing AVeraGe Routines

ANSI C weighted moving average routines.

Function new_wma_struct
Include file WMVAVG_R.H
Prototype WMA * new_wma_struct( int ma_length )
Remarks Allocate, initialize and return a virgin weighted moving average structure.

Function reset_wma_struct
Include file WMVAVG_R.H
Prototype void reset_wma_struct( WMA *wma_ptr )
Remarks Reset a WMA data structure for a new data series.

Function update_wma_struct
Include file WMVAVG_R.H
Prototype void update_wma_struct( WMA *wma_ptr , float new_data )
Remarks Update the caller's WMA with the new data. Once we have collected enough data to calc the WMA, wma_ptr->enough_data will be set to TRUE and wma_ptr->wma can be used.

Function free_wma_struct
Include file WMVAVG_R.H
Prototype void free_wma_struct( WMA *wma_ptr )
Remarks Return the WMA and its sub-structure memory to the system.

Function calc_wma_ind
Include file WMVAVG_R.H
Prototype void calc_wma_ind( DATA_REC *data_ptr , int data_cnt , int which_field , float *inds , int ma_length )
Remarks Calculate a weighted moving average indicator of ma_length for the requested field for the DATA_REC data series. The indicator will be built in the caller's data area inds.

Table of Contents Function Index

generated on 22 September 1998 - 12:55:59
© 1998 Tierra del Fuego Ltd.