Beispiel #1
0
        public void Summary(string itemCode, QuantumLineChart c)
        {
            var data2 = c.ChartData[c.ChartData.Count - 2];
            var data1 = c.ChartData[c.ChartData.Count - 1];

            Lib.Base.Enums.UpDownEnum upDown1 = Lib.Base.Enums.UpDownEnum.None;
            if (data2.T_QuantumAvg < data2.T_MassAvg && data1.T_QuantumAvg < data1.T_MassAvg)
            {
                upDown1 = UpDownEnum.StrongUp;
            }
            else if (data2.T_QuantumAvg < data2.T_MassAvg && data1.T_QuantumAvg >= data1.T_MassAvg)
            {
                upDown1 = UpDownEnum.WeakUp;
            }
            CandleSummary.Instance.UpdateSummaryTrend(itemCode, c.TimeInterval, "매수", upDown1);

            Lib.Base.Enums.UpDownEnum upDown2 = Lib.Base.Enums.UpDownEnum.None;
            if (data2.T_QuantumAvg > data2.T_MassAvg && data1.T_QuantumAvg > data1.T_MassAvg)
            {
                upDown1 = UpDownEnum.StrongDown;
            }
            else if (data2.T_QuantumAvg < data2.T_MassAvg && data1.T_QuantumAvg <= data1.T_MassAvg)
            {
                upDown1 = UpDownEnum.WeakDown;
            }
            CandleSummary.Instance.UpdateSummaryTrend(itemCode, c.TimeInterval, "매도", upDown2);


            int tick2 = PriceTick.GetTickDiff(itemCode, data2.MassPrice, data2.QuantumPrice);
            int tick1 = PriceTick.GetTickDiff(itemCode, data1.MassPrice, data1.QuantumPrice);

            CandleSummary.Instance.UpdateSummaryTrendOfStrength(itemCode, c.TimeInterval, "매수", tick2);
            CandleSummary.Instance.UpdateSummaryTrendOfStrength(itemCode, c.TimeInterval, "매도", tick2);
        }
Beispiel #2
0
        public void Summary(string itemCode, AtomChart c)
        {
            var atomData2 = c.ChartData[c.ChartData.Count - 2];
            var atomData1 = c.ChartData[c.ChartData.Count - 1];

            double highLinePoint = Math.Round(atomData2.QuantumHighPrice, RoundLength);
            double lowLinePoint  = Math.Round(atomData2.QuantumLowPrice, RoundLength);

            PlusMinusTypeEnum plusMinusType = atomData2.PlusMinusType;

            //atomData1.ClosePrice
            if (plusMinusType == PlusMinusTypeEnum.양)
            {
                Lib.Base.Enums.UpDownEnum upDown1 = Lib.Base.Enums.UpDownEnum.None;
                if (atomData2.OpenPrice < atomData1.OpenPrice && atomData2.ClosePrice < atomData1.ClosePrice)
                {
                    upDown1 = Lib.Base.Enums.UpDownEnum.StrongUp;
                }
                else if (atomData2.OpenPrice < atomData1.OpenPrice && atomData2.ClosePrice >= atomData1.ClosePrice)
                {
                    upDown1 = Lib.Base.Enums.UpDownEnum.WeakUp;
                }
                else if (atomData2.OpenPrice >= atomData1.OpenPrice && atomData2.ClosePrice >= atomData1.ClosePrice)
                {
                    upDown1 = Lib.Base.Enums.UpDownEnum.None;
                }
                CandleSummary.Instance.UpdateSummaryBaseLine(itemCode, c.TimeInterval, "매수", upDown1);

                Lib.Base.Enums.UpDownEnum upDown2 = Lib.Base.Enums.UpDownEnum.None;
                if (lowLinePoint >= atomData1.ClosePrice && lowLinePoint >= atomData1.LowPrice)
                {
                    upDown2 = Lib.Base.Enums.UpDownEnum.StrongDown;
                }
                else if (lowLinePoint < atomData1.ClosePrice && lowLinePoint >= atomData1.LowPrice)
                {
                    upDown2 = Lib.Base.Enums.UpDownEnum.WeakDown;
                }
                else if (lowLinePoint < atomData1.ClosePrice && lowLinePoint < atomData1.LowPrice)
                {
                    upDown2 = Lib.Base.Enums.UpDownEnum.None;
                }
                CandleSummary.Instance.UpdateSummaryBaseLine(itemCode, c.TimeInterval, "매도", upDown2);
            }
            if (plusMinusType == PlusMinusTypeEnum.음)
            {
                Lib.Base.Enums.UpDownEnum upDown1 = Lib.Base.Enums.UpDownEnum.None;
                if (highLinePoint <= atomData1.ClosePrice && highLinePoint <= atomData1.HighPrice)
                {
                    upDown1 = Lib.Base.Enums.UpDownEnum.StrongUp;
                }
                else if (highLinePoint > atomData1.ClosePrice && highLinePoint <= atomData1.HighPrice)
                {
                    upDown1 = Lib.Base.Enums.UpDownEnum.WeakUp;
                }
                else if (highLinePoint > atomData1.ClosePrice && highLinePoint > atomData1.HighPrice)
                {
                    upDown1 = Lib.Base.Enums.UpDownEnum.None;
                }
                CandleSummary.Instance.UpdateSummaryBaseLine(itemCode, c.TimeInterval, "매수", upDown1);

                Lib.Base.Enums.UpDownEnum upDown2 = Lib.Base.Enums.UpDownEnum.None;
                if (atomData2.OpenPrice > atomData1.OpenPrice && atomData2.ClosePrice > atomData1.ClosePrice)
                {
                    upDown2 = Lib.Base.Enums.UpDownEnum.StrongDown;
                }
                else if (atomData2.OpenPrice > atomData1.OpenPrice && atomData2.ClosePrice <= atomData1.ClosePrice)
                {
                    upDown2 = Lib.Base.Enums.UpDownEnum.WeakDown;
                }
                else if (atomData2.OpenPrice <= atomData1.OpenPrice && atomData2.ClosePrice <= atomData1.ClosePrice)
                {
                    upDown2 = Lib.Base.Enums.UpDownEnum.None;
                }
                CandleSummary.Instance.UpdateSummaryBaseLine(itemCode, c.TimeInterval, "매도", upDown2);
            }
        }