datetime of a candle, open or close time?
-
Hello,
For a given CSV data, does backtrader assume that the datetime is the opening time of the candle? Is there any way to change that behaviour?
Thank you in advance
-
You probably need to enlighten us, with what you want. A candle has 4 points (OHLC) but a single timestamp. That doesn't have to do with days, minutes or the timeframe. It's a definition.
You are probably looking at using smaller timeframes.
-
@backtrader timestamp of the arrival time or timestamp of the closing time of the candle?
-
@backtrader in accordance with that, how does
resampledata
handle timestamps?Let's assume I have 1 minute data with opening times starting from
18:00
until but not including19:30
, e.g.:18:00 o h l c 18:01 o h l c ... 19:28 o h l c 19:29 o h l c
If I were to resample it to 30 minutes, what would be the timestamps of the resampled data?
-
I think what I am searching for is the
rightedge
attribute ofresampledata
. I will give it a quick shot. -
figured it out. set
boundoff=1
as arg ofreplaydata