public Order CreateBuyLimit(Portfolio portfolio, Security security, decimal price, decimal volume) { ++_lastUserId; return new Order() { UserID = _lastUserId, Portfolio = portfolio, Security = security, Direction = eSide.Buy, Type = eOrderType.Limit, Price = price, Volume = volume }; }
public Order CreateBuyStopLimit(Portfolio portfolio, Security security, decimal volume) { ++_lastUserId; return new Order() { UserID = _lastUserId, Portfolio = portfolio, Security = security, Direction = eSide.Sell, Type = eOrderType.Market, Price = 1, Volume = volume }; }
private void OnPortfolioChanged(Portfolio portfolio) { if (PortfolioChanged != null) PortfolioChanged(portfolio); }