Java TA-Lib Documentation [closed]

三世轮回 提交于 2019-12-21 17:02:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!