ta-lib porting with swig

B

BENI

I have a function in c from ta-lib (TA-Lib provides common functions
for the technical analysis of financial market data)
http://ta-lib.org/

function header

=======
TA_RetCode TA_MA( int startIdx,
int endIdx,
const double inReal[],
int optInTimePeriod,
int optInMAType,
int *outBegIdx,
int *outNbElement,
double outReal[],
)
===========
In c it is called as

==========
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 );
================================

i was wondering how will the typemap in SWIG look like for arguments

const double inReal[]
int *outBegIdx
int *outNbElement,
double outReal[],

=============

can any one help me out by giving some lead?

regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top