LinePlotterIndicator doesn't write to csv
-
I am using the bt.Writer to write to a csv and already have my data feeds and indicators writing successfully to the file.
I would now like to create some custom parameters, lets say for example (2 * close(-1) / volume), and have those output to the csv. I tried to create a LinePlotterIndicator in my strategy in the init function.
pricevol = 2 * self.data.close(-1) / self.data.volume pv = bt.LinePlotterIndicator(pricevol, name='pricevol') pv.csv = True
As you can see in the plot below, I am seeing the result of LinePlotterIndicator in red, but I'm also getting 10 other values that seem to be related to the LinesCouplers. I think the LinesCouplers are from using the PivotPoint indicator although I don't seem to be able to get rid of them even when I set plot=False on the PP indicator.
In the csv file, I just see see 11 empty columns for pricevol
How can I get the pricevol to output to the csv and just as one column instead of 11.
-
LinePlotterIndicator
is not a real indicator but a wrapper to show lines on the chart, hence the name.If you want the output, you should wrap the operations you want considered in indicator classes.