protected void Page_Load(object sender, EventArgs e) { StockData mSD = new StockData(); lstLog.DataSource = mSD.SelListLog(); lstLog.DataBind(); mSD = null; }
public void SelReservation() { StockAnalyzer mSA = new StockAnalyzer(); StockData mSD = new StockData(); //Stock Code를 얻어온다. DataTable mDtMyStock = mSD.SelListMyStock(); for (int i = 0; i < mDtMyStock.Rows.Count; i++) { string mID = mDtMyStock.Rows[i]["ID"].ToString(); string mCode = mDtMyStock.Rows[i]["Code"].ToString(); //주식의 1일선,5일선,10일선 생성 DataSet mStockDS = mSA.SetStockTrend(mCode); if (mStockDS != null) { int mNowCost = mSA.GetBuySellCost(mCode, "S"); //기술적 분석패턴과 일치하는 이평선이 있는지 검사 string mCP = GetMatchSelPattern(mStockDS, mDtMyStock.Rows[i], mNowCost); if (mCP != "") { string mSPatternCode = mCP.Split('|')[0]; string mSPattern = mCP.Split('|')[1]; //mSD.UpdSellReservation(mID, mSPatternCode, mSPattern, mNowCost); mSD.UpdSellReservationTest(mID, mSPatternCode, mSPattern, mNowCost); } } } mSD = null; mSA = null; }
protected void Page_Load(object sender, EventArgs e) { StockData mSD = new StockData(); lstMyStock.DataSource = mSD.SelListSellStock(DateTime.Now.ToString("yyyyMM")); lstMyStock.DataBind(); mSD = null; }
public void BuyReservation() { StockAnalyzer mSA = new StockAnalyzer(); StockData mSD = new StockData(); //Stock Code를 얻어온다. string[] mResult = mSA.GetStockCode(); for (int i = 0; i < mResult.Length; i++) { //주식의 1일선,5일선,10일선 생성 DataSet mStockDS = mSA.SetStockTrend(mResult[i]); if (mStockDS != null) { //기술적 분석패턴과 일치하는 이평선이 있는지 검사 string mCSP = GetMatchBuyPattern(mStockDS); if (mCSP != "") { string mBPatternCode = mCSP.Split('|')[0]; int mBCost = mSA.GetBuySellCost(mResult[i], "B"); int mSCost = Convert.ToInt32(mCSP.Split('|')[1]); string mBPattern = mCSP.Split('|')[2]; if (mBCost != 0) { //int mCnt = ((300000 / mBCost) / 10) * 10; int mCnt = ((1000000000 / mBCost) / 10) * 10; if (mCnt != 0) { //mSD.InsBuyReservation(mResult[i], mBPatternCode, mBPattern, mCnt, mBCost, mSCost); mSD.InsBuyReservationTest(mResult[i], mBPatternCode, mBPattern, mCnt, mBCost, mSCost); } } } } } mSD = null; mSA = null; }
protected void Page_Load(object sender, EventArgs e) { StockData mSD = new StockData(); lstBuyPatternList.DataSource = mSD.SelListReport_BuyPattern(); lstBuyPatternList.DataBind(); lstSellPatternList.DataSource = mSD.SelListReport_SelPattern(); lstSellPatternList.DataBind(); string mTotalVal = mSD.GetTotalRevenue().ToString(); if (Convert.ToInt32(mTotalVal) < 0) { mTotalVal = "<span style='color:#ff0000'>" + mTotalVal + "</span>"; } else { mTotalVal = "<span style='color:#3366ff'>" + mTotalVal + "</span>"; } litTotal.Text = mTotalVal; mSD = null; }