public Trade(DateTime tradingTime, string epic, SIGNAL_CODE direction, int size, decimal price, int placeHolder = 0, TradeCancelled onTradeCancelled = null) { _tradingTime = tradingTime; _epic = epic; _direction = direction; _size = size; _price = price; _placeHolder = placeHolder; _tradeCancelled = onTradeCancelled; }
public Trade(Trade cpy, bool opposite = false, DateTime? trading_time = null) { this._epic = cpy._epic; if (opposite) { this._direction = (cpy._direction == SIGNAL_CODE.BUY ? SIGNAL_CODE.SELL : SIGNAL_CODE.BUY); this._tradingTime = trading_time.Value; } else { this._direction = cpy._direction; this._tradingTime = cpy._tradingTime; this._confirmationTime = cpy._confirmationTime; } this._size = cpy._size; this._reference = cpy._reference; this._id = cpy._id; this._price = cpy._price; this._placeHolder = cpy._placeHolder; this._tradeCancelled = cpy._tradeCancelled; }