I found what's wrong. My indicator should be like this:
class MyIndicator(bt.Indicator): lines = ('macd',) def __init__(self): self.l.macd = bt.ind.MACD()and it will be ploted simply with call in my strategy like this:
self.myindicator = MyIndicator()Now the problem is the plot only shows 'macd' line. I want to show the MACD 'signal' line as well. How should I do it?