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 FakeOandaTrade( int id, string instrument, int units, FakeOandaSide side, DateTime time, decimal price, decimal?takeProfit, decimal?stopLoss, decimal?trailingStop) { Id = id; Instrument = instrument; Units = units; Side = side; Time = time; Price = price; TakeProfit = takeProfit; StopLoss = stopLoss; TrailingStop = trailingStop; }
public FakeOandaTrade CreateTrade( int accountId, string instrument, int units, FakeOandaSide side, decimal price, decimal?stopLoss = null, decimal?takeProfit = null, decimal?trailingStop = null) { var trade = new FakeOandaTrade( _tradeId++, instrument, units, side, CurrentTime, price, takeProfit, stopLoss, trailingStop); Accounts[accountId].Trades.Add(trade.Id, trade); return(trade); }