|
Wrong order.getAmount() result |
almc
|
Post subject: Wrong order.getAmount() result |
Post rating: 0
|
Posted: Sun 07 Jul, 2013, 23:06
|
|
User rating: 1
Joined: Thu 24 Nov, 2011, 09:09 Posts: 36 Location: FranceFrance
|
Dear Support,
Is it a week-end effect? We are on Sunday 22h GMT, and my strategy suddenly is reporting a wrong amount of a filled order. The code is old and it is as regular as possible:
for (IOrder order : engine.getOrders(instrument)) { if (order.getState() == IOrder.State.FILLED) { double amount = order.getAmount(); } }
The result is more than twice different from the real amount.
??
In advance, thahks for your action.
|
|
|
|
|
Bruno_Grunberg
|
Post subject: Re: Wrong order.getAmount() result |
Post rating: 0
|
Posted: Mon 08 Jul, 2013, 08:15
|
|
Site Administrator | |
User rating: ∞
Joined: Fri 21 Jun, 2013, 16:50 Posts: 197 Location: FranceFrance
|
Did you create this strategy with Visual JForex?
If yes, please provide the .vsf file.
|
|
|
|
|
Visual Support
|
Post subject: Re: Wrong order.getAmount() result |
Post rating: 0
|
Posted: Mon 08 Jul, 2013, 09:17
|
|
Visual JForex expert at Dukascopy | |
User rating: 4
Joined: Fri 06 Feb, 2009, 16:34 Posts: 130
|
almc wrote: Dear Support, Is it a week-end effect? We are on Sunday 22h GMT, and my strategy suddenly is reporting a wrong amount of a filled order. The code is old and it is as regular as possible:
The result is more than twice different from the real amount. ?? It should not be week-end effect, all should work correctly. How you checked that strategy reports wrong amount of filled order? Is that historical or realtime strategy launch? Can you provide more details?
|
|
|
|
|
almc
|
Post subject: Re: Wrong order.getAmount() result |
Post rating: 0
|
Posted: Mon 08 Jul, 2013, 19:06
|
|
User rating: 1
Joined: Thu 24 Nov, 2011, 09:09 Posts: 36 Location: FranceFrance
|
No, I did not used VisualJForex, just a regular editor and this is a version compiled, tested and worked since long ago. This is a LIVE account with a real position opened before the last week-end. The amount as given in the JForex window is ok. The error concerns only the reporting by the strategy. It persists whatever the mode I use, Local or Remote.
I also have a DEMO account with the same position in realtime. There, the strategy report of the order.getAmount() was strange on Sunday about 22h GMT, but relaunched on Monday 6h GMT the position amount is correct.
Although, on historical backtests, the reported amount shows no error neither on LIVE no on DEMO accounts.
So, only LIVE account with a real position is ubject to error.
??
|
|
|
|
|
almc
|
Post subject: Re: Wrong order.getAmount() result |
Post rating: 0
|
Posted: Mon 08 Jul, 2013, 19:17
|
|
User rating: 1
Joined: Thu 24 Nov, 2011, 09:09 Posts: 36 Location: FranceFrance
|
More details: I have just checked once again. Now, on the LIVE account everything is ok if the strategy is run in the Local mode. The erroneous amount report persists if the strategy is run in the Remote mode. All other order values (openPrice etc) are correct.
|
|
|
|
|
Bruno_Grunberg
|
Post subject: Re: Wrong order.getAmount() result |
Post rating: 0
|
Posted: Tue 09 Jul, 2013, 07:36
|
|
Site Administrator | |
User rating: ∞
Joined: Fri 21 Jun, 2013, 16:50 Posts: 197 Location: FranceFrance
|
This is the forum dedicated to Visual JForex. I believe you posted in the wrong place.
|
|
|
|
|
vadim_berezhnoj
|
Post subject: Re: Wrong order.getAmount() result |
Post rating: 0
|
Posted: Tue 09 Jul, 2013, 09:00
|
|
Visual JForex expert at Dukascopy | |
User rating: ∞
Joined: Mon 22 Apr, 2013, 11:30 Posts: 604 Location: UkraineUkraine
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|