public void HandleDeal(SpotDeal sd) { this.NewestDealPrice = sd.Price; Deals.Put(sd); e24.Put(sd.Price); c24.Put(sd.Count); }
public void Put(SpotDeal sd) { var dc = Items.Count; if (dc > max) { int c = dc - max; lock (loc) { Items.RemoveRange(0, c); } } Items.Add(sd); }
void RaiseDeal(SpotOrder main, SpotOrder slave) { SpotDeal sd = new SpotDeal { Id = IdService <SpotDeal> .Instance.NewId(), When = DateTime.Now, Count = main.DoneCount, Price = main.DonePrice, MainId = main.Id, SlaveId = slave.Id, MainTraderName = main.Trader.Name, SlaveTraderId = slave.Trader.Name, Coin = main.Coin, CoinId = main.CoinId, MainOrderDir = main.Direction }; if (OnDeal != null) { OnDeal(sd); } }
void match_OnDeal(SpotDeal obj) { Market.Get(obj.Coin).HandleDeal(obj); model.SaveDeal(obj); ohlcGen.Handle(obj); }
public void SaveDeal(SpotDeal sd) { sds.Save(sd); }