Page 1 of 1

Pause/Stop strategy from SDK?

PostPosted: Sat Oct 15, 2016 7:01 pm
by betwap
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 core.host:execute("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?

Re: Pause/Stop strategy from SDK?

PostPosted: Sun Oct 16, 2016 1:47 pm
by Cactus
I had wondered about the same thing, but rather pausing the strategy based on time, not an error, in this thread:
viewtopic.php?f=27&t=63804

Based on second Apprentice's post this is not yet in the SDK but might appear in the future?

Re: Pause/Stop strategy from SDK?

PostPosted: Tue Oct 18, 2016 8:15 am
by Apprentice
Yes, we have a stop, at this time, a pause/re-start is not available.