Esempio n. 1
0
		private void QuoteService_onQuote(object sender, QuoteEvent e) {
			lock (__cQueue) {
				__cQueue.Enqueue(e);
			}
			
			AsyncMergeTick();
		}
Esempio n. 2
0
		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();
				}
			}
		}
Esempio n. 3
0
		private void QuoteService_onQuote(object sender, QuoteEvent e) {
			lock (__cQueue) {
				__cQueue.Enqueue(e);
			}
			__cTimer.Start();
		}
Esempio n. 4
0
		/// <summary>
		///   發送即時成交Tick的通知
		/// </summary>
		/// <param name="e">QuoteEvent類別</param>
		protected void OnQuote(QuoteEvent e) {
			if (onQuote != null) {
				Task.Factory.StartNew(() => {
					onQuote(this, e);
				});
			}
		}
Esempio n. 5
0
        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);
        }