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)?
-
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)?
-
I can supply the volume weighted average price manually.
-
I can achieve this by setting the open price of each candle as VWAP but is there a more elegant method?
-
-
-
@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.