|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
| Order Close Error |
|
[syedrizwanm]
|
| Post subject: Order Close Error |
Post rating: 0
|
Posted: Thu 10 Jun, 2010, 08:38
|
|
User rating: 0
Joined: Thu 10 Jun, 2010, 08:35 Posts: 5
|
|
Hi, I am running a strategy live now, i am receiving this error when it tries to close a pending SellLimit order:
02:57:12 at java.lang.Thread.run(Unknown Source) 02:57:12 at com.dukascopy.api.impl.execution.l$a.run(Unknown Source) 02:57:12 at com.dukascopy.api.impl.execution.l$a.a(Unknown Source) 02:57:12 at java.util.concurrent.FutureTask.run(Unknown Source) 02:57:12 at java.util.concurrent.FutureTask$Sync.innerRun(UnknownSource) 02:57:12 at com.dukascopy.api.impl.execution.g.call(Unknown Source) 02:57:12 at jforex.YDAController.onBar(YDAController.java:52) 02:57:12 atydastrategies.ControllerStrategy.onBar(ControllerStrategy.java:272) 02:57:12 at ydastrategies.YDAEdge.onBar(YDAEdge.java:281) 02:57:12 atcom.dukascopy.api.impl.connect.PlatformOrderImpl.close(Unknown Source) 02:57:12 atcom.dukascopy.api.impl.connect.PlatformOrderImpl.close(Unknown Source) 02:57:12 atcom.dukascopy.api.impl.connect.PlatformOrderImpl.close(Unknown Source) 02:57:12 atcom.dukascopy.api.impl.connect.PlatformOrderImpl.close(Unknown Source) 02:57:12 at com.dukascopy.api.impl.connect.j.b(Unknown Source) 02:57:12 java.lang.NullPointerException 02:57:12 Thu Jun 10 13:02:01 EST 2010 - Error: null Instrument: EUR/AUD
Line 281 on YDAEdge is a simple lastOrder.close() statement and it cannot be null because on the previous line it's checking the OrderCommand for this order . The statement has closed other orders successfully but only this one (EUR/AUD, Sell Limit) it is having trouble with.
Update: I have closed the EUR/AUD Sell Limit manually for now, but you can actually have a look at it may be there was someothing wrong with the order itself. The code actually tried to close it many times (on every minute bar) but returned the same error as mentioned above.
Please advise what to do in this case. Regards,
Riz
|
|
|
|
|
 |
|
[syedrizwanm]
|
| Post subject: Re: Order Close Error |
Post rating: 0
|
Posted: Fri 11 Jun, 2010, 13:51
|
|
User rating: 0
Joined: Thu 10 Jun, 2010, 08:35 Posts: 5
|
|
It did it again today with EUR/SEK Orders.
|
|
|
|
|
 |
|
[Phantal]
|
| Post subject: Re: Order Close Error |
Post rating: 0
|
Posted: Fri 11 Jun, 2010, 16:34
|
|
User rating: 0
Joined: Fri 07 May, 2010, 02:59 Posts: 61
|
|
If you're trying to place orders on crosses, it'll fail every time.
-Brian
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: Order Close Error |
Post rating: 0
|
Posted: Tue 22 Jun, 2010, 13:14
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
Please, check if you have this kind of issue on the demo.
|
|
|
|
|
 |
|
[syedrizwanm]
|
| Post subject: Re: Order Close Error |
Post rating: 0
|
Posted: Tue 29 Jun, 2010, 06:11
|
|
User rating: 0
Joined: Thu 10 Jun, 2010, 08:35 Posts: 5
|
|
Is this issue fixed on live?
Regards, Riz
|
|
|
|
|
 |
|
[syedrizwanm]
|
| Post subject: Re: Order Close Error |
Post rating: 0
|
Posted: Tue 29 Jun, 2010, 12:45
|
|
User rating: 0
Joined: Thu 10 Jun, 2010, 08:35 Posts: 5
|
|
Still Happening: 11:41:23 at java.lang.Thread.run(Unknown Source) 11:41:23 at com.dukascopy.api.impl.execution.l$a.run(Unknown Source) 11:41:23 at com.dukascopy.api.impl.execution.l$a.a(Unknown Source) 11:41:23 at java.util.concurrent.FutureTask.run(Unknown Source) 11:41:23 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 11:41:23 at com.dukascopy.api.impl.execution.g.call(Unknown Source) 11:41:23 at jforex.YDAController.onBar(YDAController.java:52) 11:41:23 at ydastrategies.ControllerStrategy.onBar(ControllerStrategy.java:187) 11:41:23 at ydastrategies.YDAEdge.onBar(YDAEdge.java:294) 11:41:23 at com.dukascopy.api.impl.connect.PlatformOrderImpl.close(Unknown Source) 11:41:23 at com.dukascopy.api.impl.connect.PlatformOrderImpl.close(Unknown Source) 11:41:23 at com.dukascopy.api.impl.connect.PlatformOrderImpl.close(Unknown Source) 11:41:23 at com.dukascopy.api.impl.connect.PlatformOrderImpl.close(Unknown Source) 11:41:23 at com.dukascopy.api.impl.connect.j.b(Unknown Source) 11:41:23 java.lang.NullPointerException 11:41:23 Tue Jun 29 21:41:34 EST 2010 - Error: null Instrument: EUR/JPY
Normally happens when you re-run the strategy after stopping or may be closing the client and opening again, it doesn't like it.
Regards, Riz
|
|
|
|
|
 |
|
[Phantal]
|
| Post subject: Re: Order Close Error |
Post rating: 0
|
Posted: Tue 29 Jun, 2010, 18:50
|
|
User rating: 0
Joined: Fri 07 May, 2010, 02:59 Posts: 61
|
|
In the backtester, you get that error if you try to enter and later close orders on crosses, eg, EUR/JPY, GBP/JPY, etc. You have to handle two separate orders to trade on crosses, one for EUR/USD, and one for USD/JPY.
-Brian
|
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|