Exemple #1
0
        public static Adx Adx(
            int startIdx,
            int endIdx,
            float[] high,
            float[] low,
            float[] close,
            int timePeriod = 14)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

            double[] outReal = new double[endIdx - startIdx + 1];

            var retCode = TACore.Adx(
                startIdx,
                endIdx,
                high,
                low,
                close,
                timePeriod,
                ref outBegIdx,
                ref outNBElement,
                outReal);

            return(new Adx(retCode, outBegIdx, outNBElement, outReal));
        }
Exemple #2
0
        public static double[] ADX(int Period, double[] Highs, double[] Lows, double[] Closes)
        {
            int outBegIdx    = 0;
            int outNbElement = 0;


            double[] output = new double[Highs.Length];

            var res = TACore.Adx(0, Highs.Length - 1, Highs, Lows, Closes, Period, ref outBegIdx, ref outNbElement, output);

            return(NormalizeArray(output, Period));
        }