C2ServiceFactory factory = new C2ServiceFactory(simulationAdapter);
C2EntryService sentryService = factory.signalEntryService(password, systemId, eMail);
assertEquals(0, portfolio.position("msft").quantity().intValue());
Signal msft = sentryService.stockSignal(ActionForStock.BuyToOpen)
.quantity(10).symbol("msft")
.stopLoss(base, stopSize)
.duration(Duration.GoodTilCancel);
if (isLimit) {
msft = msft.limitOrder(triggerPrice);
} else {
msft = msft.stopOrder(triggerPrice);
}
Response openResponse = msft.send();
Integer signalId = openResponse.getInteger(C2Element.ElementSignalId);
assertEquals(0,signalId.intValue());