B
BENI
I was trying to swig a function in ta-lib (TA-Lib provides common
functions for the technical analysis of financial market data)
http://ta-lib.org/index.html
the c functuon api
TA_RetCode TA_MA( int startIdx,
int endIdx,
const double inReal[],
int optInTimePeriod,
int optInMAType,
int *outBegIdx,
int *outNbElement,
double outReal[],
)
===========
the c call
==========
TA_Real closePrice[400];
TA_Real out[400];
TA_Integer outBeg;
TA_Integer outNbElement;
/* ... initialize your closing price here... */
retCode = TA_MA( 0, 399,
&closePrice[0],
30,TA_MAType_SMA,
&outBeg, &outNbElement, &out[0] );
/* The output is displayed here */
for( i=0; i < outNbElement; i++ )
printf( "Day %d = %f\n", outBeg+i, out );
================
the query''''''
what should be the typemap
for argument
1>const double inReal[],
2>int *outBegIdx,
3>int *outNbElement,
4>double outReal[],
=============
regards
functions for the technical analysis of financial market data)
http://ta-lib.org/index.html
the c functuon api
TA_RetCode TA_MA( int startIdx,
int endIdx,
const double inReal[],
int optInTimePeriod,
int optInMAType,
int *outBegIdx,
int *outNbElement,
double outReal[],
)
===========
the c call
==========
TA_Real closePrice[400];
TA_Real out[400];
TA_Integer outBeg;
TA_Integer outNbElement;
/* ... initialize your closing price here... */
retCode = TA_MA( 0, 399,
&closePrice[0],
30,TA_MAType_SMA,
&outBeg, &outNbElement, &out[0] );
/* The output is displayed here */
for( i=0; i < outNbElement; i++ )
printf( "Day %d = %f\n", outBeg+i, out );
================
the query''''''
what should be the typemap
for argument
1>const double inReal[],
2>int *outBegIdx,
3>int *outNbElement,
4>double outReal[],
=============
regards