void tl_gotTick(Tick t) { if (archivetickbox.Checked) { ta.Save(t); } if (!barlist.ContainsKey(t.sym)) { barlist.Add(t.sym, new BarList(BarInterval.FiveMin, t.sym)); } else { barlist[t.sym].newTick(t); } if (boxlist.ContainsKey(t.sym) && (boxlist[t.sym] != null)) { Box b = boxlist[t.sym]; BoxInfo bi = new BoxInfo(); Position p = new Position(t.sym); try { p = poslist[t.sym]; } catch (KeyNotFoundException) { } Order o = b.Trade(t, barlist[t.sym], p, bi); o.Security = seclist[t.sym].Type; o.Exchange = seclist[t.sym].DestEx; o.LocalSymbol = seclist[t.sym].Name; tl.SendOrder(o); } }
void tl_gotTick(Tick t) { // see if we are tracking this symbol int[] idxs = new int[0]; if (!_symidx.TryGetValue(t.Sec.FullName, out idxs)) { return; } // see if we should save this tick if (archivetickbox.Checked) { _ta.Save(t); } // send tick to any valid requesting responses foreach (int idx in idxs) { if (_reslist[idx].isValid) { _reslist[idx].GotTick(t); } } }
void tl_gotTick(Tick t) { ta.Save(t); }
void tl_gotIndexTick(Index idx) { ta.Save(idx); }