Dukascopy
 
 
Wiki JStore Search Login

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.

JForexAPI loses/corrupts Fill History
 Post subject: JForexAPI loses/corrupts Fill History Post rating: 0   New post Posted: Mon 20 Nov, 2017, 08:01 

User rating: 18
Joined: Thu 20 Apr, 2017, 22:42
Posts: 165
Location: Russian Federation,
Hello,

rather frequently JForexAPI looses Fill History. I suspect this happens for orders lasting longer than one day. Problem occurs while JForex is running and it seems that restart of the Platform fixes it (temporally, re-occurs some time later). I also suspect that his happens to BUY/SELL orders originating from LIMIT orders.

Here is the example (generated by strategy from [here]):

Order with corrupted fill history
  • There is only one entry in Fill history
  • Entry[0] time does not match actual fill time
EURAUD_70907_002842_M_old/92582288 FILLED

    Action:       <SELL> EUR/AUD
    Created:      2017-10-09 01:40:52.664
    Amount:       100 000
    Amount Req.:  100 000
    Amount Orig.: 100 000
    Open Price:   1.547206
    Filled:       #0: 2017-11-17 02:00:05.744 - 100 000 * 1.547206

Somewhat-correct order - this is same order exported after platform restart
  • Fill history seems to be correct, but ...
  • 'Amount Original' has got corrupted - now its is 200K instead of 100K (That problem is reported long ago here and I strongly hope it will be fixed too some time)
EURAUD_70907_002842_M_old/92582288 FILLED

    Action:       <SELL> EUR/AUD
    Created:      2017-10-09 01:40:52.664
    Amount:       100 000
    Amount Req.:  100 000
    Amount Orig.: 200 000
    Open Price:   1.547206
    Filled:       #0: 2017-11-14 21:09:37.762 - 100 000 * 1.54675
                  #1: 2017-11-15 01:03:23.000 - 100 000 * 1.546826
                  #2: 2017-11-16 01:02:59.000 - 100 000 * 1.547054
                  #3: 2017-11-17 01:02:48.000 - 100 000 * 1.54713
                  #4: 2017-11-18 01:02:53.000 - 100 000 * 1.547206


 
 Post subject: Re: JForexAPI loses/corrupts Fill History Post rating: 0   New post Posted: Fri 24 Nov, 2017, 09:49 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Order fill history is available only until platform restart.


 
 Post subject: Re: JForexAPI loses/corrupts Fill History Post rating: 0   New post Posted: Fri 24 Nov, 2017, 12:34 
User avatar

User rating: 0
Joined: Wed 05 Mar, 2014, 17:24
Posts: 30
Location: Russian Federation, Tomsk
API Support wrote:
Order fill history is available only until platform restart.


Why don`t you want to fix this bug?


 
 Post subject: Re: JForexAPI loses/corrupts Fill History Post rating: 0   New post Posted: Fri 24 Nov, 2017, 12:41 

User rating: 18
Joined: Thu 20 Apr, 2017, 22:42
Posts: 165
Location: Russian Federation,
(To API Support) Pardon, did you read my bug report? It shows completely different behavior from what you are saying:

1. 'Fill history' of the order is typically correct AFTER fresh restart of the platform (according to you statement - it should be blank)
2. 'Fill history' gets corrupted WHILE platform is running (you say - 'it is available until platform restart')
3. If corrupted, 'Fill history' reinitialized to correct values AFTER restart of the platform

Hoping dev team will take care about these problems instead of just saying "there is no problem".


 
 Post subject: Re: JForexAPI loses/corrupts Fill History Post rating: 0   New post Posted: Fri 24 Nov, 2017, 21:12 

User rating: 18
Joined: Thu 20 Apr, 2017, 22:42
Posts: 165
Location: Russian Federation,
It seems I've got some additional information about that problem.

Most probably bug appears after restart of my plugin, whose code I update many times a day and restart it.

Today I noticed that IOrder for same ID/label received from platform into my plugin after each restart of plugin (JForex is NOT restarted) has new instance id (as returned by 'System.identityHashCode(order)') - it means for every execution of plugin new IOrder wrappers are created from some internal representation of the order.

So - please check following:

1. How new IOrders to be passed into plugin are created, actually - recheck how source data for these orders is updated. I expect that underlying data gets corrupted some way and then, after restart of plugin, generates new IOrder with incorrect data.

2. You mentioned "Order fill history is available only until platform restart.". Not sure what this actually means (because it does not correspond to actual behavior), but I suspect correct wording is "Once IOrder is initialized and is sent into Plugin/Strategy, its 'fill history' never changes" - this is my observation of what is actually happening. I expect that after each mid-night, when swaps are calculated, 'fill history' is to be updated automatically, but this never happens until (i'm not sure) either plugin or whole platform restarted.


 
 Post subject: Re: JForexAPI loses/corrupts Fill History Post rating: 0   New post Posted: Fri 24 Nov, 2017, 23:17 

User rating: 18
Joined: Thu 20 Apr, 2017, 22:42
Posts: 165
Location: Russian Federation,
---

And regarding incorrect 'amount original', which should be '100 000' in this order
EURAUD_70907_002842_M_old/92582288 FILLED
    Action:       <SELL> EUR/AUD
    Created:      2017-10-09 01:40:52.664
    Amount:       100 000
    Amount Req.:  100 000
    Amount Orig.: 200 000
    Filled:       #0: 2017-11-14 21:09:37.762 - 100 000 * 1.54675
It does not get fixed 'after restart of the plugin', nor 'after restart of the JForex', nor after killing JForex + cleanup of 'o_*.*' files from JForex/.cache + starting Jforex. It looks like such incorrect data is already received from server during start up, i.e. problem is somewhere server-side (or may immediately get scrambled upon receiving from server :roll: ).


 

Jump to:  

cron
  © 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