Ejemplo n.º 1
0
 void m_Session_OnExecutionMessage(object sender, BWExecution executionMsg)
 {
     foreach (KeyValuePair <long, int> ordID in _bwOrdIds)
     {
         if (ordID.Value == executionMsg.OrderID)
         {
             Trade t = new TradeImpl(executionMsg.Symbol, (decimal)executionMsg.Price, executionMsg.Size);
             t.side    = (executionMsg.Side == ORDER_SIDE.SIDE_COVER) || (executionMsg.Side == ORDER_SIDE.SIDE_BUY);
             t.xtime   = TradeLink.Common.Util.DT2FT(executionMsg.ExecutionTime);
             t.xdate   = TradeLink.Common.Util.ToTLDate(executionMsg.ExecutionTime);
             t.Account = executionMsg.UserID.ToString();
             t.id      = ordID.Key;
             t.ex      = executionMsg.MarketMaker;
             tl.newFill(t);
         }
     }
 }
Ejemplo n.º 2
0
 void m_Session_OnExecutionMessage(object sender, BWExecution executionMsg)
 {
     foreach (KeyValuePair<long,int> ordID in _bwOrdIds)
         if ( ordID.Value == executionMsg.OrderID)
         {
             Trade t = new TradeImpl(executionMsg.Symbol, (decimal)executionMsg.Price, executionMsg.Size);
             t.side = (executionMsg.Side == ORDER_SIDE.SIDE_COVER) || (executionMsg.Side == ORDER_SIDE.SIDE_BUY);
             t.xtime = TradeLink.Common.Util.DT2FT(executionMsg.ExecutionTime);
             t.xdate = TradeLink.Common.Util.ToTLDate(executionMsg.ExecutionTime);
             t.Account = executionMsg.UserID.ToString();
             t.id = ordID.Key;
             t.ex = executionMsg.MarketMaker; 
             tl.newFill(t);
             v(t.symbol + " sent fill notification for: " + t.ToString());
         }
 }