Hey guys
Is there a way to pause/kill a strategy instance using some LUA source code ? I'd like to get it paused when the daily loss is below a specific threshold
I'm looking for the command for doing so
Thanks
Daveatt
Moderator: admin
As you can not turn strategy on and off as you want.
U have to prevent trade execution, during the periods
when it is not desired, from within strategy code.
Daveatt wrote:Discovered randomly this thread viewtopic.php?f=22&t=56508&p=84846&hilit=ChangeParameters&sid=39878a5678b9577661af78dcde0053a1#p84846As you can not turn strategy on and off as you want.
U have to prevent trade execution, during the periods
when it is not desired, from within strategy code.
This answers my question
Thanks
Daveatt
Apprentice wrote:public method host:execute("stop");
Brief
Stops the strategy which executed the command
Declaration
Lua
core.host:execute ("stop")
Details
The command is useful for the strategies which works until some condition is met. For example until the chosen trade disappears. After such condition there is no reason to keep strategy working, so the strategy can stop itself.
Only strategies can use this command.
Declared in host
Users browsing this forum: No registered users and 5 guests