Пример #1
0
 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);
     }));
 }
Пример #2
0
        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]);
        }