Exemplo n.º 1
0
 public void EmitHistoricalDataCancelled(global::OpenQuant.API.HistoricalDataRequest request)
 {
     if (this.HistoricalDataRequestCancelled != null)
     {
         HistoricalDataEventArgs args = new HistoricalDataEventArgs(request.request.RequestId, request.request.Instrument, this, 0);
         this.HistoricalDataRequestCancelled(this, args);
     }
 }
Exemplo n.º 2
0
 public void EmitHistoricalDataError(global::OpenQuant.API.HistoricalDataRequest request, string message)
 {
     if (this.HistoricalDataRequestError != null)
     {
         HistoricalDataErrorEventArgs args = new HistoricalDataErrorEventArgs(request.request.RequestId, request.request.Instrument, this, 0, message);
         this.HistoricalDataRequestError(this, args);
     }
 }
Exemplo n.º 3
0
 public void EmitHistoricalQuote(global::OpenQuant.API.HistoricalDataRequest request, DateTime datetime, double bid, int bidSize, double ask, int askSize)
 {
     if (this.NewHistoricalQuote != null)
     {
         SmartQuant.Data.Quote    quote = new SmartQuant.Data.Quote(datetime, bid, bidSize, ask, askSize);
         HistoricalQuoteEventArgs args  = new HistoricalQuoteEventArgs(quote, request.request.RequestId, request.request.Instrument, this, 0);
         this.NewHistoricalQuote(this, args);
     }
 }
Exemplo n.º 4
0
 public void EmitHistoricalTrade(global::OpenQuant.API.HistoricalDataRequest request, DateTime datetime, double price, int size)
 {
     if (this.NewHistoricalTrade != null)
     {
         SmartQuant.Data.Trade    trade = new SmartQuant.Data.Trade(datetime, price, size);
         HistoricalTradeEventArgs args  = new HistoricalTradeEventArgs(trade, request.request.RequestId, request.request.Instrument, this, 0);
         this.NewHistoricalTrade(this, args);
     }
 }
Exemplo n.º 5
0
 public void EmitHistoricalBar(global::OpenQuant.API.HistoricalDataRequest request, DateTime datetime, double open, double high, double low, double close, long volume)
 {
     if (this.NewHistoricalBar != null)
     {
         SmartQuant.Data.Bar bar;
         if (request.request.DataType == HistoricalDataType.Daily)
         {
             bar = new Daily(datetime, open, high, low, close, volume, 0L);
         }
         else
         {
             bar = new SmartQuant.Data.Bar(datetime, open, high, low, close, volume, request.request.BarSize);
         }
         HistoricalBarEventArgs args = new HistoricalBarEventArgs(bar, request.request.RequestId, request.request.Instrument, this, 0);
         this.NewHistoricalBar(this, args);
     }
 }
Exemplo n.º 6
0
 public void SendHistoricalDataRequest(SmartQuant.Providers.HistoricalDataRequest request)
 {
     global::OpenQuant.API.HistoricalDataRequest historicalDataRequest = new global::OpenQuant.API.HistoricalDataRequest(request);
     this.historicalDataRequests.Add(request.RequestId, historicalDataRequest);
     this.provider.CallRequestHistoricalData(historicalDataRequest);
 }
Exemplo n.º 7
0
		public void SendHistoricalDataRequest(SmartQuant.Providers.HistoricalDataRequest request)
		{
			global::OpenQuant.API.HistoricalDataRequest historicalDataRequest = new global::OpenQuant.API.HistoricalDataRequest(request);
			this.historicalDataRequests.Add(request.RequestId, historicalDataRequest);
			this.provider.CallRequestHistoricalData(historicalDataRequest);
		}