Пример #1
0
        private void OnOBNewOrderReport(object sender, AxICETRADEAPILib._DICETRADEAPIEvents_OBNewOrderReportEvent e)
        {
            TRptData tmpRptData = new TRptData();

            tmpRptData.nIndex   = e.nDataIndex;
            tmpRptData.nType    = e.nDataType;
            tmpRptData.nGridNum = m_OBOrderRow;
            LogTextBox.AppendText("new\n");
            dataGridView3.Rows.Add();
            dataGridView3.Rows[m_OBOrderRow].Cells[0].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, FTR_ID);
            dataGridView3.Rows[m_OBOrderRow].Cells[1].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, FTR_MTH);
            dataGridView3.Rows[m_OBOrderRow].Cells[2].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, CALLPUT);
            dataGridView3.Rows[m_OBOrderRow].Cells[3].Value = tradeApi.GetOBReportValue(e.nDataType, e.nDataIndex, STRIKE_PRICE) / 1000;
            dataGridView3.Rows[m_OBOrderRow].Cells[4].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, ORDNO);
            tmpRptData.nOrderNo = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, ORDNO);
            dataGridView3.Rows[m_OBOrderRow].Cells[5].Value  = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, BUYSELL);
            dataGridView3.Rows[m_OBOrderRow].Cells[6].Value  = tradeApi.GetOBReportValue(e.nDataType, e.nDataIndex, OD_PRICE) / 1000;
            dataGridView3.Rows[m_OBOrderRow].Cells[7].Value  = tradeApi.GetOBReportValue(e.nDataType, e.nDataIndex, OD_QTY);
            dataGridView3.Rows[m_OBOrderRow].Cells[8].Value  = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, OD_KEY);
            dataGridView3.Rows[m_OBOrderRow].Cells[9].Value  = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, ERR_CODE);
            dataGridView3.Rows[m_OBOrderRow].Cells[10].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, ERR_MSG);
            dataGridView3.Rows[m_OBOrderRow].Cells[11].Value = tradeApi.GetOBReportValue(e.nDataType, e.nDataIndex, FORM_TYPE);

            m_OBOrderReport.Add(tmpRptData);
            m_OBOrderRow = m_OBOrderRow + 1;
        }
Пример #2
0
        private void OnOBNewDealReport(object sender, AxICETRADEAPILib._DICETRADEAPIEvents_OBNewDealReportEvent e)
        {
            TRptData tmpRptData = new TRptData();

            tmpRptData.nIndex   = e.nDataIndex;
            tmpRptData.nType    = e.nDataType;
            tmpRptData.nGridNum = m_OBDealRow;
            dataGridView4.Rows.Add();
            dataGridView4.Rows[m_OBDealRow].Cells[0].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, FTR_ID);
            dataGridView4.Rows[m_OBDealRow].Cells[1].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, FTR_MTH);
            dataGridView4.Rows[m_OBDealRow].Cells[2].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, CALLPUT);
            dataGridView4.Rows[m_OBDealRow].Cells[3].Value = tradeApi.GetOBReportValue(e.nDataType, e.nDataIndex, STRIKE_PRICE) / 1000;
            dataGridView4.Rows[m_OBDealRow].Cells[4].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, ORDNO);
            dataGridView4.Rows[m_OBDealRow].Cells[5].Value = tradeApi.GetOBReportString(e.nDataType, e.nDataIndex, BUYSELL);
            dataGridView4.Rows[m_OBDealRow].Cells[6].Value = tradeApi.GetOBReportValue(e.nDataType, e.nDataIndex, OBOD_PRICE) / 1000;
            dataGridView4.Rows[m_OBDealRow].Cells[7].Value = tradeApi.GetOBReportValue(e.nDataType, e.nDataIndex, DEAL_QTY);
            m_OBDealReport.Add(tmpRptData);
            m_OBDealRow = m_OBDealRow + 1;
        }