Dukascopy
 
 
Wiki JStore Search Login

Wrong order.getAmount() result
 Post subject: Wrong order.getAmount() result Post rating: 0   New post Posted: Sun 07 Jul, 2013, 23:06 
User avatar

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.


 
 Post subject: Re: Wrong order.getAmount() result Post rating: 0   New post Posted: Mon 08 Jul, 2013, 08:15 
Site Administrator
User avatar

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.


 
 Post subject: Re: Wrong order.getAmount() result Post rating: 0   New post Posted: Mon 08 Jul, 2013, 09:17 
Visual JForex expert at Dukascopy
User avatar

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?


 
 Post subject: Re: Wrong order.getAmount() result Post rating: 0   New post Posted: Mon 08 Jul, 2013, 19:06 
User avatar

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.

??


 
 Post subject: Re: Wrong order.getAmount() result Post rating: 0   New post Posted: Mon 08 Jul, 2013, 19:17 
User avatar

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.


 
 Post subject: Re: Wrong order.getAmount() result Post rating: 0   New post Posted: Tue 09 Jul, 2013, 07:36 
Site Administrator
User avatar

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.


 
 Post subject: Re: Wrong order.getAmount() result Post rating: 0   New post Posted: Tue 09 Jul, 2013, 09:00 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
You'll get support by the link below:
viewforum.php?f=89


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com