I havent too much experience with bt and I have an issue with a simple task.
I would realize this chart:
The profit target/loss target are simple close price +/- X times ATR(14).
I tried with following code:
# Add a ATR indicator for stop loss / take profit calculations self.atr = bt.indicators.ATR(self.datas, period=14) self.higher_band = 3*self.atr + self.dataclose self.lower_band = self.dataclose - self.atr
but I dont get higher_band/lower_band plotted on chart.
How can I do it?