Example #1
0
 public void eventCallback(TrInfoWrapper wrapper)
 {
     if (m_type == 0)
     {
         m_budget = int.Parse(wrapper.getData("예수금", 0));
     }
     else if (m_type == 1)
     {
         m_budget = int.Parse(wrapper.getData("d+1추정예수금", 0));
     }
     m_bDataReady = true;
 }
        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 -> 리턴코드 값 / 리턴코드표 참고
                }
            }
        }