Esempio n. 1
0
 public static int GetTaxSell(int value)
 {
     FileLog.PrintF("GetTaxSell value=>" + value);
     FileLog.PrintF("GetTaxSell Convert.ToInt32(value * Commission._taxSell)=>" + Convert.ToInt32(value * Commission._taxSell));
     return(Convert.ToInt32(Convert.ToInt32(value * Commission._taxSell)));   //원미만 절삭이라
 }
Esempio n. 2
0
        private void SendDirectDb(List <OPT10075_Data> opt10075_DataList)
        {
            try
            {
                using (MySqlConnection conn = new MySqlConnection(Config.GetDbConnStr()))
                {
                    String sql1 = "DELETE FROM opt10075s;";
                    conn.Open();
                    MySqlTransaction tr      = conn.BeginTransaction();
                    String           dayTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                    try
                    {
                        MySqlCommand cmd = new MySqlCommand(sql1, conn, tr);
                        cmd.ExecuteNonQuery();
                        string        sql2         = @"INSERT INTO opt10075s (
contract_time  
,account_number
,order_number
,manager_number
,stock_code
,business_gubun  
,order_status  
,stock_name 
,order_quantity 
,order_price 
,not_contract_quantity 
,contract_total_amount 
,last_order_number
,order_gubun
,trade_gubun 
,contract_number 
,contract_price 
,contract_quantity 
,current_price
,offered_price 
,bid_price
,contract_price_unit 
,contract_price_quantity 
,today_commission 
,today_tax 
,domestic_investor 
,created_at
,updated_at
)
VALUES";
                        String        sql2_1       = @"
(
@체결시간{0}
,@계좌번호{0}
,@주문번호{0}
,@관리사번{0}
,@종목코드{0}
,@업무구분{0}
,@주문상태{0}
,@종목명{0}
,@주문수량{0}
,@주문가격{0}
,@미체결수량{0}
,@체결누계금액{0}
,@원주문번호{0}
,@주문구분{0}
,@매매구분{0}
,@체결번호{0}
,@체결가{0}
,@체결량{0}
,@현재가{0}
,@매도호가{0}
,@매수호가{0}
,@단위체결가{0}
,@단위체결량{0}
,@당일매매수수료{0}
,@당일매매세금{0}
,@개인투자자{0}
,@등록날짜{0}
,@업데이트날짜{0}
),";
                        StringBuilder queryBuilder = new StringBuilder(sql2);
                        for (int i = 0; i < opt10075_DataList.Count(); i++)
                        {
                            queryBuilder.AppendFormat(sql2_1, i);
                            //once we're done looping we remove the last ',' and replace it with a ';'
                            if (i == opt10075_DataList.Count() - 1)
                            {
                                queryBuilder.Replace(',', ';', queryBuilder.Length - 1, 1);
                            }
                        }
                        String sql2_2 = queryBuilder.ToString();
                        FileLog.PrintF("SendDirectDb2 sql2_2:" + sql2_2.ToString());
                        cmd.CommandText = sql2_2;
                        for (int i = 0; i < opt10075_DataList.Count(); i++)
                        {
                            cmd.Parameters.AddWithValue("@체결시간" + i, opt10075_DataList[i].체결시간);       //[0]
                            cmd.Parameters.AddWithValue("@계좌번호" + i, opt10075_DataList[i].계좌번호);       //[1]
                            cmd.Parameters.AddWithValue("@주문번호" + i, opt10075_DataList[i].주문번호);       //[2]
                            cmd.Parameters.AddWithValue("@관리사번" + i, opt10075_DataList[i].관리사번);       //[3]
                            cmd.Parameters.AddWithValue("@종목코드" + i, opt10075_DataList[i].종목코드);       //[4]
                            cmd.Parameters.AddWithValue("@업무구분" + i, opt10075_DataList[i].업무구분);       //[5]
                            cmd.Parameters.AddWithValue("@주문상태" + i, opt10075_DataList[i].주문상태);       //[6]
                            cmd.Parameters.AddWithValue("@종목명" + i, opt10075_DataList[i].종목명);         //[7]
                            cmd.Parameters.AddWithValue("@주문수량" + i, opt10075_DataList[i].주문수량);       //[8]
                            cmd.Parameters.AddWithValue("@주문가격" + i, opt10075_DataList[i].주문가격);       //[9]
                            cmd.Parameters.AddWithValue("@미체결수량" + i, opt10075_DataList[i].미체결수량);     //[10]
                            cmd.Parameters.AddWithValue("@체결누계금액" + i, opt10075_DataList[i].체결누계금액);   //[11]
                            cmd.Parameters.AddWithValue("@원주문번호" + i, opt10075_DataList[i].원주문번호);     //[12]
                            cmd.Parameters.AddWithValue("@주문구분" + i, opt10075_DataList[i].주문구분);       //[13]
                            cmd.Parameters.AddWithValue("@매매구분" + i, opt10075_DataList[i].매매구분);       //[14]
                            cmd.Parameters.AddWithValue("@체결번호" + i, opt10075_DataList[i].체결번호);       //[15]
                            cmd.Parameters.AddWithValue("@체결가" + i, opt10075_DataList[i].체결가);         //[16]
                            cmd.Parameters.AddWithValue("@체결량" + i, opt10075_DataList[i].체결량);         //[17]
                            cmd.Parameters.AddWithValue("@현재가" + i, opt10075_DataList[i].현재가);         //[18]
                            cmd.Parameters.AddWithValue("@매도호가" + i, opt10075_DataList[i].매도호가);       //[19]
                            cmd.Parameters.AddWithValue("@매수호가" + i, opt10075_DataList[i].매수호가);       //[20]
                            cmd.Parameters.AddWithValue("@단위체결가" + i, opt10075_DataList[i].단위체결가);     //[21]
                            cmd.Parameters.AddWithValue("@단위체결량" + i, opt10075_DataList[i].단위체결량);     //[22]
                            cmd.Parameters.AddWithValue("@당일매매수수료" + i, opt10075_DataList[i].당일매매수수료); //[23]
                            cmd.Parameters.AddWithValue("@당일매매세금" + i, opt10075_DataList[i].당일매매세금);   //[24]
                            cmd.Parameters.AddWithValue("@개인투자자" + i, opt10075_DataList[i].개인투자자);     //[25]
                            cmd.Parameters.AddWithValue("@업데이트날짜" + i, dayTime);
                            cmd.Parameters.AddWithValue("@등록날짜" + i, dayTime);
                        }
                        cmd.ExecuteNonQuery();
                        tr.Commit();
                    }
                    catch (MySqlException ex2)
                    {
                        try
                        {
                            tr.Rollback();
                        }
                        catch (MySqlException ex1)
                        {
                            FileLog.PrintF("MyOrder SendDirectDb1 Error:" + ex1.ToString());
                        }
                        FileLog.PrintF("MyOrder SendDirectDb2 Error:" + ex2.ToString());
                    }
                }
            }
            catch (MySqlException ex3)
            {
                FileLog.PrintF("MyOrder SendDirectDb3 Error:" + ex3.ToString());
            }
        }
Esempio n. 3
0
        private void autoSale(OPT10085_Data opt10085_data)
        {
            FileLog.PrintF("autoSale loss_status=>" + loss_status + ",loss_rate=>" + loss_rate + ",종목코드=>" + opt10085_data.종목코드 + ",손익율=>" + opt10085_data.손익율 + ",주문상태=>" + opt10085_data.주문상태);
            //주식체결 정보가 들어와서 주식 현재가가 변동이 있을때 자동 판매로직이 실행됨
            /*손절매*/
            if (loss_status == true)
            {
                if (opt10085_data.손익율 <= this.loss_rate && opt10085_data.주문상태 == 1)//주문상태가 1 즉 보여상태이어야한다.
                {
                    if (MyOrder.getClass1Instance().ExistsOrder(opt10085_data.종목코드) == false)
                    {
                        //매도주문

                        int    nOrderType  = 2;//신규메도
                        String sCode       = opt10085_data.종목코드;
                        String sScreenNo   = ScreenNumber.getClass1Instance().GetAnyTimeScrNum();
                        int    nQty        = opt10085_data.보유수량;
                        int    nPrice      = 0;    //일단 시장가매도하자.
                        String sHogaGb     = "03"; //시장가 매도
                        String sOrgOrderNo = "";   //원주문번호는 공백
                        FileLog.PrintF("autoSale sScreenNo=>" + sScreenNo);
                        FileLog.PrintF("autoSale accountNumber=>" + accountNumber);
                        FileLog.PrintF("autoSale nOrderType=>" + nOrderType);
                        FileLog.PrintF("autoSale sCode=>" + sCode);
                        FileLog.PrintF("autoSale nQty=>" + nQty);
                        FileLog.PrintF("autoSale nPrice=>" + nPrice);
                        FileLog.PrintF("autoSale sHogaGb=>" + sHogaGb);
                        FileLog.PrintF("autoSale sOrgOrderNo=>" + sOrgOrderNo);

                        //아 이거 1초에 5번 즉 0.2초 제한이 여기도 있다. ㅠㅠ이렇게 바로 보내면 안된다...
                        int ret = AppLib.getClass1Instance().getAxKHOpenAPIInstance().SendOrder("손절매_매도주문", sScreenNo, accountNumber, nOrderType, sCode, nQty, nPrice, sHogaGb, sOrgOrderNo);
                        FileLog.PrintF("MyStock AutoSale ret=>" + ret);
                        //상태가 하나더 있어야겠다 주문접수를 한상태인거는 다시 매도를 시도하면 안되므로
                        opt10085_data.주문상태 = 2;
                        dbUpdateOrderStatus(opt10085_data);
                    }
                }
            }
            /*이익실현*/
            if (profit_status == true)
            {
                if (opt10085_data.손익율 >= this.profit_rate && opt10085_data.주문상태 == 1)//주문상태가 1 즉 보여상태이어야한다.
                {
                    //매도주문
                    if (MyOrder.getClass1Instance().ExistsOrder(opt10085_data.종목코드) == false)
                    {
                        int    nOrderType  = 2;//신규메도
                        String sCode       = opt10085_data.종목코드;
                        int    nQty        = opt10085_data.보유수량;
                        int    nPrice      = 0;    //일단 시장가매도하자.
                        String sHogaGb     = "03"; //시장가 매도
                        String sOrgOrderNo = "";   //원주문번호는 공백

                        String sScreenNo = ScreenNumber.getClass1Instance().GetAnyTimeScrNum();


                        FileLog.PrintF("autoSale sScreenNo=>" + sScreenNo);
                        FileLog.PrintF("autoSale accountNumber=>" + accountNumber);
                        FileLog.PrintF("autoSale nOrderType=>" + nOrderType);
                        FileLog.PrintF("autoSale sCode=>" + sCode);
                        FileLog.PrintF("autoSale nQty=>" + nQty);
                        FileLog.PrintF("autoSale nPrice=>" + nPrice);
                        FileLog.PrintF("autoSale sHogaGb=>" + sHogaGb);
                        FileLog.PrintF("autoSale sOrgOrderNo=>" + sOrgOrderNo);
                        int ret = AppLib.getClass1Instance().getAxKHOpenAPIInstance().SendOrder("이익매_매도주문", sScreenNo, accountNumber, nOrderType, sCode, nQty, nPrice, sHogaGb, sOrgOrderNo);
                        FileLog.PrintF("MyStock AutoSale ret=>" + ret);
                        opt10085_data.주문상태 = 2;
                        dbUpdateOrderStatus(opt10085_data);
                    }
                }
            }
        }
Esempio n. 4
0
        private void SendDirectDb(List <OPT10085_Data> opt10085_DataList)
        {
            lock (_lockStockList)
            {
                try
                {
                    using (MySqlConnection conn = new MySqlConnection(Config.GetDbConnStr()))
                    {
                        String sql1 = "DELETE FROM opt10085s;";
                        conn.Open();
                        MySqlTransaction tr      = conn.BeginTransaction();
                        String           dayTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                        try
                        {
                            MySqlCommand cmd = new MySqlCommand(sql1, conn, tr);
                            cmd.ExecuteNonQuery();
                            string        sql2         = @"INSERT INTO opt10085s (
date_of_purchase  
,account_number
,stock_code
,stock_name
,current_price  
,purchase_price  
,total_amount_of_purchase 
,possession_quantity 
,today_sell_profit_and_loss 
,today_commission 
,today_tax 
,credit_gubun
,loan_date
,payment_balance 
,sellable_quantity 
,credit_amount 
,credit_interest 
,expiration_date
,valuation_profit_and_loss 
,earnings_rate
,evaluated_price 
,commission 
,buying_commission 
,selling_commission 
,selling_tax 
,will_profit_price 
,not_commission_profit_and_loss 
,not_commission_profit_and_loss_rate
,order_status
,created_at
,updated_at
)
VALUES";
                            String        sql2_1       = @"
(
@구매일자{0}
,@계좌번호{0}
,@종목코드{0}
,@종목명{0}
,@현재가{0}
,@매입가{0}
,@매입금액{0}
,@보유수량{0}
,@당일매도손익{0}
,@당일매매수수료{0}
,@당일매매세금{0}
,@신용구분{0}
,@대출일{0}
,@결제잔고{0}
,@청산가능수량{0}
,@신용금액{0}
,@신용이자{0}
,@만기일{0}
,@평가손익{0}
,@수익률{0}
,@평가금액{0}
,@수수료{0}
,@매입수수료{0}
,@매도수수료{0}
,@매도세금{0}
,@손익분기매입가{0}
,@손익금액{0}
,@손익율{0}
,@주문상태{0}
,@등록날짜{0}
,@업데이트날짜{0}
),";
                            StringBuilder queryBuilder = new StringBuilder(sql2);
                            for (int i = 0; i < opt10085_DataList.Count(); i++)
                            {
                                queryBuilder.AppendFormat(sql2_1, i);
                                //once we're done looping we remove the last ',' and replace it with a ';'
                                if (i == opt10085_DataList.Count() - 1)
                                {
                                    queryBuilder.Replace(',', ';', queryBuilder.Length - 1, 1);
                                }
                            }
                            String sql2_2 = queryBuilder.ToString();
                            FileLog.PrintF("SendDirectDb2 sql2_2:" + sql2_2.ToString());
                            cmd.CommandText = sql2_2;
                            for (int i = 0; i < opt10085_DataList.Count(); i++)
                            {
                                cmd.Parameters.AddWithValue("@구매일자" + i, opt10085_DataList[i].구매일자);
                                cmd.Parameters.AddWithValue("@계좌번호" + i, opt10085_DataList[i].계좌번호);
                                cmd.Parameters.AddWithValue("@종목코드" + i, opt10085_DataList[i].종목코드);
                                cmd.Parameters.AddWithValue("@종목명" + i, opt10085_DataList[i].종목명);
                                cmd.Parameters.AddWithValue("@현재가" + i, opt10085_DataList[i].현재가);
                                cmd.Parameters.AddWithValue("@매입가" + i, opt10085_DataList[i].매입가);
                                cmd.Parameters.AddWithValue("@매입금액" + i, opt10085_DataList[i].매입금액);
                                cmd.Parameters.AddWithValue("@보유수량" + i, opt10085_DataList[i].보유수량);
                                cmd.Parameters.AddWithValue("@당일매도손익" + i, opt10085_DataList[i].당일매도손익);
                                cmd.Parameters.AddWithValue("@당일매매수수료" + i, opt10085_DataList[i].당일매매수수료);
                                cmd.Parameters.AddWithValue("@당일매매세금" + i, opt10085_DataList[i].당일매매세금);
                                cmd.Parameters.AddWithValue("@신용구분" + i, opt10085_DataList[i].신용구분);
                                cmd.Parameters.AddWithValue("@대출일" + i, opt10085_DataList[i].대출일);
                                cmd.Parameters.AddWithValue("@결제잔고" + i, opt10085_DataList[i].결제잔고);
                                cmd.Parameters.AddWithValue("@청산가능수량" + i, opt10085_DataList[i].청산가능수량);
                                cmd.Parameters.AddWithValue("@신용금액" + i, opt10085_DataList[i].신용금액);
                                cmd.Parameters.AddWithValue("@신용이자" + i, opt10085_DataList[i].신용이자);
                                cmd.Parameters.AddWithValue("@만기일" + i, opt10085_DataList[i].만기일);
                                cmd.Parameters.AddWithValue("@평가손익" + i, opt10085_DataList[i].평가손익);
                                cmd.Parameters.AddWithValue("@수익률" + i, opt10085_DataList[i].수익률);
                                cmd.Parameters.AddWithValue("@평가금액" + i, opt10085_DataList[i].평가금액);
                                cmd.Parameters.AddWithValue("@수수료" + i, opt10085_DataList[i].수수료);
                                cmd.Parameters.AddWithValue("@매입수수료" + i, opt10085_DataList[i].매입수수료);
                                cmd.Parameters.AddWithValue("@매도수수료" + i, opt10085_DataList[i].매도수수료);
                                cmd.Parameters.AddWithValue("@매도세금" + i, opt10085_DataList[i].매도세금);
                                cmd.Parameters.AddWithValue("@손익분기매입가" + i, opt10085_DataList[i].손익분기매입가);
                                cmd.Parameters.AddWithValue("@손익금액" + i, opt10085_DataList[i].손익금액);
                                cmd.Parameters.AddWithValue("@손익율" + i, opt10085_DataList[i].손익율);
                                cmd.Parameters.AddWithValue("@주문상태" + i, 1);//1 은 보유를 의미
                                cmd.Parameters.AddWithValue("@업데이트날짜" + i, dayTime);
                                cmd.Parameters.AddWithValue("@등록날짜" + i, dayTime);
                            }
                            cmd.ExecuteNonQuery();
                            String sql3 = @"SELECT
DATE_OF_PURCHASE  
,ACCOUNT_NUMBER
,STOCK_CODE
,STOCK_NAME
,CURRENT_PRICE  
,PURCHASE_PRICE  
,TOTAL_AMOUNT_OF_PURCHASE 
,POSSESSION_QUANTITY 
,TODAY_SELL_PROFIT_AND_LOSS 
,TODAY_COMMISSION 
,TODAY_TAX 
,CREDIT_GUBUN
,LOAN_DATE
,PAYMENT_BALANCE 
,SELLABLE_QUANTITY 
,CREDIT_AMOUNT 
,CREDIT_INTEREST 
,EXPIRATION_DATE
,VALUATION_PROFIT_AND_LOSS 
,EARNINGS_RATE
,EVALUATED_PRICE 
,COMMISSION 
,BUYING_COMMISSION 
,SELLING_COMMISSION 
,SELLING_TAX 
,WILL_PROFIT_PRICE 
,NOT_COMMISSION_PROFIT_AND_LOSS 
,NOT_COMMISSION_PROFIT_AND_LOSS_RATE
,ORDER_STATUS
FROM opt10085s
ORDER BY date_of_purchase DESC";
                            cmd.CommandText = sql3;
                            MySqlDataReader rdr = cmd.ExecuteReader();
                            // 다음 레코드 계속 가져와서 루핑
                            while (rdr.Read())
                            {
                                // C# 인덱서를 사용하여
                                // 필드 데이타 엑세스
                                OPT10085_Data tmp = new OPT10085_Data();
                                tmp.구매일자    = rdr["DATE_OF_PURCHASE"].ToString().Trim();
                                tmp.계좌번호    = rdr["ACCOUNT_NUMBER"].ToString().Trim();
                                tmp.종목코드    = rdr["STOCK_CODE"].ToString().Trim();
                                tmp.종목명     = rdr["STOCK_NAME"].ToString().Trim();
                                tmp.현재가     = int.Parse(rdr["CURRENT_PRICE"].ToString().Trim());
                                tmp.매입가     = int.Parse(rdr["PURCHASE_PRICE"].ToString().Trim());
                                tmp.매입금액    = int.Parse(rdr["TOTAL_AMOUNT_OF_PURCHASE"].ToString().Trim());
                                tmp.보유수량    = int.Parse(rdr["POSSESSION_QUANTITY"].ToString().Trim());
                                tmp.당일매도손익  = int.Parse(rdr["TODAY_SELL_PROFIT_AND_LOSS"].ToString().Trim());
                                tmp.당일매매수수료 = int.Parse(rdr["TODAY_COMMISSION"].ToString().Trim());
                                tmp.당일매매세금  = int.Parse(rdr["TODAY_TAX"].ToString().Trim());
                                tmp.신용구분    = rdr["CREDIT_GUBUN"].ToString().Trim();
                                tmp.대출일     = rdr["LOAN_DATE"].ToString().Trim();
                                tmp.결제잔고    = int.Parse(rdr["PAYMENT_BALANCE"].ToString().Trim());
                                tmp.청산가능수량  = int.Parse(rdr["SELLABLE_QUANTITY"].ToString().Trim());
                                tmp.신용금액    = int.Parse(rdr["CREDIT_AMOUNT"].ToString().Trim());
                                tmp.신용이자    = int.Parse(rdr["CREDIT_INTEREST"].ToString().Trim());
                                tmp.만기일     = rdr["EXPIRATION_DATE"].ToString().Trim();
                                tmp.평가손익    = int.Parse(rdr["VALUATION_PROFIT_AND_LOSS"].ToString().Trim());
                                tmp.수익률     = float.Parse(rdr["EARNINGS_RATE"].ToString().Trim());
                                tmp.평가금액    = int.Parse(rdr["EVALUATED_PRICE"].ToString().Trim());
                                tmp.수수료     = int.Parse(rdr["COMMISSION"].ToString().Trim());
                                tmp.매입수수료   = int.Parse(rdr["BUYING_COMMISSION"].ToString().Trim());
                                tmp.매도수수료   = int.Parse(rdr["SELLING_COMMISSION"].ToString().Trim());
                                tmp.매도세금    = int.Parse(rdr["SELLING_TAX"].ToString().Trim());
                                tmp.손익분기매입가 = int.Parse(rdr["WILL_PROFIT_PRICE"].ToString().Trim());
                                tmp.손익금액    = int.Parse(rdr["NOT_COMMISSION_PROFIT_AND_LOSS"].ToString().Trim());
                                tmp.손익율     = float.Parse(rdr["NOT_COMMISSION_PROFIT_AND_LOSS_RATE"].ToString().Trim());
                                tmp.주문상태    = int.Parse(rdr["ORDER_STATUS"].ToString().Trim());
                                stockList.Add(tmp);
                            }
                            // 사용후 닫음
                            rdr.Close();
                            tr.Commit();
                        } catch (MySqlException ex2) {
                            try
                            {
                                tr.Rollback();
                            }
                            catch (MySqlException ex1)
                            {
                                FileLog.PrintF("SendDirectDb1 Error:" + ex1.ToString());
                            }
                            FileLog.PrintF("SendDirectDb2 Error:" + ex2.ToString());
                        }
                    }
                }
                catch (MySqlException ex3)
                {
                    FileLog.PrintF("SendDirectDb3 Error:" + ex3.ToString());
                }
            }
        }
Esempio n. 5
0
        public static void EOS_CompressZip()
        {
            while (true)
            {
                FileLog.PrintF("EOS_CompressZip");
                //1. 주식일봉차트조회
                string zipPath      = Config.GetPath() + "OPT10081_" + AppLib.getClass1Instance().endDateEos + ".zip";
                string zipCheckPath = Config.GetPath() + "OPT10081.dat";
                string ftpCheckPath = Config.GetPath() + "OPT10081_FTP.dat";
                if (File.Exists(zipPath) == false)
                {
                    if (File.Exists(zipCheckPath))
                    {
                        FileLog.PrintF("EOS_CompressZip OPT10081 zipPath=" + zipPath);
                        FileLog.PrintF("EOS_CompressZip OPT10081 zipCheckPath=" + zipCheckPath);
                        CompressZip(zipPath, "OPT10081_", "");
                        DeleteFile(zipPath, "OPT10081_", "");
                        File.Move(zipCheckPath, ftpCheckPath);
                    }
                }
                //2. 일별거래상세요청
                zipPath      = Config.GetPath() + "OPT10015_" + AppLib.getClass1Instance().endDateEos + ".zip";
                zipCheckPath = Config.GetPath() + "OPT10015.dat";
                ftpCheckPath = Config.GetPath() + "OPT10015_FTP.dat";
                if (File.Exists(zipPath) == false)
                {
                    if (File.Exists(zipCheckPath))
                    {
                        FileLog.PrintF("EOS_CompressZip OPT10015 zipPath=" + zipPath);
                        FileLog.PrintF("EOS_CompressZip OPT10015 zipCheckPath=" + zipCheckPath);
                        CompressZip(zipPath, "OPT10015_", "");
                        DeleteFile(zipPath, "OPT10015_", "");
                        File.Move(zipCheckPath, ftpCheckPath);
                    }
                }
                //3. 종목별투자자기관별차트
                zipPath      = Config.GetPath() + "OPT10059_" + AppLib.getClass1Instance().endDateEos + "_1_1.zip";
                zipCheckPath = Config.GetPath() + "OPT10059_1_1.dat";
                ftpCheckPath = Config.GetPath() + "OPT10059_1_1_FTP.dat";
                if (File.Exists(zipPath) == false)
                {
                    if (File.Exists(zipCheckPath))
                    {
                        FileLog.PrintF("EOS_CompressZip OPT10059_1_1 zipPath=" + zipPath);
                        FileLog.PrintF("EOS_CompressZip OPT10059_1_1 zipCheckPath=" + zipCheckPath);
                        CompressZip(zipPath, "OPT10059_", "_1_1");
                        DeleteFile(zipPath, "OPT10059_", "_1_1");
                        File.Move(zipCheckPath, ftpCheckPath);
                    }
                }
                zipPath      = Config.GetPath() + "OPT10059_" + AppLib.getClass1Instance().endDateEos + "_1_2.zip";
                zipCheckPath = Config.GetPath() + "OPT10059_1_2.dat";
                ftpCheckPath = Config.GetPath() + "OPT10059_1_2_FTP.dat";
                if (File.Exists(zipPath) == false)
                {
                    if (File.Exists(zipCheckPath))
                    {
                        FileLog.PrintF("EOS_CompressZip OPT10059_1_2 zipPath=" + zipPath);
                        FileLog.PrintF("EOS_CompressZip OPT10059_1_2 zipCheckPath=" + zipCheckPath);
                        CompressZip(zipPath, "OPT10059_", "_1_2");
                        DeleteFile(zipPath, "OPT10059_", "_1_2");
                        File.Move(zipCheckPath, ftpCheckPath);
                    }
                }
                zipPath      = Config.GetPath() + "OPT10059_" + AppLib.getClass1Instance().endDateEos + "_2_1.zip";
                zipCheckPath = Config.GetPath() + "OPT10059_2_1.dat";
                ftpCheckPath = Config.GetPath() + "OPT10059_2_1_FTP.dat";
                if (File.Exists(zipPath) == false)
                {
                    if (File.Exists(zipCheckPath))
                    {
                        FileLog.PrintF("EOS_CompressZip OPT10059_2_1 zipPath=" + zipPath);
                        FileLog.PrintF("EOS_CompressZip OPT10059_2_1 zipCheckPath=" + zipCheckPath);
                        CompressZip(zipPath, "OPT10059_", "_2_1");
                        DeleteFile(zipPath, "OPT10059_", "_2_1");
                        File.Move(zipCheckPath, ftpCheckPath);
                    }
                }
                zipPath      = Config.GetPath() + "OPT10059_" + AppLib.getClass1Instance().endDateEos + "_2_2.zip";
                zipCheckPath = Config.GetPath() + "OPT10059_2_2.dat";
                ftpCheckPath = Config.GetPath() + "OPT10059_2_2_FTP.dat";
                if (File.Exists(zipPath) == false)
                {
                    if (File.Exists(zipCheckPath))
                    {
                        FileLog.PrintF("EOS_CompressZip OPT10059_2_2 zipPath=" + zipPath);
                        FileLog.PrintF("EOS_CompressZip OPT10059_2_2 zipCheckPath=" + zipCheckPath);
                        CompressZip(zipPath, "OPT10059_", "_2_2");
                        DeleteFile(zipPath, "OPT10059_", "_2_2");
                        File.Move(zipCheckPath, ftpCheckPath);
                    }
                }
                //4. 공매도추이요청
                zipPath      = Config.GetPath() + "OPT10014_" + AppLib.getClass1Instance().endDateEos + ".zip";
                zipCheckPath = Config.GetPath() + "OPT10014.dat";
                ftpCheckPath = Config.GetPath() + "OPT10014_FTP.dat";
                if (File.Exists(zipPath) == false)
                {
                    if (File.Exists(zipCheckPath))
                    {
                        FileLog.PrintF("EOS_CompressZip OPT10014 zipPath=" + zipPath);
                        FileLog.PrintF("EOS_CompressZip OPT10014 zipCheckPath=" + zipCheckPath);
                        CompressZip(zipPath, "OPT10014_", "");
                        DeleteFile(zipPath, "OPT10014_", "");
                        File.Move(zipCheckPath, ftpCheckPath);
                    }
                }

                //5. 주식일봉차트조회요청
                zipPath      = Config.GetPath() + "OPT10080_" + AppLib.getClass1Instance().endDateEos + ".zip";
                zipCheckPath = Config.GetPath() + "OPT10080.dat";
                ftpCheckPath = Config.GetPath() + "OPT10080_FTP.dat";
                if (File.Exists(zipPath) == false)
                {
                    if (File.Exists(zipCheckPath))
                    {
                        FileLog.PrintF("EOS_CompressZip OPT10080 zipPath=" + zipPath);
                        FileLog.PrintF("EOS_CompressZip OPT10080 zipCheckPath=" + zipCheckPath);
                        CompressZip(zipPath, "OPT10080_", "");
                        DeleteFile(zipPath, "OPT10080_", "");
                        File.Move(zipCheckPath, ftpCheckPath);
                    }
                }

                //5. 주식일봉차트조회요청
                zipPath      = Config.GetPath() + "OPT10001_" + AppLib.getClass1Instance().endDateEos + ".zip";
                zipCheckPath = Config.GetPath() + "OPT10001.dat";
                ftpCheckPath = Config.GetPath() + "OPT10001_FTP.dat";
                if (File.Exists(zipPath) == false)
                {
                    if (File.Exists(zipCheckPath))
                    {
                        FileLog.PrintF("EOS_CompressZip OPT10001 zipPath=" + zipPath);
                        FileLog.PrintF("EOS_CompressZip OPT10001 zipCheckPath=" + zipCheckPath);
                        CompressZip(zipPath, "OPT10001_", "");
                        DeleteFile(zipPath, "OPT10001_", "");
                        File.Move(zipCheckPath, ftpCheckPath);
                    }
                }
                Thread.Sleep(300000);//5분이면 압축이 되겠지???
            }
        }