User rating: 0
Joined: Sun 20 Feb, 2011, 21:34 Posts: 10
Hello.
I have a question. It is if I have no position,what will be returned by engine.getOrders()? I'd like to express "no position" in my strategy.
Adding,in same case,what will be return by IEngine.getOrders,IOrder.getCreationTime,getFillTime,getId,getInstrument,getLabel,getOpenPrice?
I hope your reply.
[quantisan]
Post subject: Re: getOrders()
Post rating: 0
Posted: Thu 31 Mar, 2011, 02:28
User rating: 1
Joined: Fri 26 Mar, 2010, 19:19 Posts: 116 Location: Canada
you get a List<IOrder> from getOrders(), so my guess is that you'll just get an empty list. In which case you wouldn't be able to fetch and then call an IOrder from it. Check for empty list with List.isEmpty().