I finally got get my first strategy out in the market: it has been as painful as it could be :egg:, but finally I have a single line in my Control Center, stating that there is one strategy active :crazy_pilot:. A rare example of spaghetti-coding, with all the worst practices of coding in place (magic numbers, pasted code chuncks etc. etc.):stickyman: but it achieve following functional blocks:
Still some modules are missing (connection management, data feed monitoring ) and I plan to introduce these in future releases.
Now I am about to start working on my second strategy, and of course I would like to reuse part of the code I wrote for the first one (refactored to simulate proper programming skills:):)) and so I was wondering if there is a way to share blocks of code between strategies. The idea popped out studying the LPAD Launcher Ebook (Dagget) where he achieves this result at least for the first two functional blocks listed above, through use of indicators objects.
I thought about implementing risk management and/or money management as addons, so they could be accessed from every strategy, but could'nt find an example on the web. Or maybe should I setup specialized strategies and/or indicators to manage these tasks?
Does anyone has implemented something like this or knows about useful resources to get inspiration from?