private void QuoteService_onQuote(object sender, QuoteEvent e) { lock (__cQueue) { __cQueue.Enqueue(e); } AsyncMergeTick(); }
private void QuoteService_onQuote(object sender, QuoteEvent e) { string sSymbolId = this.Bars.Request.Symbol; if (sSymbolId.Equals(e.Quote.SymbolId)) { Interlocked.Increment(ref __iTickCount); if (!__bBusy) { AsyncCalculate(); } } }
private void QuoteService_onQuote(object sender, QuoteEvent e) { lock (__cQueue) { __cQueue.Enqueue(e); } __cTimer.Start(); }
/// <summary> /// 發送即時成交Tick的通知 /// </summary> /// <param name="e">QuoteEvent類別</param> protected void OnQuote(QuoteEvent e) { if (onQuote != null) { Task.Factory.StartNew(() => { onQuote(this, e); }); } }
private static void cService_onQuote(object sender, Events.QuoteEvent e) { ITick cTick = e.Quote.GetTick(0); System.Console.WriteLine("{0} {1,8:0.00} {2,10} {3, 10}", cTick.Time.ToString("HHmmss"), cTick.Price, cTick.Single, cTick.Volume); }