Exemplo n.º 1
0
            public override void OnTick(Tick tick)
            {
                if (Cfg.SellPrice1 <= 0 && Cfg.BuyPrice1 <= 0)
                {
                    PrintTickInfo(tick);
                }

                Cfg.SellPrice1 = tick.GetAskPrice(0);
                Cfg.BuyPrice1  = tick.GetBidPrice(0);

                //ToDo ...
            }
Exemplo n.º 2
0
 static void PrintTickInfo(Tick tick)
 {
     Console.WriteLine(string.Format(" Tick,{0}, HighestPrice={1:g}, LowestPrice={2:g}, BidPrice0={3:g}, BidVolume0={4:d}, AskPrice0={5:g}, AskVolume0={6:d}, LastPrice={7:g}, TotalVolume={8:d}, TradingTime={9}",
                                     tick.InstrumentID,
                                     tick.HighestPrice,
                                     tick.LowestPrice,
                                     tick.GetBidPrice(0),
                                     tick.GetBidVolume(0),
                                     tick.GetAskPrice(0),
                                     tick.GetAskVolume(0),
                                     tick.LastPrice,
                                     tick.TotalVolume,
                                     tick.TradingTime));
 }
Exemplo n.º 3
0
 static void PrintTickInfo(Tick tick)
 {
     Console.WriteLine(string.Format(" Tick,{0} {1}, HighestPrice={2:g}, LowestPrice={3:g}, BidPrice0={4:g}, BidVolume0={5:d}, AskPrice0={6:g}, AskVolume0={7:d}, LastPrice={8:g}, LastVolume={9:d}, TradingDay={10}, TradingTime={11}",
                                     tick.ExchangeID,
                                     tick.InstrumentID,
                                     tick.HighestPrice,
                                     tick.LowestPrice,
                                     tick.GetBidPrice(0),
                                     tick.GetBidVolume(0),
                                     tick.GetAskPrice(0),
                                     tick.GetAskVolume(0),
                                     tick.LastPrice,
                                     tick.LastVolume,
                                     tick.TradingDay,
                                     tick.TradingTime));
 }