public FakeOandaOrder CreateOrder( int accountId, string instrument, int units, FakeOandaOrderType type, FakeOandaSide side, DateTime expiry, decimal price, decimal?lowerBound = null, decimal?upperBound = null, decimal?stopLoss = null, decimal?takeProfit = null, decimal?trailingStop = null) { var order = new FakeOandaOrder( _orderId++, instrument, units, side, type, CurrentTime, price, takeProfit, stopLoss, expiry, upperBound, lowerBound, trailingStop); Accounts[accountId].Orders.Add(order.Id, order); return(order); }
public FakeOandaOrder( int id, string instrument, int units, FakeOandaSide side, FakeOandaOrderType type, DateTime time, decimal?price, decimal?takeProfit, decimal?stopLoss, DateTime?expiry, decimal?upperBound, decimal?lowerBound, decimal?trailingStop) { Id = id; Instrument = instrument; Units = units; Side = side; Type = type; Time = time; Price = price; TakeProfit = takeProfit; StopLoss = stopLoss; Expiry = expiry; UpperBound = upperBound; LowerBound = lowerBound; TrailingStop = trailingStop; }
public FakeOandaOrder CreateSellOrder(int accountId, string instrument, int units, FakeOandaOrderType type, DateTime expiry, decimal price, decimal?lowerBound = null, decimal?upperBound = null, decimal?stopLoss = null, decimal?takeProfit = null, decimal?trailingStop = null) { return(CreateOrder(accountId, instrument, units, type, FakeOandaSide.sell, expiry, price, lowerBound, upperBound, stopLoss, takeProfit, trailingStop)); }