Anyone know if its possible to automate running a strategy ? For example, here is what I want to do: I want to programmatically invoke/execute a strategy I've wrote (and possibly pass in parameters to the stategy).
Thanks in advance !
Size:
Color:
The tool for automation of strategies is called Strategy Monitor.
If you're not looking for easy ways, then we have a more complex, programmatic way of executing an external strategy. Altough it's possible to run a strategy (invoke a WealthScript-based class on-the-fly or an existing strategy already saved on disk), you won't be able to pass in parameters unless you read them from a disk file or from Wealth-Lab's global memory (read: not elegant).
This is totally unsupported, but I'll give a working prototype:
1) Download the source of
Community.Components. Open Utility.cs and review the methods grouped under "Portfolio equity interaction support functions" region. You're interested in the
TradingSystemExecutor object. Essentially, this stuff is a wrapper on top of TradingSystemExecutor that provides convenient access and utility functions.
2)
WealthScript Techniques | Interacting Dynamically with Portfolio Level Equity will show how to execute the method. You're interested in the
LoadStrategyFromDisk and
runDonor methods.
Size:
Color:
Thanks Eugene ! I will check it out
Size:
Color: