//TODO: END -> ADD TO MODULE INTERFACE /// <summary> /// Gets the currently active order tickets. /// </summary> /// <param name="security">The security.</param> /// <returns></returns> public OrderTicket[] GetOrderTickets(Security security) => OrderTickets.Where(x => x.Security.Ticker == security.Ticker).ToArray();
/// <summary> /// Search the currently active order tickets. /// </summary> /// <param name="search">The search.</param> /// <returns></returns> public OrderTicket[] GetOrderTickets(Func <OrderTicket, bool> search) => OrderTickets.Where(search).ToArray();
/// <summary> /// Check if we are allowed to perform trades /// </summary> /// <param name="security"></param> /// <returns></returns> public override bool IsTradingAllowed(Security security) => OrderTickets.Count(x => x.Security == security && x.State != OrderTicketState.Processed) == 0;