I also add the psar value to the line:
self.lines.PSAR = self.psar
I also add the psar value to the line:
self.lines.PSAR = self.psar
I have defined the a psar indicator using the talib library. I am using talib as I want to use the value of an indicator for my feed instead of the default close price.
lines = ('psar',)
plotlines = dict(
psar=dict(
_name='psar', marker='.', markersize=4.0, color='black', fillstyle='full', ls=''
),
)
self.psar = bt.talib.SAR(
self.rl,
self.rl,
acceleration=0.02, maximum=0.12,
plotname='PSAR',
)
but when I view the chart the values defined in the plotlines
dict don't assign to the indicator. I get the default values from the talib module.
I also tried to use: self.psar.plotlines = plotlines
but this also did not take. I have been through the plotting docs but could not work this out.