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 optimize custom indicator parameters?
-
optstrategy can adjust the parameters in the strategy, how can I adjust the parameters in the previous section, Custom Indicators?
-
I could not get optstrategy to work
so I put the cerebro calls inside of a loop that varies the parameters I send to the
addstrategy call. -
class Volume_Reversal_line(bt.Indicator): lines = ('Pr_chg','Std_100day','Avg5d_vol','Past_5d_avg_vol') params = ( ('period',12), ('stdperiod',50) )
I am referring to the parameters here. The parameters here cannot be adjusted with optstrategy.
-
I would expect that you would have to pass the period,stdperiod values when in instantiate the class.