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.

What happens with running strategies when platform stopped
 Post subject: What happens with running strategies when platform stopped Post rating: 0   New post Posted: Thu 14 Aug, 2008, 16:04 

User rating: -
In JForex Demo Platform I noted that sometimes :
- you switch off the platform (2 weeks ago platform was stopped for 4 min)
- I am disconnected and then reconnected (automatically)

What happens with running strategies when these situation occur ?

Example with your MA_play.java : suppose that I decide to close all my positions when variable tagCounter=5000. What happens with tagCounter when platform is stopped ? It is frequent on Dukasopy Live ?

Thank you


 
 Post subject: Re: What happens with running strategies when platform stopped Post rating: 0   New post Posted: Fri 15 Aug, 2008, 12:01 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Strategies are not stopped upon platform disconnection. It just does not receive ticks during the disconnection, then
receives ticks again when the platform reconnects. The strategy is still running.

onStop method is called only after strategy calls IContext.stop(), or after the user stops it from the platform.
Incremented variables like tagCounter stores the value during disconnection, waiting on new incoming ticks,
provided the strategy is running.

Strategies are stopped on their own in case of platform logoff.


 

Jump to:  

  © 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