예제 #1
0
        public bool AddStock(IStockData sd)
        {
            if (sd == null)
            {
                return(false);
            }
            prevStock_    = currentStock_;
            currentStock_ = sd;

            if ((prevStock_ == null) || (currentStock_ == null))
            {
                return(false);
            }

            if (ShapeJudger.IsT2(currentStock_, DeltaRatio_) && VolumeHelper.IsLargerThan(currentStock_, prevStock_, 0.3))
            {
                TodayOper_ = OperType.Buy;
            }
            else if (ShapeJudger.IsReverseT2(currentStock_, DeltaRatio_))
            {
                TodayOper_ = OperType.Sell;
            }
            else
            {
                TodayOper_ = OperType.NoOper;
            }

            return(true);
        }
예제 #2
0
        public bool AddStock(IStockData sd)
        {
            if (sd == null)
            {
                return(false);
            }
            if (ShapeJudger.IsT2(sd, DeltaRatio_))
            {
                TodayOper_ = OperType.Buy;
            }
            else if (ShapeJudger.IsReverseT2(sd, DeltaRatio_))
            {
                TodayOper_ = OperType.Sell;
            }
            else
            {
                TodayOper_ = OperType.NoOper;
            }

            return(true);
        }