bt icon indicating copy to clipboard operation
bt copied to clipboard

Error in algo stack branching example

Open arisliang opened this issue 3 years ago • 2 comments

Traceback (most recent call last): File "C:/btexamples/algos_example.py", line 26, in s = bt.Strategy('strategy', branch_stack, ['spy', 'agg']) File "bt\core.py", line 2107, in bt.core.Strategy.init TypeError: 'AlgoStack' object is not iterable

Above error when running Branching and Control Flow example

arisliang avatar Jun 16 '21 01:06 arisliang

When instantiating the Strategy, try passing the algos as a list (i.e. s = bt.Strategy('strategy', [branch_stack], ['spy', 'agg']) instead of s = bt.Strategy('strategy', branch_stack, ['spy', 'agg'])).

samuel-cmcc avatar Jun 25 '21 20:06 samuel-cmcc