I was looking for a documentation on TA-Lib in Java. I have found the page containing the list of available functions, and found this.
I see TADOCS provided the algorithms on some of the functions. However I was not able to understand the required parameters for the function, it does seemed to be mentioned. Is there anywhere where I could find it ?
Specifically, I was looking more for
LINEARREG Linear Regression
Eclipse specifies linear regression as :
linearReg(startIdx, endIdx, inReal, optInTimePeriod, outBegIdx, outNBElement, outReal)
Is there anywhere I could refer to ?
EDITED
The other thing I am unclear is how do I specify the values of TA_INTEGER_DEFAULT
or TA_REAL_DEFAULT
if they are not used ?
I see this in the c++ docs
If you do not care about a particular optIn just specify TA_INTEGER_DEFAULT or TA_REAL_DEFAULT (depending of the type).
I was able to use linearreg like that:
double reg_result;
MInteger begin = new MInteger();
MInteger length = new MInteger();
c = new Core();
RetCode retCode = c.linearReg(0, intLRLength-1, dataset,intLRLength, begin, length, high_reg);
if(retCode == RetCode.Success){
console.getOut().println("reg_result"+reg_result);
}
You can also look at the Ta-lib c++ documentation to get an idea of how the functions are implemented.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With