private void firstTrial(object sender, ElapsedEventArgs e) { var exeData = new FDDLExecutionData(m_stockName, OrderType.BUY, getQuantity(), getQuantity()); FDDLContractionEventCallback evcall = new FDDLContractionEventCallback(this, exeData, FDDLUIBinder.getBeforeWrapper()); ContractionEventManager.addCallback("FDDL-Before", evcall); int res = ProgramControl.getGateway().SendOrder("FDDL-Before", Screens.SCREEN_FDDLORDER, SystemInfo.ACCOUNT, 1, getStockCode(), getQuantity(), 0, "61", ""); if (res != 0) { //Debug Log -> 리턴코드 값 / 리턴코드표 참고 } }
private void thirdTrial(object sender, ElapsedEventArgs e) { var exeData = new FDDLExecutionData(m_stockName, OrderType.SELL, getQuantity(), getQuantity() - getAchieved()); FDDLContractionEventCallback evcall = new FDDLContractionEventCallback(null, exeData, FDDLUIBinder.getAAfterWrapper()); ContractionEventManager.addCallback("FDDL-ThirdSell", evcall); int res = ProgramControl.getGateway().SendOrder("FDDL-ThirdSell", Screens.SCREEN_FDDLORDER, SystemInfo.ACCOUNT, 2, getStockCode(), getQuantity(), getPrice(), "62", ""); if (res != 0) { //Debug Log -> 리턴코드 값 / 리턴코드표 참고 } }
private void secondTrial(object sender, ElapsedEventArgs e) { int orderQuantity = getQuantity() - getAchieved(); var exeData = new FDDLExecutionData(m_stockName, OrderType.BUY, getQuantity(), orderQuantity); FDDLContractionEventCallback evcall = new FDDLContractionEventCallback(this, exeData, FDDLUIBinder.getRegularWrapper()); ContractionEventManager.addCallback("FDDL-Regular", evcall); int res = ProgramControl.getGateway().SendOrder("FDDL-Regular", Screens.SCREEN_FDDLORDER, SystemInfo.ACCOUNT, 1, getStockCode(), orderQuantity, getPrice(), "00", ""); if (res != 0) { //Debug Log -> 리턴코드 값 / 리턴코드표 참고 } }
public void eventCallback(TrInfoWrapper wrapper) { int ep = int.Parse(wrapper.getData("현재가", 0)); if (ep <= m_parent.getPrice()) { int orderQuantity = m_parent.getQuantity() - m_parent.getAchieved(); var exeData = new FDDLExecutionData(m_parent.getStockName(), OrderType.BUY, m_parent.getQuantity(), orderQuantity); FDDLContractionEventCallback evcall = new FDDLContractionEventCallback(m_parent, exeData, FDDLUIBinder.getAfterWrapper()); ContractionEventManager.addCallback("FDDL-AfterOrder", evcall); int res = ProgramControl.getGateway().SendOrder("FDDL-AfterOrder", Screens.SCREEN_FDDLORDER, SystemInfo.ACCOUNT, 1, m_parent.getStockCode(), orderQuantity, 0, "81", ""); if (res != 0) { //Debug Log -> 리턴코드 값 / 리턴코드표 참고 } } }
private void m_gateway_OnReceiveMsg(object sender, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveMsgEvent e) { ContractionEventManager.gotContractionMessage(e.sRQName, e.sMsg); }
private void OnRecceiveTrData(object sender, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveTrDataEvent e) { ContractionEventManager.gotContracting(e.sTrCode, e.sRQName); TrEventManager.gotTrData(e.sTrCode, e.sRQName); }
private void OnReceiveChejanData(object sender, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveChejanDataEvent e) { ContractionEventManager.gotContracted(e.sGubun, e.sFIdList); }