示例#1
0
        public static MacdResult Macd(
            int startIdx,
            int endIdx,
            double[] real,
            int optInFastPeriod,
            int optInSlowPeriod,
            int optInSignalPeriod)
        {
            int outBegIdx    = 0;
            int outNBElement = 0;

            double[] outMACD       = new double[endIdx - startIdx + 1];
            double[] outMACDSignal = new double[endIdx - startIdx + 1];
            double[] outMACDHist   = new double[endIdx - startIdx + 1];

            RetCode retCode = TACore.Macd(
                startIdx,
                endIdx,
                real,
                optInFastPeriod,
                optInSlowPeriod,
                optInSignalPeriod,
                ref outBegIdx,
                ref outNBElement,
                ref outMACD,
                ref outMACDSignal,
                ref outMACDHist);

            return(new(retCode, outBegIdx, outNBElement, outMACD, outMACDSignal, outMACDHist));
        }