Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Wrong order.getAmount() result
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=141&t=49555
Page 1 of 1

Author:  almc [ Sun 07 Jul, 2013, 23:06 ]
Post subject:  Wrong order.getAmount() result

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.

Author:  Bruno_Grunberg [ Mon 08 Jul, 2013, 08:15 ]
Post subject:  Re: Wrong order.getAmount() result

Did you create this strategy with Visual JForex?

If yes, please provide the .vsf file.

Author:  Visual Support [ Mon 08 Jul, 2013, 09:17 ]
Post subject:  Re: Wrong order.getAmount() result

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?

Author:  almc [ Mon 08 Jul, 2013, 19:06 ]
Post subject:  Re: Wrong order.getAmount() result

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.

??

Author:  almc [ Mon 08 Jul, 2013, 19:17 ]
Post subject:  Re: Wrong order.getAmount() result

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.

Author:  Bruno_Grunberg [ Tue 09 Jul, 2013, 07:36 ]
Post subject:  Re: Wrong order.getAmount() result

This is the forum dedicated to Visual JForex.
I believe you posted in the wrong place.

Author:  vadim_berezhnoj [ Tue 09 Jul, 2013, 09:00 ]
Post subject:  Re: Wrong order.getAmount() result

You'll get support by the link below:
viewforum.php?f=89

  Page 1 of 1