using System;
using System.Collections.Generic;
using System.Text;
using FinanceAnalyzer.DB;
using Stock.Common.Data;

namespace FinanceAnalyzer.Strategy.Judger
{
    public class UpJudger : IStockJudger
    {
        // ÒÀÊ±¼ä´ÎÐòµÄÁ¬ÐøÈýÌì£¬ÅÐ¶ÏÊÇ·ñÂú×ãÌõ¼þ
        // Day1×îÇ°£¬Day2ÍíÒ»Ð©. 
        public bool FulFil(IStockData day1, IStockData day2, IStockData day3)
        {
            // Á¬ÐøÈýÌìÉÏÕÇÌõ¼þ
            return StockJudger.IsUp(day1) && StockJudger.IsUp(day2) && StockJudger.IsUp(day3);
        }

        // ÒÀÊ±¼ä´ÎÐòµÄÁ¬ÐøÈýÌì£¬ÅÐ¶ÏÊÇ·ñÂú×ãÏà·´µÄÌõ¼þ
        // Day1×îÇ°£¬Day2ÍíÒ»Ð©. 
        public bool ReverseFulFil(IStockData day1, IStockData day2, IStockData day3)
        {
            // Á¬ÐøÈýÌìÏÂµøÌõ¼þ
            return !StockJudger.IsUp(day1) && !StockJudger.IsUp(day2) && !StockJudger.IsUp(day3);
        }

        public string Name
        {
            get
            {
                return "Up";
            }
        }
    }
}
