Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

What happens with running strategies when platform stopped
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=138
Page 1 of 1

Author:  Guest [ Thu 14 Aug, 2008, 16:04 ]
Post subject:  What happens with running strategies when platform stopped

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

Author:  API Support [ Fri 15 Aug, 2008, 12:01 ]
Post subject:  Re: What happens with running strategies when platform stopped

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.

  Page 1 of 1