Technical Analysis Library - TA_Initialize

Home

Documentation
Download
Developers
Other Links

API
Function Index
TADOC

Forum
SourceForge

 

NAME
    TA_Initialize - C Function


SYNOPSIS
    #include "ta_libc.h"

    TA_RetCode TA_Initialize();

DESCRIPTION

This function MUST be called prior to any other function provided by the TA-LIB.

On success and once TA-LIB is not needed anymore, TA_Shutdown must be called. This will take care to de-allocate all TA-LIB related resources.

After TA_Initialize, all other functions (except TA_Shutdown) are fully multithread safe.
 

RETURN VALUE

TA_SUCCESSOperation is successful
TA_BAD_PARAMOne of the parameter has an unexpected value.
TA_ALLOC_ERRCannot allocate memory, or memory corruption detected
TA_UNKNOWN_ERROperation failed for unknown reason

For other error code, or to match a number to an error description, check the TA_RetCode enumeration in "ta-lib/c/include/ta_common.h"

SEE ALSO

TA_Shutdown

        
EXAMPLE

#include "ta_libc.h"

int main( void )
{
   TA_RetCode retCode;

   retCode = TA_Initialize( );

   if( retCode != TA_SUCCESS )
      printf( "Cannot initialize TA-Lib (%d)!\n", retCode );
   else
   {
      printf( "TA-Lib correctly initialized.\n" );

      /* ... other TA-Lib functions can be used here. */
   
      TA_Shutdown();
   }

   return 0;
}

Google  SourceForge Logo
  Web TA-Lib.org
 
 

Copyright© 2007 TicTacTec LLC. All Rights Reserved. Last Update: 02/04/07