Ejemplo n.º 1
0
 /// <summary>
 /// Turns replay mode off
 /// </summary>
 public void TurnReplayModeOff()
 {
     ReplayService.TurnReplayModeOff(this);
     foreach (ExchangeEssentials exchangeEssentials in ExchangeEssentials)
     {
         exchangeEssentials.LimitOrderBook.TradeExecuted += exchangeEssentials.TradeListener.OnTrade;
         exchangeEssentials.LimitOrderBook.OrderChanged  += exchangeEssentials.DepthOrderBook.OnOrderChanged;
         exchangeEssentials.LimitOrderBook.OrderChanged  += exchangeEssentials.OrderListener.OnOrderChanged;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Turns on the replay mode and unsubscribes the OrderListener from listeneing to event while the replay mode is running
 /// </summary>
 public void TurnReplayModeOn()
 {
     ReplayService.TurnReplayModeOn(this);
     // Unsubscribe each order listener from each LimitOrderBook while replaying is in order
     foreach (ExchangeEssentials exchangeEssentials in ExchangeEssentials)
     {
         exchangeEssentials.LimitOrderBook.TradeExecuted -= exchangeEssentials.TradeListener.OnTrade;
         exchangeEssentials.LimitOrderBook.OrderChanged  -= exchangeEssentials.DepthOrderBook.OnOrderChanged;
         exchangeEssentials.LimitOrderBook.OrderChanged  -= exchangeEssentials.OrderListener.OnOrderChanged;
     }
 }