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/

    Trade at Volume Weighted Average Price (VWAP)?

    General Code/Help
    3
    6
    314
    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.
    • warproxxx
      warproxxx last edited by

      When I open/close a position, it gets executed at next candle's open price. How can i make it happen at next candles volume weighted average price instead (or any other custom price)?

      1 Reply Last reply Reply Quote 0
      • warproxxx
        warproxxx last edited by

        I can supply the volume weighted average price manually.

        warproxxx 1 Reply Last reply Reply Quote 0
        • warproxxx
          warproxxx @warproxxx last edited by

          I can achieve this by setting the open price of each candle as VWAP but is there a more elegant method?

          1 Reply Last reply Reply Quote 0
          • hghhgghdf dfdf
            hghhgghdf dfdf last edited by

            https://backtrader.com/docu/order/#order-creation

            1 Reply Last reply Reply Quote -1
            • A
              ab_trader last edited by

              https://community.backtrader.com/topic/3040/execute-market-order-on-average-price-on-bt

              • If my answer helped, hit reputation up arrow at lower right corner of the post.
              • Python Debugging With Pdb
              • New to python and bt - check this out
              warproxxx 1 Reply Last reply Reply Quote 1
              • warproxxx
                warproxxx @ab_trader last edited by

                @ab_trader said in Trade at Volume Weighted Average Price (VWAP)?:

                https://community.backtrader.com/topic/3040/execute-market-order-on-average-price-on-bt

                Thank you. What the guy said there is exactly what I am trying to achieve but I have the VWAP. And, you have posted the solution there. Thank you.

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