예제 #1
0
/*
 * TA_RetCode TA_RestoreCandleDefaultSettings( TA_CandleSettingType settingType )
 */
static VALUE ta_restore_candle_default_settings(VALUE module, VALUE setting_type)
{
  int settingType = FIX2INT(setting_type);
  if( settingType > TA_AllCandleSettings )
    settingType = TA_AllCandleSettings;

  TA_RetCode ret_code;
  ret_code = TA_RestoreCandleDefaultSettings(settingType);
  if ( ret_code != TA_SUCCESS )
    rb_raise(rb_eRuntimeError, "unsuccess return code TA_RestoreCandleDefaultSettings");

  return Qnil;
}
예제 #2
0
/**** Global functions definitions.   ****/
TA_RetCode TA_Initialize( void )
{
   /* Initialize the "global variable" used to manage the global
    * variables of all other modules...
    */
   memset( TA_Globals, 0, sizeof( TA_LibcPriv ) );
   TA_Globals->magicNb = TA_LIBC_PRIV_MAGIC_NB;	  

   /*** At this point, TA_Shutdown can be called to clean-up. ***/

   /* Set the default value to global variables */
   TA_RestoreCandleDefaultSettings( TA_AllCandleSettings );

   return TA_SUCCESS;
}