问题
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).
回答1:
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.
回答2:
In VB.NET, I added like this:
Dim TA_INTEGER_DEFAULT as Integer = Int32.Min Dim TA_REAL_DEFAULT as Double = -4E37
来源:https://stackoverflow.com/questions/12172882/java-ta-lib-documentation