Exemplo n.º 1
0
 /// <summary>
 /// Create Trade Tick from TickMessage
 /// </summary>
 /// <param name="timestamp"></param>
 /// <param name="symbol"></param>
 /// <param name="tick"></param>
 /// <returns>Trade Tick</returns>
 private static Tick CreateTradeTick(DateTime timestamp, Symbol symbol, ITickMessage tick)
 {
     return(new Tick(
                timestamp,
                symbol,
                tick.TradeConditions,
                tick.TradeMarketCenter.ToStringInvariant(),
                tick.LastSize,
                (decimal)tick.Last
                ));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create Quote Tick from TickMessage
 /// </summary>
 /// <param name="timestamp"></param>
 /// <param name="symbol"></param>
 /// <param name="tick"></param>
 /// <returns>Quote Tick</returns>
 private static Tick CreateQuoteTick(DateTime timestamp, Symbol symbol, ITickMessage tick)
 {
     return(new Tick(
                timestamp,
                symbol,
                tick.TradeConditions,
                tick.TradeMarketCenter.ToStringInvariant(),
                0, // not provided by IQFeed on history
                (decimal)tick.Bid,
                0, // not provided by IQFeed on history
                (decimal)tick.Ask
                ));
 }