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/

    Weekly resampling, set cutoff to a different weekday?

    General Discussion
    2
    3
    574
    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.
    • N
      nooby_mcnoob last edited by

      See summary. Is there any way to set the specific day of the week used to mean the beginning/end of the week? Currently it appears to default to Sunday/Monday which is OK but I'd like more control.

      B 1 Reply Last reply Reply Quote 0
      • N
        nooby_mcnoob last edited by

        Looks like I should use a trading calendar

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

          @nooby_mcnoob The cut-off is actually set to identifying a new week-number which is a bit more agnostic than looking for specific days.

          Using a trading calendar as you have also added to your own answer has 2 advantages:

          • The actual cut-off day for every week is right
          • The delivery of the resampled bar can be done 1 bar earlier (because the system doesn't need to wait to identify the new week)
          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors