ta-lib is a collection of math/statistical functions for estimating
price variablity of stock prices.
There is no port that exists for ruby.
Since I needed one so thought of building.
I followed the pick axe book.
Finally as there are about 120 functions to port so thuoght of using
I have gone through SWIG doc anf series of mails in comp.lang.ruby
but still some how I am unable to get the ball rooling.
I am particularly struck whether i would need to write some extra
typemap in swig given my C header of one of the function
TA_RetCode TA_MA( int startIdx,
const double inReal,
Lets say you wish to calculate a 30 day moving average using closing
prices. The function call could look as follow:
/* … initialize your closing price here… */
retCode = TA_MA( 0, 399,
&outBeg, &outNbElement, &out );
/* The output is displayed here */
for( i=0; i < outNbElement; i++ )
printf( “Day %d = %f\n”, outBeg+i, out[i] );
Given this API do I need to write special typemap for arguments
like…const double inReal,int *outBegIdx,int
Can anyone give me a lead???