public void ReceiveCandle(sCandle pCandle)
        {
            Candle = pCandle;

            ATR.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C);
            BB.ReceiveTick(pCandle.C);
            CCI.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C);
            Derivatives.ReceiveTick(pCandle.C);
            EMA.ReceiveTick(pCandle.C);
            FMA.ReceiveTick(pCandle.C);
            HMA.ReceiveTick(pCandle.C);
            MACD.ReceiveTick(pCandle.C);
            Momemtum.ReceiveTick(pCandle.C);
            RSI.ReceiveTick(pCandle.C);
            Renko.ReceiveTick(pCandle.C);
            SMA.ReceiveTick(pCandle.C);
            STARCBands.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C);
            STDDEV.ReceiveTick(pCandle.C);
            Slope.ReceiveTick(pCandle.C);
            StochRSI.ReceiveTick(pCandle.C);
            Stochastics.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C);
            Stub.ReceiveTick(pCandle.C);
            Trend.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C);
            TrueRange.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C);
            WMA.ReceiveTick(pCandle.C);
        }
Exemple #2
0
        public void ReceiveTick(double Val)
        {
            slowEMA.ReceiveTick(Val);
            fastEMA.ReceiveTick(Val);

            if (slowEMA.isPrimed() && fastEMA.isPrimed())
            {
                signalEMA.ReceiveTick(fastEMA.Value() - slowEMA.Value());
            }
        }
Exemple #3
0
        public void ReceiveTick(double Val)
        {
            slowEMA.ReceiveTick(Val);
            fastEMA.ReceiveTick(Val);

            if (slowEMA.isPrimed() && fastEMA.isPrimed())
            {
                signalEMA.ReceiveTick(fastEMA.Value() - slowEMA.Value());
            }


            #region 接收同時寫入紀錄
            double hist = 0;
            if (signalEMA.isPrimed())
            {
                double MACD   = fastEMA.Value() - slowEMA.Value();
                double signal = signalEMA.Value();
                hist = MACD - signal;
            }
            HistRecords.Add(hist);
            #endregion
        }
        public void RecordMACD(KLine _curKL ,ref iEMA ema11 ,ref iEMA ema22 ,ref iMACD macd )
        {
            ema11.ReceiveTick(_curKL.close);
            ema22.ReceiveTick(_curKL.close);

            double DI = ((double)_curKL.close * 2 + _curKL.highest + _curKL.lowest) / 4.0;
            macd.ReceiveTick(DI / 100);
        }