Automating strategy execution ?
Author: zanek
Creation Date: 10/12/2009 10:40 AM
profile picture

zanek

#1
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 !
profile picture

Eugene

#2
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.
profile picture

zanek

#3
Thanks Eugene ! I will check it out
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).