Hi,

I'm trying to design a set-up where, within one project, I have multiple different strategies, each a class of its own. They each have a run-method to take in a Slice.

In the main/starting object (the one specified in config.json), I then want to instantiate one of these strategies and pass it the Slice it needs.

This currently doesn't work - the first time I use the Slice object in my sub-strategy, the program exits telling me I'm referencing something that is not an instance of an object. The debugger shows clearly that there is a Slice object being passed. I'm also able to use that Slice object in the main strategy -- only when it gets passed to the sub-strategy, it stops working.

 

Is this kind of a set-up possible within Lean? I have a feeling it's not really meant to be working with any more than one algorithm inheriting QCAlgorithm. Is there a better way to do this?

 

If it is possible, I'd be happy to send a minimal working example over to show what I'm trying to do.

 

If not, I'll have to think of a different way to achieve this.

Thanks in advance,

Douglas