For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
converting backtrader.indicator to a list
-
i have used for example the SMA indeicator and i want to see the outcomming data as a list, basicly to iterate through the information the indicator is , is it possible to be done?
my code:
stock = yf.Ticker('TSLA')
df = stock.history(period="5y")
sma= bt.indicators.Accum(df['Close'])
print(sma)
what im getting is
<backtrader.indicators.sma.MovingAverageSimple object at 0x00000252A2653F70>
i want to get value by value of the indicator to date.