For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

When plot zoom, adjust axis of indicators

  • I'm currently testing plotting charts with indicators.
    I noticed when eg. plotting:

    self.adosc = bt.talib.ADOSC(self.datas[0].high, self.datas[0].low, self.datas[0].close, self.datas[0].volume, fastperiod=30, slowperiod=90, plotname='ADOSC')

    the axis of this indicator eg. ranges from -2 to 4.
    Now I zoom in and the axis of the close price is adjusted accordingly. But the axis of the indicator is not. It is still from -2 to 4, while the highest value in this zoomed box is only ~0.25.

    Is it possible to make also indicator axis to react to zooming?

  • administrators

    That's controlled by matplotlib