public virtual void cancelOrders(Predicate <Order> needsCancel) { each(orders_.values(), ordersList => ordersList.RemoveAll(o => { var cancel = needsCancel(o); if (!cancel) { return(false); } o.cancel(); return(true); })); }
public DateTime date(int dateIndex) { var times = sort(unique(collect(bars.values(), barSpud => barSpud.times))); // simulator index and spud index are inverted return(times[dateIndex]); }