private void UpdateBuyAutoTradingDataGridStateOnly(string orderNum, string state) { foreach (TradingStrategy ts in tradingStrategyList) { foreach (var item in ts.tradingItemList) { coreEngine.SendLogWarningMessage("종목명 : " + axKHOpenAPI1.GetMasterCodeName(item.itemCode) + "orderNum : " + item.buyOrderNum); } TradingItem tradeItem = ts.tradingItemList.Find(o => o.buyOrderNum.Equals(orderNum)); if (tradeItem != null && tradeItem.GetUiConnectRow() != null) { tradeItem.GetUiConnectRow().Cells["매매진행_주문번호"].Value = orderNum; tradeItem.GetUiConnectRow().Cells["매매진행_진행상황"].Value = state; } } }
private void UpdateSellAutoTradingDataGridStatePrice(string orderNum, string conclusionPrice) { coreEngine.SendLogWarningMessage("요청 주문 넘버 : " + orderNum); foreach (TradingStrategy ts in tradingStrategyList) { foreach (var item in ts.tradingItemList) { coreEngine.SendLogWarningMessage("검색식 : " + ts.buyCondition.Name + " 종목명 : " + axKHOpenAPI1.GetMasterCodeName(item.itemCode) + "orderNum : " + item.sellOrderNum); } TradingItem tradeItem = ts.tradingItemList.Find(o => o.sellOrderNum.Equals(orderNum)); if (tradeItem != null) { tradeItem.GetUiConnectRow().Cells["매매진행_진행상황"].Value = TradingItem.StateToString(tradeItem.state); tradeItem.GetUiConnectRow().Cells["매매진행_매도가"].Value = conclusionPrice; tradeItem.GetUiConnectRow().Cells["매매진행_매도시간"].Value = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } } }
private void UpdateBuyAutoTradingDataGridState(string orderNum, bool buyComplete = false) { foreach (TradingStrategy ts in tradingStrategyList) { coreEngine.SendLogWarningMessage(ts.buyCondition.Name); TradingItem tradeItem = ts.tradingItemList.Find(o => o.buyOrderNum.Equals(orderNum)); foreach (var item in ts.tradingItemList) { coreEngine.SendLogWarningMessage(item.itemName + " 요청 주문 넘버 : " + orderNum); } if (tradeItem != null) { tradeItem.GetUiConnectRow().Cells["매매진행_진행상황"].Value = TradingItem.StateToString(tradeItem.state); tradeItem.GetUiConnectRow().Cells["매매진행_매수가"].Value = tradeItem.buyingPrice; tradeItem.GetUiConnectRow().Cells["매매진행_매수량"].Value = tradeItem.curQnt; tradeItem.GetUiConnectRow().Cells["매매진행_매수금"].Value = tradeItem.curQnt * tradeItem.buyingPrice; break; } } }