For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Can't assign custom indicator output to lines
-
Hi, I need to backtest my custom indicator.
It returns two lines upper and lower bands.
types are numpy array.def custom_ind(close,length,some parameterssss): close=np.array(close) y=[] sum_e=0.0 e=2.718281 #Some code blocks here calculates upband,downband# return upband,downband
I want to assign those upband and downband arrays into self.l.up and self.l.down
class custom_indicator(bt.Indicator): lines = ('upper','lower') params = (('period', 100),) def __init__(self): [upband,downband] = custon_ind(self.data,100,3,2) self.l.upper=upper
The error I go is as follows:
can you please help me with that:
TypeError: 'numpy.ndarray' object is not callable
-