public ExecutionStatus GetExecutionStatus(string strategyName) { ExecutionStatus status = null; if (strategyName != null && executionStatus.ContainsKey(strategyName)) { status = executionStatus[strategyName]; } return(status); }
public void Sell(EZInstrument instrument, int quantity, string strategyName) { if (strategyName != null) { executionStatus[strategyName] = new ExecutionStatus(strategyName); } ezPrice bid = instrument.Bid; EZOrder ezo = api.SellLimit(instrument, quantity, bid, strategyName); StoreOrder(strategyName, ezo); Spy.Print("SELL: {0} @ {1}", quantity, bid); }
public void Buy(EZInstrument instrument, int quantity, string strategyName) { if (strategyName != null) { executionStatus[strategyName] = new ExecutionStatus(strategyName); executionStatus[strategyName].quantitySubmitted = quantity; } ezPrice ask = instrument.Ask; EZOrder ezo = api.BuyLimit(instrument, quantity, ask, strategyName); StoreOrder(strategyName, ezo); Spy.Print("BUY: {0} @ {1}", quantity, ask); }