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/

    What is units for timeperiod?

    General Code/Help
    2
    4
    827
    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.
    • C
      CptanPanic last edited by

      Are the units for timeperiod candles, or days? Seems like the former, but wanted to make sure.

      Thanks.

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

        What's a candle? And the next question would be what is timeperiod?

        The data feeds have prices (usually OHLC) and a timestamp. The platform makes no assumptions as to what the timeframe of the prices are, because it would 1st have to scan all timestamps, what would be costly.

        It relies on the user telling the platform, during the creation of the data feed, which timeframe (Seconds, Minutes, Days, ...) and compression (1, 3, 5 ... you name it) it actually has. See the Docs - Data Feeds Reference

        All data feeds take the timeframe and compression parameters (which default to Days and 1)

        1 Reply Last reply Reply Quote 0
        • C
          CptanPanic last edited by

          Yes I could have been clearer. I am referring to things such as indicators that have an option "period", and for backtrader I mean bars, some other libraries call these candles.

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

            Indicators know nothing about timeframes or compressions. They only understand that they have to calculate something using the input data.

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