Beispiel #1
0
        private void ThreeGetClick(object sender, EventArgs e)
        {
            //ThreeData d = this.GetThreeData("0001", Int32.Parse(this.textBox1.Text), Int32.Parse(this.textBox2.Text));
            string    code      = "0001";
            int       checkDate = 20190814;
            ThreeData d         = GetThreeData(code, checkDate, 2);

            d.Print(); // TODO for check

            //string buyRule = "IsPlus&IsAvgGolden&IsIncludeTime 930,1430&IsUpperThanDayStartPrice&IsAvg5ChangeToUp&IsAvg120Rising -10,-5";

            ArrayList ordersArray = new ArrayList();

            HashSet <string> ruleSet = BuyRule.Pattern.GetMassRule();

            Console.WriteLine("[CHECK] RULE TOTAL : " + ruleSet.Count());

            foreach (string buyRule in ruleSet)
            {
                Orders orders = new Orders();
                Check.CheckThreeData(d, buyRule, orders);
                if (orders.orderList.Count > 0)
                {
                    orders.rule = buyRule;
                    orders.date = Util.GetDateNow();
                    ordersArray.Add(orders);
                    //orders.Evaluate();
                }
            }

            Console.WriteLine("INSERT TO EVALUATE START");
            dao.InsertEvaluateData(ordersArray);
            Console.WriteLine("INSERT TO EVALUATE END");
        }