Example #1
0
        public override void UpdateCurrentDayNode(Define.TTdxDllShareData data)
        {
            Define.TTDX_PKBASE pkData = new Define.TTDX_PKBASE();
            pkData = (Define.TTDX_PKBASE)Utility.BytesToStuct(data.buf, pkData.GetType(), 0);
            currentDayNode.time   = DateTime.Now.ToString("yyyyMMddhhmm");
            currentDayNode.open   = pkData.Open;
            currentDayNode.close  = pkData.Close;
            currentDayNode.high   = pkData.High;
            currentDayNode.low    = pkData.Low;
            currentDayNode.volumn = pkData.Volume;

            currentMinsNode.high    = Math.Max(currentMinsNode.high, pkData.Close);
            currentMinsNode.low     = Math.Min(currentMinsNode.low, pkData.Close);
            currentMinsNode.close   = pkData.Close;
            currentMinsNode.volumn += pkData.LastVolume;

            lastDealTime = (int)pkData.LastDealTime;
        }
        public override void UpdateCurrentDayNode(Define.TTdxDllShareData data)
        {
            Define.TTDX_PKBASE pkData = new Define.TTDX_PKBASE();
            pkData = (Define.TTDX_PKBASE)Utility.BytesToStuct(data.buf, pkData.GetType(), 0);
            currentDayNode.time = DateTime.Now.ToString("yyyyMMddhhmm");
            currentDayNode.open = pkData.Open;
            currentDayNode.close = pkData.Close;
            currentDayNode.high = pkData.High;
            currentDayNode.low = pkData.Low;
            currentDayNode.volumn = pkData.Volume;

            currentMinsNode.high = Math.Max(currentMinsNode.high, pkData.Close);
            currentMinsNode.low = Math.Min(currentMinsNode.low, pkData.Close);
            currentMinsNode.close = pkData.Close;
            currentMinsNode.volumn += pkData.LastVolume;

            lastDealTime = (int)pkData.LastDealTime;
        }