Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    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

    General Discussion
    1
    1
    12
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • shader12 shade
      shader12 shade last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors