kernc / backtesting.py

:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
https://kernc.github.io/backtesting.py/
GNU Affero General Public License v3.0
5.04k stars 987 forks source link

A few questions about execution on lower timeframes and weekly vwap #1132

Open TwoPrismsOneGround opened 3 months ago

TwoPrismsOneGround commented 3 months ago

I am looking to plot indicators off of a 5 minute chart but still execute on the 1minute. I currently am resampling into 5 minute bars but I am ending up with plots that look like this:

5 minute bar plots backtest

I am also seeking to do a weekly vwap calculation but even if I get it to not calculate until there is enough data to do so, I am constantly running into errors when it comes to running the backtest and plotting, any recommendations?