Pause/Stop strategy from SDK?

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Pause/Stop strategy from SDK?

Postby betwap » Sat Oct 15, 2016 7:01 pm

Windows 10, FXTS2, Lua

I want to improve a behavior in strategies like so:

  • A major failure condition occurs.
  • Execution of strategy is paused until user intervention

I have two solutions to this. First is to use a cookie file that returns at the beginning of Update when it exists. Second is to"stop"). In that case it seems to stop and unload from memory. I just want to pause until the user edits the params and sets allowtrade again.

It seems to me that the core might have a method I'm not aware of that is a more appropriate way to pause execution. Anyone done this?
Last edited by betwap on Sun Oct 16, 2016 4:56 pm, edited 1 time in total.
User avatar
Posts: 7
Joined: Tue Oct 04, 2016 10:24 pm

Re: Pause/Stop strategy from SDK?

Postby Cactus » Sun Oct 16, 2016 1:47 pm

I had wondered about the same thing, but rather pausing the strategy based on time, not an error, in this thread:

Based on second Apprentice's post this is not yet in the SDK but might appear in the future?
Never chase the money, let the money come to me
User avatar
FXCodeBase: Graduate
Posts: 230
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: Pause/Stop strategy from SDK?

Postby Apprentice » Tue Oct 18, 2016 8:15 am

Yes, we have a stop, at this time, a pause/re-start is not available.
User avatar
FXCodeBase: Confirmed User
Posts: 20393
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Return to Discussions

Who is online

Users browsing this forum: No registered users and 1 guest