コード例 #1
0
        /// <summary>行情数据返回:更新本地数据</summary>
        /// ??根据合约ID 触发对应回调?
        private void onRtnDepthMarketData(String[] resStr)
        {
            MD md = new MD();

            md.SetData(resStr);

            int index = instrumentIndex[md.InstrumentID];

            marketData[index - 1].Add(md);

            int  thisCount  = marketData[index - 1].Count;
            long thisVolume = 0;

            if (thisCount >= 2)
            {
                thisVolume = marketData[index - 1][thisCount - 1].Volume - marketData[index - 1][thisCount - 2].Volume;
            }
            FormTool.DisplayMarketData(md.GetData(thisVolume));
        }