Macd函数TA-Lib - “参数不好”

时间:2018-04-17 02:22:53

标签: parameters ta-lib

我正在使用.Net和TA-Lib并尝试为一系列计算Macd ... 我一直得到一个“错误的参数”错误,但无法弄明白......我尝试了很多事情无济于事。

任何建议都会很棒。

Private Sub GetMacd(ByVal quote As List(Of Quote))

    Dim startIdx As Integer = 0
    Dim endIdx As Integer = quote.Count
    Dim inReal() As Double
    ReDim inReal(quote.Count - 1)
    For i = 0 To endIdx - 1
        Dim qt = quote.Item(i)
        inReal(i) = Convert.ToDouble(qt.close)
    Next

    Dim outBegIdx As Integer
    Dim outNbElement As Integer
    Dim outMacd() As Double = Nothing
    Dim outMacdSignal() As Double = Nothing
    Dim outMacdHist() As Double = Nothing

    Dim TA_RetCode = Macd(startIdx, endIdx, inReal, 12, 26, 9, outBegIdx, outNbElement, outMacd, outMacdSignal, outMacdHist)

0 个答案:

没有答案