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 make the strategy auto re-running again after the internect connection got disconnected for a while
 Post subject: How to make the strategy auto re-running again after the internect connection got disconnected for a while Post rating: 0   New post Posted: Fri 07 Sep, 2012, 02:28 

User rating: 0
Joined: Thu 16 Aug, 2012, 03:29
Posts: 26
Hello, experts,

I met a problem and wish you could give me a hand.

My question in this post is for JForex client platform.

The internet connection might get some problem here for me. It breaks off for a while and gets connected again. However, the strategy gets stopped after the internet connection got problem and remains stopped even after the internet connection get right.

My question is how to make the strategy auto re-running again after the internect connection got disconnected for a while and turn right again.

Thank you very much!


 
 Post subject: Re: How to make the strategy auto re-running again after the internect connection got disconnected for a while Post rating: 0   New post Posted: Fri 07 Sep, 2012, 16:25 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
The strategy should not stop unless the platform cannot reconnect several times and kicks you out to the authentication window. To avoid this, you need to provide the IP address of yours to bypass the PIN, then enter the platform without PIN and check Force connection in the Preferences/Advanced section. This is necessary for LIVE only, as the option is enabled by default in DEMO.


 
 Post subject: Re: How to make the strategy auto re-running again after the internect connection got disconnected for a while Post rating: 0   New post Posted: Tue 09 Oct, 2012, 03:48 

User rating: 0
Joined: Thu 16 Aug, 2012, 03:29
Posts: 26
Thank you so much for your reply.

It is very helpful.

How about dealing with the problem in JForex-SDK?

I was wondering whether you could help me again.

Thanks.


 
 Post subject: Re: How to make the strategy auto re-running again after the internect connection got disconnected for a while Post rating: 0   New post Posted: Fri 12 Oct, 2012, 12:57 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
blackkettle wrote:
How about dealing with the problem in JForex-SDK?
You can start your strategy in ISystemListener.onConnect(), such that whenever the server successfully connects/reconnects, the strategy gets restarted, see:
https://www.dukascopy.com/wiki/#JForex_SDK/System_listener


 
 Post subject: Re: How to make the strategy auto re-running again after the internect connection got disconnected for a while Post rating: 0   New post Posted: Thu 15 Nov, 2012, 02:22 

User rating: 0
Joined: Thu 16 Aug, 2012, 03:29
Posts: 26
I see. Thank you so much!


 
 Post subject: Re: How to make the strategy auto re-running again after the internect connection got disconnected for a while Post rating: 0   New post Posted: Thu 06 Feb, 2014, 09:31 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
Platform Support wrote:
The strategy should not stop unless the platform cannot reconnect several times and kicks you out to the authentication window. To avoid this, you need to provide the IP address of yours to bypass the PIN, then enter the platform without PIN and check Force connection in the Preferences/Advanced section. This is necessary for LIVE only, as the option is enabled by default in DEMO.


Hi Support

How do you use the JForex-API to check if forceReconnect=true and set it true programmatically?
the IClient.IPreferences class amd subtypes do not seem to have this setting.

regards
f451


 
 Post subject: Re: How to make the strategy auto re-running again after the internect connection got disconnected for a while Post rating: 0   New post Posted: Mon 10 Feb, 2014, 08:51 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
It is not regulated from the preferences, see:
https://www.dukascopy.com/wiki/#IClient_functionality/System_listener


 
 Post subject: Re: How to make the strategy auto re-running again after the internect connection got disconnected for a while Post rating: 0   New post Posted: Mon 10 Feb, 2014, 12:48 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
Thanks. So if I don't set forceReconnect to true on the JForex LIVE Client, will client.connect() or client.reconnect() attempts eventually fail?


 
 Post subject: Re: How to make the strategy auto re-running again after the internect connection got disconnected for a while Post rating: 0   New post Posted: Mon 10 Feb, 2014, 12:52 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Platform settings have no effects on the JForex-SDK, in JForex-SDK as you see from the example, you determine what the timeouts are and what the reconnect intervals are.


 

Jump to:  

  © 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