1

我正在使用.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)
4

0 回答 0