Dukascopy
 
 
Wiki JStore Search Login

history.getOrdersHistory(instr, t1, t2) don't work correctly
 Post subject: history.getOrdersHistory(instr, t1, t2) don't work correctly Post rating: 0   New post Posted: Tue 09 Jun, 2015, 19:09 
User avatar

User rating: 0
Joined: Mon 28 May, 2012, 00:19
Posts: 9
Location: ColombiaColombia
When I use this piece of code in a JForex platform strategy, it works perfectly and returns the data I expect.

When I use it in a standalone program I wrote from JForex-SDK, it can read the instruments but returns zero order for each instrument.

Is there something I forget ? For example something about security or a right to access datas, which would be automatically avalable in a platform strategy but not avalable in standalone programs ?

Thanks


Attachments:
historyBug.txt [935 Bytes]
Downloaded 126 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: history.getOrdersHistory(instr, t1, t2) don't work correctly Post rating: 0   New post Posted: Thu 11 Jun, 2015, 14:24 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
If I am not mistaken, in the SDK you have to subscribe to instruments (or was it the remote platform? not sure...).
This is done automatically on the JForex platform.

Maybe this is the problem.


 
 Post subject: Re: history.getOrdersHistory(instr, t1, t2) don't work correctly Post rating: 0   New post Posted: Mon 15 Jun, 2015, 01:02 
User avatar

User rating: 0
Joined: Mon 28 May, 2012, 00:19
Posts: 9
Location: ColombiaColombia
Thank you tcsabina for your answer.

I changed context.getSubscribedInstruments() with client.getSubscribedInstruments() and waited the market opening to make new tries, but the result remains the same.

I do get the paires but don't receive any past order:

    2015/06/14 23:45:03.785 Nombre d'enregistrements trouvés pour EUR/GBP -> 0
    2015/06/14 23:45:03.795 Nombre d'enregistrements trouvés pour EUR/NOK -> 0
    2015/06/14 23:45:03.806 Nombre d'enregistrements trouvés pour GBP/CHF -> 0
    2015/06/14 23:45:03.816 Nombre d'enregistrements trouvés pour AUD/CAD -> 0
    2015/06/14 23:45:03.829 Nombre d'enregistrements trouvés pour USD/CAD -> 0
    2015/06/14 23:45:03.840 Nombre d'enregistrements trouvés pour USD/SEK -> 0
    2015/06/14 23:45:03.850 Nombre d'enregistrements trouvés pour AUD/NZD -> 0
    2015/06/14 23:45:03.860 Nombre d'enregistrements trouvés pour GBP/CAD -> 0

And in the strategy program, the datas received are correct:

    2015.06.10 06:39:53 [ Signal:thescalper#tss1gr8urc] EUR/USD [ 269] A_CLOSED 1.13108 1.13149 0.150000 Pip: 4.1 PV: 54.59 TP: 1.13149 SL: 0.00000 TS: 0.00000 Id:83972548 Created: 2015.06.10 06:36:37 Filled: 2015.06.10 06:38:52 Closed: 2015.06.10 06:39:53
    2015.06.10 06:34:22 [ Signal:thescalper#tss6574ykr] EUR/USD [ 268] A_CLOSED 1.12944 1.13023 0.150000 Pip: 7.9 PV: 105.18 TP: 1.13022 SL: 0.00000 TS: 0.00000 Id:83971745 Created: 2015.06.10 06:14:25 Filled: 2015.06.10 06:25:03 Closed: 2015.06.10 06:34:22
    2015.06.10 06:33:21 [ Signal:thescalper#tss13pwza1] USD/CHF [ 267] V_CLOSED 0.92929 0.92821 0.150000 Pip: 10.8 PV: 154.84 TP: 0.92822 SL: 0.00000 TS: 0.00000 Id:83971955 Created: 2015.06.10 06:21:02 Filled: 2015.06.10 06:24:18 Closed: 2015.06.10 06:33:21
    2015.06.10 06:04:28 [ Signal:rezmy#tssibeirlk] NZD/USD [ 266] A_CLOSED 0.71680 0.71796 0.050000 Pip: 11.6 PV: 51.48 TP: 0.71681 SL: 0.00000 TS: 0.00000 Id:83969655 Created: 2015.06.10 05:50:41 Filled: 2015.06.10 05:50:41 Closed: 2015.06.10 06:04:28
    2015.06.10 06:00:27 [ Signal:rezmy#tss1edg2wj] EUR/JPY [ 265] A_CLOSED 138.61800 138.72200 0.050000 Pip: 10.4 PV: 37.40 TP: 138.61900 SL: 0.00000 TS: 0.00000 Id:83970191 Created: 2015.06.10 05:55:48 Filled: 2015.06.10 05:55:49 Closed: 2015.06.10 06:00:27
    2015.06.10 06:00:24 [ Signal:rezmy#tsst8jlp17] AUD/USD [ 264] A_CLOSED 0.77174 0.77344 0.050000 Pip: 17.0 PV: 75.45 TP: 0.77175 SL: 0.00000 TS: 0.00000 Id:83969620 Created: 2015.06.10 05:49:54 Filled: 2015.06.10 05:49:54 Closed: 2015.06.10 06:00:24
    2015.06.10 06:00:21 [ Signal:rezmy#tss1lgy3l1] GBP/JPY [ 263] A_CLOSED 189.00300 189.30500 0.050000 Pip: 30.2 PV: 108.60 TP: 189.00700 SL: 0.00000 TS: 0.00000 Id:83970262 Created: 2015.06.10 05:56:03 Filled: 2015.06.10 05:56:03 Closed: 2015.06.10 06:00:21
    2015.06.10 05:58:00 [ Signal:rezmy#tss945ui97] AUD/JPY [ 262] A_CLOSED 94.83100 94.93700 0.050000 Pip: 10.6 PV: 38.12 TP: 94.83600 SL: 0.00000 TS: 0.00000 Id:83970279 Created: 2015.06.10 05:56:12 Filled: 2015.06.10 05:56:12 Closed: 2015.06.10 05:58:00
    2015.06.10 05:57:08 [ Signal:oscbox#tss1026581] EUR/USD [ 261] V_CLOSED 1.12402 1.13173 0.050000 Pip: -77.1 PV: -342.18 TP: 0.00000 SL: 1.13169 TS: 0.00000 Id:83939389 Created: 2015.06.09 13:29:44 Filled: 2015.06.09 13:32:37 Closed: 2015.06.10 05:57:08

I am still stuk with this problem. Thank you to everybody who could help.

8-)


 
 Post subject: Re: history.getOrdersHistory(instr, t1, t2) don't work correctly Post rating: 0   New post Posted: Tue 16 Jun, 2015, 16:26 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please verify that you are using latest JForex SDK version 2.45.2
Also, the attached strategy can be used to print historical orders that have been opened today (GMT time)


Attachments:
OrderHistTest.java [2.64 KiB]
Downloaded 134 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: history.getOrdersHistory(instr, t1, t2) don't work correctly Post rating: 0   New post Posted: Tue 16 Jun, 2015, 17:09 
User avatar

User rating: 0
Joined: Mon 28 May, 2012, 00:19
Posts: 9
Location: ColombiaColombia
With JForex SDK version 2.45.2, it works perfectly.

Thank you.


 

Jump to:  

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