Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

How to guarantee the timely reponse of JforexSDK functions call ?
 Post subject: How to guarantee the timely reponse of JforexSDK functions call ? Post rating: 0   New post Posted: Tue 24 Feb, 2015, 15:03 
User avatar

User rating: 0
Joined: Mon 09 Feb, 2015, 13:40
Posts: 11
Location: China,
How to guarantee the timely reponse of JforexSDK functions call?

As you know, timing is very critical for trade orders , delay of JForex servers' reponse will let an opportunity pass by.

The reponse timing from JForex servers varies from time to time, with 20~100 times difference.

---------code sample-------
long startTime = System.nanoTime();
m_Engine.submitOrder(...)
long estimatedTime = System.nanoTime() - startTime;
if (estimatedTime >maxcalltime) {maxcalltime=estimatedTime;}
else if (estimatedTime < mincalltime){mincalltime=estimatedTime;}
System.out.println("Max: "+maxcalltime+" Min: "+mincalltime+" This time submitOrder use: " + estimatedTime);
---------code sample-------

---Result--------
...
Max: 197660 Min: 17105 This time submitOrder use: 52456
Max: 1082948 Min: 17105 This time submitOrder use: 1082948
...
---Result--------

In order to track the GC status , I added the tracking flags into jre (-XX:+PrintGC -XX:+PrintGCDetails) to see the GC working information during the submitOrder calls.

In fact , when submitOrder calls take 1082948(20 times than before), there is no GC happened in client side. :arrow: It is caused by remoted JForex servers' reponse's delay.

Any suggestions or ideas to improve this delay from JForex server? :?:

This issue had also been raised by Davy as below:
https://www.dukascopy.com/swiss/english ... 65&t=52210

Thanks.

Br,

Simon


 
 Post subject: Re: How to guarantee the timely reponse of JforexSDK functions call ? Post rating: 0   New post Posted: Tue 24 Feb, 2015, 16:16 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Maximum time of 1082948 nanoseconds is equal to 0.001082948 seconds which is a good result.


 

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