Example #1
0
 private static void EmitNewMarketDepth(object sender, MarketDepthEventArgs e)
 {
     if (ProviderManager.threadSafe)
     {
         Monitor.Enter(ProviderManager.dataLock);
     }
     try
     {
         if (ProviderManager.NewMarketDepth != null)
         {
             ProviderManager.NewMarketDepth(sender, e);
         }
     }
     finally
     {
         if (ProviderManager.threadSafe)
         {
             Monitor.Exit(ProviderManager.dataLock);
         }
     }
 }
Example #2
0
 private void OnNewMarketDepth(object sender, MarketDepthEventArgs args)
 {
   if (!this.isRunning || !this.cbxMarketDepth.Checked)
     return;
   this.queue.Enqueue((Action) (() =>
   {
     Instrument local_0 = ((IntradayEventArgs) args).Instrument as Instrument;
     InstrumentRow local_1 = this.instruments[local_0] as InstrumentRow;
     if (local_1 == null)
       return;
     local_0.Add(args.MarketDepth);
     ++local_1.MarketDepths;
   }));
 }
Example #3
0
 private static void OnNewMarketDepth(object sender, MarketDepthEventArgs e)
 {
     Instrument instrument = e.Instrument as Instrument ?? InstrumentManager.Instruments[e.Instrument.Symbol, e.Provider.Name];
     if (instrument != null)
         instrument.EmitNewMarketDepth(e);
 }
Example #4
0
		internal void RygW1dLdu5(MarketDepthEventArgs obj0)
		{
			try
			{
				Instrument instrument = obj0.Instrument as Instrument;
				MarketDepth marketDepth = obj0.MarketDepth;
				foreach (StrategyBase strategyBase in this.MU0WP1r0b1(obj0.Provider, instrument))
					strategyBase.NEl89GHdA(instrument, marketDepth);
				this.metaMoneyManager.OnMarketDepth(instrument, marketDepth);
				this.OnNewMarketDepth(instrument, marketDepth);
			}
			catch (Exception ex)
			{
				this.x6bWBlLIvv(ex);
			}
		}
Example #5
0
 internal void EmitNewMarketDepth(MarketDepthEventArgs e)
 {
     this.MarketDepth = e.MarketDepth;
     if (this.NewMarketDepth != null)
         this.NewMarketDepth(this, e);
     this.OrderBook.Add(e.MarketDepth);
 }
Example #6
0
 private static void EmitNewMarketDepth(object sender, MarketDepthEventArgs e)
 {
     if (ProviderManager.threadSafe)
         Monitor.Enter(ProviderManager.dataLock);
     try
     {
     if (ProviderManager.NewMarketDepth != null)
             ProviderManager.NewMarketDepth(sender, e);
     }
     finally
     {
         if (ProviderManager.threadSafe)
             Monitor.Exit(ProviderManager.dataLock);
     }
 }
Example #7
0
 private void ProviderManager_NewMarketDepth(object sender, MarketDepthEventArgs args)
 {
   lock (this)
   {
     ++this.countMarketDepth;
     ++this.countMarketDataTotal;
   }
 }
Example #8
0
 private void marketDataProvider_NewMarketDepth(object sender, MarketDepthEventArgs args)
 {
     FreeQuant.Instruments.Instrument instrument = args.Instrument as FreeQuant.Instruments.Instrument;
     List<StrategyRunner> list = (List<StrategyRunner>)null;
     if (!this.instrumentTable.TryGetValue(instrument, out list))
         return;
     foreach (StrategyRunner strategyRunner in list)
         strategyRunner.SetNewMarketDepth(instrument, args.MarketDepth);
 }