コード例 #1
0
ファイル: DownloadForm.cs プロジェクト: zhuzhenping/FreeOQ
        private void iitkJnDu9a([In] object obj0, [In] HistoricalMarketDepthEventArgs obj1)
        {
            uRIUcg8mp5qy3pl442 riUcg8mp5qy3pl442 = (uRIUcg8mp5qy3pl442)null;

            if (!this.V43ldlVmhs.TryGetValue(obj1.RequestId, out riUcg8mp5qy3pl442))
            {
                return;
            }
            Instrument         key              = riUcg8mp5qy3pl442.tRpHqexTIJ();
            MarketDepth        marketDepth      = obj1.MarketDepth;
            dtWG9eTloC3v1YLiPJ wg9eTloC3v1YliPj = (dtWG9eTloC3v1YLiPJ)null;

            if (this.sUBlFVkkCB.TryGetValue(key, out wg9eTloC3v1YliPj))
            {
                if (marketDepth.DateTime < wg9eTloC3v1YliPj.aZTF2X8GaL() || marketDepth.DateTime > wg9eTloC3v1YliPj.Kd2FKl42yG())
                {
                    key.Add(marketDepth);
                }
            }
            else
            {
                key.Add(marketDepth);
            }
            this.mwOkiJi9kn(riUcg8mp5qy3pl442, (HistoricalDataEventArgs)obj1);
        }
コード例 #2
0
ファイル: DownloadForm.cs プロジェクト: zhuzhenping/FreeOQ
        private void A6IkgWjeaP([In] object obj0, [In] HistoricalQuoteEventArgs obj1)
        {
            uRIUcg8mp5qy3pl442 riUcg8mp5qy3pl442 = (uRIUcg8mp5qy3pl442)null;

            if (!this.V43ldlVmhs.TryGetValue(obj1.RequestId, out riUcg8mp5qy3pl442))
            {
                return;
            }
            Instrument         key              = riUcg8mp5qy3pl442.tRpHqexTIJ();
            Quote              quote            = obj1.Quote;
            dtWG9eTloC3v1YLiPJ wg9eTloC3v1YliPj = (dtWG9eTloC3v1YLiPJ)null;

            if (this.sUBlFVkkCB.TryGetValue(key, out wg9eTloC3v1YliPj))
            {
                if (quote.DateTime < wg9eTloC3v1YliPj.aZTF2X8GaL() || quote.DateTime > wg9eTloC3v1YliPj.Kd2FKl42yG())
                {
                    key.Add(quote);
                }
            }
            else
            {
                key.Add(quote);
            }
            this.mwOkiJi9kn(riUcg8mp5qy3pl442, (HistoricalDataEventArgs)obj1);
        }
コード例 #3
0
ファイル: DownloadForm.cs プロジェクト: zhuzhenping/FreeOQ
        private void mlykVinkmu([In] object obj0, [In] EventArgs obj1)
        {
            if (!this.FgnkHl3Y97())
            {
                return;
            }
            this.NLklDLbERp.Clear();
            this.V43ldlVmhs.Clear();
            this.hRhl1skFVG.Clear();
            this.sUBlFVkkCB.Clear();
            foreach (uRIUcg8mp5qy3pl442 riUcg8mp5qy3pl442 in this.vY9kUsI2Ej.Items)
            {
                riUcg8mp5qy3pl442.rUvH6gPc7i();
                HistoricalDataRequest historicalDataRequest = new HistoricalDataRequest();
                historicalDataRequest.Instrument = (IFIXInstrument)riUcg8mp5qy3pl442.tRpHqexTIJ();
                historicalDataRequest.DataType   = (HistoricalDataType)this.j4UkPEuPyL.SelectedItem;
                historicalDataRequest.BeginDate  = this.Nk6ktIV1Ba.Value.Date;
                historicalDataRequest.EndDate    = this.CuMkNNYEDG.Value.Date;
                if (historicalDataRequest.DataType == HistoricalDataType.Bar)
                {
                    historicalDataRequest.BarSize = long.Parse(this.UkjlhoxVlP.Text);
                }
                this.NLklDLbERp.Add(historicalDataRequest.RequestId, historicalDataRequest);
                this.V43ldlVmhs.Add(historicalDataRequest.RequestId, riUcg8mp5qy3pl442);
                if (this.SOqlYER34W.Checked)
                {
                    IDataSeries dataSeries = (IDataSeries)null;
                    switch (historicalDataRequest.DataType)
                    {
                    case HistoricalDataType.Trade:
                        dataSeries = DataManager.GetDataSeries(riUcg8mp5qy3pl442.tRpHqexTIJ(), RNaihRhYEl0wUmAftnB.aYu7exFQKN(20924));
                        break;

                    case HistoricalDataType.Quote:
                        dataSeries = DataManager.GetDataSeries(riUcg8mp5qy3pl442.tRpHqexTIJ(), RNaihRhYEl0wUmAftnB.aYu7exFQKN(20910));
                        break;
                    }
                    if (dataSeries != null && dataSeries.Count > 0)
                    {
                        dtWG9eTloC3v1YLiPJ wg9eTloC3v1YliPj = new dtWG9eTloC3v1YLiPJ(dataSeries.FirstDateTime, dataSeries.LastDateTime);
                        this.sUBlFVkkCB.Add(riUcg8mp5qy3pl442.tRpHqexTIJ(), wg9eTloC3v1YliPj);
                    }
                }
            }
            this.i0nkpjc7Mk.Enabled = false;
            this.vWUkAGiTtg.Enabled = false;
            this.qy2k5NRmE4.Enabled = false;
            this.srEkmli0kD.Enabled = true;
            this.Do1kX8Voem.Enabled = false;
            this.YhakKNtGsn.Value   = 0;
            this.YhakKNtGsn.Minimum = 0;
            this.YhakKNtGsn.Maximum = this.NLklDLbERp.Count;
            this.YhakKNtGsn.Step    = 1;
            ThreadPool.QueueUserWorkItem(new WaitCallback(this.iWVkkmJrHP), (object)this.ItskcDWUqc.Value);
        }
コード例 #4
0
ファイル: DownloadForm.cs プロジェクト: heber/FreeOQ
 private void mlykVinkmu([In] object obj0, [In] EventArgs obj1)
 {
   if (!this.FgnkHl3Y97())
     return;
   this.NLklDLbERp.Clear();
   this.V43ldlVmhs.Clear();
   this.hRhl1skFVG.Clear();
   this.sUBlFVkkCB.Clear();
   foreach (uRIUcg8mp5qy3pl442 riUcg8mp5qy3pl442 in this.vY9kUsI2Ej.Items)
   {
     riUcg8mp5qy3pl442.rUvH6gPc7i();
     HistoricalDataRequest historicalDataRequest = new HistoricalDataRequest();
     historicalDataRequest.Instrument = (IFIXInstrument) riUcg8mp5qy3pl442.tRpHqexTIJ();
     historicalDataRequest.DataType = (HistoricalDataType) this.j4UkPEuPyL.SelectedItem;
     historicalDataRequest.BeginDate = this.Nk6ktIV1Ba.Value.Date;
     historicalDataRequest.EndDate = this.CuMkNNYEDG.Value.Date;
     if (historicalDataRequest.DataType == HistoricalDataType.Bar)
       historicalDataRequest.BarSize = long.Parse(this.UkjlhoxVlP.Text);
     this.NLklDLbERp.Add(historicalDataRequest.RequestId, historicalDataRequest);
     this.V43ldlVmhs.Add(historicalDataRequest.RequestId, riUcg8mp5qy3pl442);
     if (this.SOqlYER34W.Checked)
     {
       IDataSeries dataSeries = (IDataSeries) null;
       switch (historicalDataRequest.DataType)
       {
         case HistoricalDataType.Trade:
           dataSeries = DataManager.GetDataSeries(riUcg8mp5qy3pl442.tRpHqexTIJ(), RNaihRhYEl0wUmAftnB.aYu7exFQKN(20924));
           break;
         case HistoricalDataType.Quote:
           dataSeries = DataManager.GetDataSeries(riUcg8mp5qy3pl442.tRpHqexTIJ(), RNaihRhYEl0wUmAftnB.aYu7exFQKN(20910));
           break;
       }
       if (dataSeries != null && dataSeries.Count > 0)
       {
         dtWG9eTloC3v1YLiPJ wg9eTloC3v1YliPj = new dtWG9eTloC3v1YLiPJ(dataSeries.FirstDateTime, dataSeries.LastDateTime);
         this.sUBlFVkkCB.Add(riUcg8mp5qy3pl442.tRpHqexTIJ(), wg9eTloC3v1YliPj);
       }
     }
   }
   this.i0nkpjc7Mk.Enabled = false;
   this.vWUkAGiTtg.Enabled = false;
   this.qy2k5NRmE4.Enabled = false;
   this.srEkmli0kD.Enabled = true;
   this.Do1kX8Voem.Enabled = false;
   this.YhakKNtGsn.Value = 0;
   this.YhakKNtGsn.Minimum = 0;
   this.YhakKNtGsn.Maximum = this.NLklDLbERp.Count;
   this.YhakKNtGsn.Step = 1;
   ThreadPool.QueueUserWorkItem(new WaitCallback(this.iWVkkmJrHP), (object) this.ItskcDWUqc.Value);
 }