示例#1
0
        public bool isSellTime()
        {
            STOCK_EVALUATION evaluation = this.evalTotal(PRICE_TYPE.DAY);

            if (evaluation == STOCK_EVALUATION.매도)
            {
                Logger.getInstance.print(KiwoomCode.Log.주식봇, "{0}, {1} 기술 지표적 매도 도달", name_, this.codeString());
                return(true);
            }

            double profitRate = this.profitPriceRate();

            if (profitRate > 3.0f /*이익 초과값*/)
            {
                Logger.getInstance.print(KiwoomCode.Log.주식봇, "{0}, {1} 이익율 초과 매도", name_, this.codeString());
                return(true);
            }

            if (profitRate < -5.0f /*손절매율*/)
            {
                Logger.getInstance.print(KiwoomCode.Log.주식봇, "{0}, {1} 손절매 매도", name_, this.codeString());
                return(true);
            }

            return(false);
        }
示例#2
0
        //-------------------------------------------------------------
        // 테스트로 볼린저 그래프로 판단
        public bool isBuyTime()
        {
            STOCK_EVALUATION evaluation = this.evalTotal(PRICE_TYPE.MIN);

            if (evaluation == STOCK_EVALUATION.매수)
            {
                return(true);
            }
            return(false);
        }
示例#3
0
 private int[] techEvalCount_ = new int[(int)STOCK_EVALUATION.MAX];         // 기술 평가들 취합
 private void counting()
 {
     for (int index = 0; index < (int)EVALUATION_ITEM.AVG_END; ++index)
     {
         STOCK_EVALUATION eval = item_[index];
         avgEvalCount_[(int)eval]++;
     }
     for (int index = (int)EVALUATION_ITEM.AVG_END; index < (int)EVALUATION_ITEM.MAX; ++index)
     {
         STOCK_EVALUATION eval = item_[index];
         techEvalCount_[(int)eval]++;
     }
 }
示例#4
0
        public STOCK_EVALUATION evalTech()
        {
            STOCK_EVALUATION result = STOCK_EVALUATION.중립;
            int nowEvalIdx          = 0;

            for (int index = 0; index < (int)STOCK_EVALUATION.MAX; ++index)
            {
                if (nowEvalIdx < techEvalCount_[index])
                {
                    nowEvalIdx = techEvalCount_[index];
                    result     = (STOCK_EVALUATION)index;
                }
            }

            return(result);
        }
示例#5
0
        //-------------------------------------------------------------
        // 가격 정상 판단 처리
        public bool isWathing()
        {
            //일이 강력 매수인 것을 상대로.
            // 최대 3만원이하 주식을 대상
            int maxPrice = 30000;

            if (this.nowPrice(PRICE_TYPE.MIN) > maxPrice)
            {
                return(false);
            }

            STOCK_EVALUATION evaluation = this.evalTotal(PRICE_TYPE.DAY);

            if (evaluation == STOCK_EVALUATION.매수)
            {
                return(true);
            }
            return(false);
        }
示例#6
0
        public STOCK_EVALUATION analysis(List <PriceData> priceTable)
        {
            this.analysisProcess(priceTable);
            this.counting();

            const int AVG_EVAL  = 0;
            const int TECH_EVAL = 1;

            STOCK_EVALUATION[] eval = new STOCK_EVALUATION[2];
            eval[AVG_EVAL]  = this.evalAvg();
            eval[TECH_EVAL] = this.evalTech();

            if (eval[AVG_EVAL] == eval[TECH_EVAL])
            {
                if (eval[AVG_EVAL] == STOCK_EVALUATION.매도)
                {
                    return(STOCK_EVALUATION.매도);
                }
                else if (eval[AVG_EVAL] == STOCK_EVALUATION.매수)
                {
                    return(STOCK_EVALUATION.매수);
                }
            }
            else
            {
                if (eval[AVG_EVAL] == STOCK_EVALUATION.매도 || eval[TECH_EVAL] == STOCK_EVALUATION.매도)
                {
                    return(STOCK_EVALUATION.매도);
                }
                else if (eval[AVG_EVAL] == STOCK_EVALUATION.매수 || eval[TECH_EVAL] == STOCK_EVALUATION.매수)
                {
                    return(STOCK_EVALUATION.매수);
                }
            }

            return(STOCK_EVALUATION.중립);
        }