|
Attention! Read the forum rules carefully before posting a topic.
Submit JForex API bug reports in this forum only. Submit Converter issues in Converter Issues. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
hi.support..get last order have bug.... |
zzping115
|
Post subject: hi.support..get last order have bug.... |
Post rating: 0
|
Posted: Thu 12 Feb, 2015, 16:14
|
|
User rating: 0
Joined: Wed 28 Mar, 2012, 06:41 Posts: 25 Location: China, Beijing
|
I want to get the current instrument the last "Filled" order .but there are sometimes get thr wrong one.pls handle it..
private IOrder getLastOrder(Instrument instrument)throws JFException { IOrder o = null; List<IOrder> ss = engine.getOrders(instrument); if(ss != null && ss.size() > 0){ for(int i = 0;i<ss.size();i++){ if(o == null && ss.get(i).getState() == IOrder.State.FILLED) o = ss.get(i); else if(o != null && o.getFillTime() < ss.get(i).getFillTime() && ss.get(i).getState() == IOrder.State.FILLED) o = ss.get(i); } } return o; }
|
|
|
|
 |
API Support
|
Post subject: Re: hi.support..get last order have bug.... |
Post rating: 0
|
Posted: Fri 13 Feb, 2015, 11:14
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Unfortunately we were unable to reproduce this problem. It would be easier to tell what is happening if you could provide 1) a sample strategy to create the orders and 2) describe how did you notice the problem?
Please note that it is not guaranteed that orders will get filled in the order that they are created.
|
|
|
|
 |
zzping115
|
Post subject: Re: hi.support..get last order have bug.... |
Post rating: 0
|
Posted: Mon 16 Feb, 2015, 04:47
|
|
User rating: 0
Joined: Wed 28 Mar, 2012, 06:41 Posts: 25 Location: China, Beijing
|
sometimes this bug happen. the probability in remote run is greater than local run.. you can test it
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|