For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
How to pass range() test variables using StFetcher
-
Hello all,
Newby here.
I am following
https://www.backtrader.com/blog/posts/2017-05-16-stsel-revisited/stsel-revisited/ in order to be able to test multiple strategies on the same datafeed.I am wondering however how I would be able to using ranges on variables ie sma_period=range(9,16) for a single strategy as:
cerebro.optstrategy(StFetcher, idx=StFetcher.COUNT())
doesn't leave room for that. I guess it needs to be fed to the optstrategy from main.py so that backtrader can create multiple strategy instances.I played around with **kwargs but am blocked.