public void SendHistoricalDataRequest(FreeQuant.Providers.HistoricalDataRequest request) { HistoricalDataRequest request1 = new HistoricalDataRequest(request); this.historicalDataRequests.Add(request.RequestId, request1); this.provider.CallRequestHistoricalData(request1); }
private static ArrayList r6ZT8iFUv(IHistoricalDataProvider provider, Instrument instrument, DataManager.EDataSeries dataType, DateTime beginDate, DateTime endDate, long barSize) { if (provider == null) throw new ArgumentNullException("Provider is null"); if (instrument == null) throw new ArgumentNullException("Instrument is null"); if (!provider.IsConnected) { provider.Connect(10000); if (!provider.IsConnected) throw new InvalidOperationException("Provider cannot make a connection"); } HistoricalDataRequest request = new HistoricalDataRequest(); request.Instrument = instrument; switch (dataType) { case DataManager.EDataSeries.Daily: request.DataType = HistoricalDataType.Daily; break; case DataManager.EDataSeries.Trade: request.DataType = HistoricalDataType.Trade; break; case DataManager.EDataSeries.Quote: request.DataType = HistoricalDataType.Quote; break; case DataManager.EDataSeries.Bar: request.DataType = HistoricalDataType.Bar; request.BarSize = barSize; break; } request.BeginDate = beginDate; request.EndDate = endDate; return new HistoricalDataGetter(provider, request).GetData(); }
public void SendHistoricalDataRequest(HistoricalDataRequest request) { WebRequest webRequest = WebRequest.Create(string.Format(RbFKKlTxInQUoAZCSj.q6GyF96n8(96), (object) RbFKKlTxInQUoAZCSj.q6GyF96n8(268), (object) (request.Instrument as Instrument).GetSymbol(this.Name), (object) (request.BeginDate.Month - 1), (object) request.BeginDate.Day, (object) request.BeginDate.Year, (object) (request.EndDate.Month - 1), (object) request.EndDate.Day, (object) request.EndDate.Year)); this.EjDBtJJBo.Add(request.RequestId, webRequest); webRequest.BeginGetResponse(new AsyncCallback(this.LEn1aOXgs), (object) request); }
public HistoricalDataGetter(IHistoricalDataProvider provider, HistoricalDataRequest request) { this.provider = provider; this.request = request; }
public void Add(string requestId, HistoricalDataRequest request) { lock (this) this.dictionary.Add(requestId, request); }
internal HistoricalDataRequest(FreeQuant.Providers.HistoricalDataRequest request) { this.request = request; }
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); }
private void btnDownload_Click(object sender, EventArgs e) { if (!this.ValidateDownloadSettings()) return; this.requests.Clear(); this.items.Clear(); this.activeRequests.Clear(); foreach (DownloadViewItem downloadViewItem in this.ltvDownload.Items) { downloadViewItem.Reset(); HistoricalDataRequest historicalDataRequest = new HistoricalDataRequest(); historicalDataRequest.Instrument = (IFIXInstrument) downloadViewItem.Instrument; historicalDataRequest.DataType = (HistoricalDataType)this.cbxDataTypes.SelectedItem; historicalDataRequest.BeginDate = this.dtpBegin.Value.Date; historicalDataRequest.EndDate = this.dtpEnd.Value.Date; if (historicalDataRequest.DataType == HistoricalDataType.Bar) historicalDataRequest.BarSize = (this.cbxBarSize.SelectedItem as BarSizeItem).BarSize; this.requests.Add(historicalDataRequest.RequestId, historicalDataRequest); this.items.Add(historicalDataRequest.RequestId, downloadViewItem); } this.gbxSettings.Enabled = false; this.gbxAdvanced.Enabled = false; this.btnDownload.Enabled = false; this.btnStop.Enabled = true; this.btnClose.Enabled = false; this.progressBar.Value = 0; this.progressBar.Minimum = 0; this.progressBar.Maximum = this.requests.Count; this.progressBar.Step = 1; ThreadPool.QueueUserWorkItem(new WaitCallback(this.DownloadThread), this.trbMaxRequests.Value); }
public void SendHistoricalDataRequest(HistoricalDataRequest request) { if (!this.pxqdEt2GB) this.YchVmYD17(SbDbdFkjjUR5MmWTlj.fvNFD9DS2(0)); else if (request.DataType != HistoricalDataType.Daily) { this.YchVmYD17(string.Format(SbDbdFkjjUR5MmWTlj.fvNFD9DS2(32), (object) request.DataType)); } else { WebRequest webRequest = WebRequest.Create(string.Format((IFormatProvider) CultureInfo.InvariantCulture, SbDbdFkjjUR5MmWTlj.fvNFD9DS2(120), (object) (request.Instrument as Instrument).GetSymbol(this.Name), (object) request.BeginDate, (object) request.EndDate)); this.K4r2jjlJs.Add(request.RequestId, webRequest); webRequest.BeginGetResponse(new AsyncCallback(this.tm9qNM8Cd), (object) request); } }