customized indicator plot problem
I customized an indicator , I wanted to plot it with main data, I wrote " self.xxx.plotinfo.plotmaster = self.data" but it doesn't work. please tell me the reason. Thank you !
run-out last edited by
Can you kindly include the full block of code and the error message in your question?
it doesn't work. please tell me the reason
...is not very informative.
lines = ('zhuli', )
def __init__(self): self.addminperiod(30) def next(self): dataclose = self.data.get(size=30) close_ma = talib.MA(np.array(dataclose), timeperiod=7, matype=0) temp = (dataclose[-20:] - close_ma[-20:]) / close_ma[-20:] * 480 result = talib.EMA(temp, timeperiod=2) * 5 self.zhuli = result[-1:]
def __init__(self): self.leida = LeiDa(self.data) self.leida.plotinfo.plotmaster = self.data
@run-out Hi ,I just post my code, Can you help me? Why didn't my indicator plot with the main data? Thank you!
ab_trader last edited by
your price range is 240+, your indicator shows -1.43. diagram range is set by
master, therefore you can't see the indicator. I suggest to show it on the separate plot since this is type of the oscillator.
@ab_trader Thank you!