Ejemplo n.º 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);
     }));
 }
Ejemplo n.º 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]);
        }