For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Broker is left intact for optstrategy?
-
If I do
cerebro.broker.getvalue()
before and after acerebro.run()
, I get:- No change in value (i.e. 10000) if using
optstrategy
. - Change in value (e.g. 15000) if using
addstrategy
.
Is there an underlying reason for this? Is it to simplify things when using
addstrategy
? - No change in value (i.e. 10000) if using
-
You are comparing apples and oranges. When optimizing, each Strategy run with its own broker instance.
-
Okay makes sense now. Kind of weird that you still can access a broker, that's not active at all, can be confusing.
-
It would seem really confusing to access a broker after running, for example, an optimization run with
1000
different options and expect a broker instance, not connected to any of those1000
options, to have a meaningful value.