Backtrader Community

    • 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 Bid/Ask to OHLC - which do I need?

    General Code/Help
    2
    3
    1353
    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.
    • T
      Taewoo Kim last edited by

      I downloaded DukasCopy tick data.. which is presented in bid/ask/bid volume/ask volume. When I use pandas to create OHLC, it creates both ask OHLC and bid OHLC. So I first have to "groupby", but not sure which to use..

      Am I supposed to avg the two? IF so, which volume do i use?

      1 Reply Last reply Reply Quote 0
      • T
        ThatBlokeDave last edited by

        For the bid/ask you could convert that to be the mid-price.

        For the volume, assuming they are tick volumes, I guess the difference is just capturing the spread widening / coming together. Tick volume only captures the movement in the price. Again an average might be a good option.

        T 1 Reply Last reply Reply Quote 0
        • T
          Taewoo Kim @ThatBlokeDave last edited by

          @ThatBlokeDave Thank you. Will give it a try

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