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

Plotting a LinesOperationObject

  • Apologies if this has been mentioned in the docs (I couldn't find it), but how do I plot a LinesOperation object that I create within a strategy? For instance, I created a zscore object using two other lines, and I want to plot it. This is what I tried:

    self.zscore = self.spread / self.stdev
    self.zscore.plotinfo.plot = True

    where self.spread and self.stdev are two lines created previously.

    I get the following error: AttributeError: 'LinesOperation' object has no attribute 'plotinfo'.

  • The end of this might help.

Log in to reply