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/

    Hi there. I am new to backtrader and seek for some kind help.

    General Code/Help
    2
    3
    471
    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.
    • Y
      Yanting Zeng last edited by Yanting Zeng

      What is the standard way of extracting the previous ten bars' highest close price? I just skimmed the doc but didn't find the standard way. I once tried a brute force for loop method, but the program ran much slower than before...

      It seems like self.datas[0].close is not a pandas series, so there seems no convenient way of doing this task.

      Any help would be appreciated.

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        See here: https://community.backtrader.com/topic/972/how-to-get-historical-data-properly

        1 Reply Last reply Reply Quote 0
        • Y
          Yanting Zeng last edited by Yanting Zeng

          Thank you. @backtrader

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