Exemplo n.º 1
0
        public static UltOsc UltOsc(
            int startIdx,
            int endIdx,
            float[] high,
            float[] low,
            float[] close,
            int timePeriod1 = 7,
            int timePeriod2 = 14,
            int timePeriod3 = 28)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.UltOsc(
                startIdx,
                endIdx,
                high,
                low,
                close,
                timePeriod1,
                timePeriod2,
                timePeriod3,
                ref outBegIdx,
                ref outNBElement,
                outReal);

            return(new UltOsc(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 2
0
        public static Macd Macd(
            int startIdx,
            int endIdx,
            float[] real,
            int optInFastPeriod   = 12,
            int optInSlowPeriod   = 26,
            int optInSignalPeriod = 9)
        {
            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];

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

            return(new Macd(retCode, outBegIdx, outNBElement, outMACD, outMACDSignal, outMACDHist));
        }
Exemplo n.º 3
0
        public static CdlDarkCloudCover CdlDarkCloudCover(
            int startIdx,
            int endIdx,
            double[] open,
            double[] high,
            double[] low,
            double[] close,
            double penetration = 0.5)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

            int[] outInteger = new int[endIdx - startIdx + 1];

            var retCode = TACore.CdlDarkCloudCover(
                startIdx,
                endIdx,
                open,
                high,
                low,
                close,
                penetration,
                ref outBegIdx,
                ref outNBElement,
                outInteger);

            return(new CdlDarkCloudCover(retCode, outBegIdx, outNBElement, outInteger));
        }
Exemplo n.º 4
0
        public static Apo Apo(
            int startIdx,
            int endIdx,
            float[] real,
            int fastPeriod = 12,
            int slowPeriod = 26,
            MAType mAType  = MAType.Sma)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.Apo(
                startIdx,
                endIdx,
                real,
                fastPeriod,
                slowPeriod,
                mAType,
                ref outBegIdx,
                ref outNBElement,
                outReal);

            return(new Apo(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 5
0
        public static AvgPrice AvgPrice(
            int startIdx,
            int endIdx,
            float[] open,
            float[] high,
            float[] low,
            float[] close)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

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

            return(new AvgPrice(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 6
0
        public static CdlHignWave CdlHignWave(
            int startIdx,
            int endIdx,
            float[] open,
            float[] high,
            float[] low,
            float[] close)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

            int[] outInteger = new int[endIdx - startIdx + 1];

            var retCode = TACore.CdlHignWave(
                startIdx,
                endIdx,
                open,
                high,
                low,
                close,
                ref outBegIdx,
                ref outNBElement,
                outInteger);

            return(new CdlHignWave(retCode, outBegIdx, outNBElement, outInteger));
        }
Exemplo n.º 7
0
        public static Mama Mama(
            int startIdx,
            int endIdx,
            float[] real,
            double fastLimit = 0.5,
            double slowLimit = 0.05)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

            double[] outMAMA = new double[endIdx - startIdx + 1];
            double[] outFAMA = new double[endIdx - startIdx + 1];

            var retCode = TACore.Mama(
                startIdx,
                endIdx,
                real,
                fastLimit,
                slowLimit,
                ref outBegIdx,
                ref outNBElement,
                outMAMA,
                outFAMA);

            return(new Mama(retCode, outBegIdx, outNBElement, outMAMA, outFAMA));
        }
        public static MovingAverageVariablePeriod MovingAverageVariablePeriod(
            int startIdx,
            int endIdx,
            float[] real,
            float[] periods,
            int minPeriod = 2,
            int maxPeriod = 30,
            MAType mAType = MAType.Sma)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.MovingAverageVariablePeriod(
                startIdx,
                endIdx,
                real,
                periods,
                minPeriod,
                maxPeriod,
                mAType,
                ref outBegIdx,
                ref outNBElement,
                outReal);

            return(new MovingAverageVariablePeriod(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 9
0
        public static Bop Bop(
            int startIdx,
            int endIdx,
            double[] open,
            double[] high,
            double[] low,
            double[] close)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

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

            return(new Bop(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 10
0
        public static Mfi Mfi(
            int startIdx,
            int endIdx,
            double[] high,
            double[] low,
            double[] close,
            double[] volume,
            int timePeriod = 14)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

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

            return(new Mfi(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 11
0
        public static Ad Ad(
            int startIdx,
            int endIdx,
            double[] high,
            double[] low,
            double[] close,
            double[] volume)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

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

            return(new Ad(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 12
0
        public static CdlKickingByLength CdlKickingByLength(
            int startIdx,
            int endIdx,
            double[] open,
            double[] high,
            double[] low,
            double[] close)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

            int[] outInteger = new int[endIdx - startIdx + 1];

            var retCode = TACore.CdlKickingByLength(
                startIdx,
                endIdx,
                open,
                high,
                low,
                close,
                ref outBegIdx,
                ref outNBElement,
                outInteger);

            return(new CdlKickingByLength(retCode, outBegIdx, outNBElement, outInteger));
        }
Exemplo n.º 13
0
        public static CdlEveningStar CdlEveningStar(
            int startIdx,
            int endIdx,
            float[] open,
            float[] high,
            float[] low,
            float[] close,
            double penetration = 0.3)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

            int[] outInteger = new int[endIdx - startIdx + 1];

            var retCode = TACore.CdlEveningStar(
                startIdx,
                endIdx,
                open,
                high,
                low,
                close,
                penetration,
                ref outBegIdx,
                ref outNBElement,
                outInteger);

            return(new CdlEveningStar(retCode, outBegIdx, outNBElement, outInteger));
        }
Exemplo n.º 14
0
        public static Sar Sar(
            int startIdx,
            int endIdx,
            float[] high,
            float[] low,
            double acceleration = 0.02,
            double maximum      = 0.2)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.Sar(
                startIdx,
                endIdx,
                high,
                low,
                acceleration,
                maximum,
                ref outBegIdx,
                ref outNBElement,
                outReal);

            return(new Sar(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 15
0
        public static AdOsc AdOsc(
            int startIdx,
            int endIdx,
            float[] high,
            float[] low,
            float[] close,
            float[] volume,
            int fastPeriod = 3,
            int slowPeriod = 10)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.AdOsc(
                startIdx,
                endIdx,
                high,
                low,
                close,
                volume,
                fastPeriod,
                slowPeriod,
                ref outBegIdx,
                ref outNBElement,
                outReal);

            return(new AdOsc(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 16
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));
        }
Exemplo n.º 17
0
        public static StochRsi StochRsi(
            int startIdx,
            int endIdx,
            float[] real,
            int timePeriod     = 14,
            int fastKPeriod    = 5,
            int fastDPeriod    = 3,
            MAType fastDMAType = MAType.Sma)
        {
            int outBegIdx    = 0;
            int outNBElement = 0;

            double[] outFastK = new double[endIdx - startIdx + 1];
            double[] outFastD = new double[endIdx - startIdx + 1];

            var retCode = TACore.StochRsi(
                startIdx,
                endIdx,
                real,
                timePeriod,
                fastKPeriod,
                fastDPeriod,
                fastDMAType,
                ref outBegIdx,
                ref outNBElement,
                outFastK,
                outFastD);

            return(new StochRsi(retCode, outBegIdx, outNBElement, outFastK, outFastD));
        }
Exemplo n.º 18
0
        public static StochF StochF(
            int startIdx,
            int endIdx,
            float[] high,
            float[] low,
            float[] close,
            int fastK_Period    = 5,
            int fastD_Period    = 3,
            MAType fastD_MAType = MAType.Sma)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

            double[] outFastK = new double[endIdx - startIdx + 1];
            double[] outFastD = new double[endIdx - startIdx + 1];

            var retCode = TACore.StochF(
                startIdx,
                endIdx,
                high,
                low,
                close,
                fastK_Period,
                fastD_Period,
                fastD_MAType,
                ref outBegIdx,
                ref outNBElement,
                outFastK,
                outFastD);

            return(new StochF(retCode, outBegIdx, outNBElement, outFastK, outFastD));
        }
Exemplo n.º 19
0
        public static Kama Kama(int startIdx, int endIdx, double[] real, int timePeriod = 30)
        {
            int outBegIdx    = 0;
            int outNBElement = 0;

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

            var retCode = TACore.Kama(startIdx, endIdx, real, timePeriod, ref outBegIdx, ref outNBElement, outReal);

            return(new Kama(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 20
0
        public static MidPoint MidPoint(int startIdx, int endIdx, double[] real, int timePeriod = 14)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.MidPoint(startIdx, endIdx, real, timePeriod, ref outBegIdx, ref outNBElement, outReal);

            return(new MidPoint(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 21
0
        public static Obv Obv(int startIdx, int endIdx, float[] real, float[] volume)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.Obv(startIdx, endIdx, real, volume, ref outBegIdx, ref outNBElement, outReal);

            return(new Obv(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 22
0
        public static Div Div(int startIdx, int endIdx, float[] real0, float[] real1)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.Div(startIdx, endIdx, real0, real1, ref outBegIdx, ref outNBElement, outReal);

            return(new Div(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 23
0
        public static Ema Ema(int startIdx, int endIdx, float[] real, int timePeriod = 30)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.Ema(startIdx, endIdx, real, timePeriod, ref outBegIdx, ref outNBElement, outReal);

            return(new Ema(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 24
0
        public static MedPrice MedPrice(int startIdx, int endIdx, float[] high, float[] low)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

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

            return(new MedPrice(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 25
0
        public static HtTrendMode HtTrendMode(int startIdx, int endIdx, float[] real)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

            int[] outInteger = new int[endIdx - startIdx + 1];

            var retCode = TACore.HtTrendMode(startIdx, endIdx, real, ref outBegIdx, ref outNBElement, outInteger);

            return(new HtTrendMode(retCode, outBegIdx, outNBElement, outInteger));
        }
Exemplo n.º 26
0
        public static HtTrendline HtTrendline(int startIdx, int endIdx, double[] real)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.HtTrendline(startIdx, endIdx, real, ref outBegIdx, ref outNBElement, outReal);

            return(new HtTrendline(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 27
0
        public static Acos Acos(int startIdx, int endIdx, float[] real)
        {
            int outBegIdx    = 0;
            int outNBElement = 0;

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

            var retCode = TACore.Acos(startIdx, endIdx, real, ref outBegIdx, ref outNBElement, outReal);

            return(new Acos(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 28
0
        public static Ceil Ceil(int startIdx, int endIdx, float[] real)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.Ceil(startIdx, endIdx, real, ref outBegIdx, ref outNBElement, outReal);

            return(new Ceil(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 29
0
        public static Sub Sub(int startIdx, int endIdx, double[] real0, double[] real1)
        {
            int outBegIdx    = default(int);
            int outNBElement = default(int);

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

            var retCode = TACore.Sub(startIdx, endIdx, real0, real1, ref outBegIdx, ref outNBElement, outReal);

            return(new Sub(retCode, outBegIdx, outNBElement, outReal));
        }
Exemplo n.º 30
0
        public static double[] CCI(int Period, double[] Highs, double[] Lows, double[] Closes)
        {
            int outBegIdx    = 0;
            int outNbElement = 0;


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

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

            return(NormalizeArray(output, Period));
        }