I have trading logs and would like to resample my data to following.
- Resample to 2 hour timeframe with
OHLC
(which I am able to achieve) - Result to be "Odd" timeframe, not "Even" (which I'm struggling right now)
e.g
9:00 ....
11:00 ....
13:00 ....
I tried to resample my log by using following code, but it will end up with "Even" timeframe.
min_1 = df.resample('2H').ohlc()
Result:
2019-12-12 04:00:00+00:00 7144.0 7165.0 7131.0 7132.5 56757860.0
2019-12-12 06:00:00+00:00 7132.5 7158.5 7132.5 7158.0 44329860.0
2019-12-12 08:00:00+00:00 7158.0 7158.5 7096.5 7121.5 104173650.0
2019-12-12 10:00:00+00:00 7121.5 7223.0 7121.5 7148.5 174419981.0
2019-12-12 12:00:00+00:00 7148.5 7193.5 7148.5 7169.0 65978310.0
Is there a way to resample to "Odd" timeframe?
(The reason why I want to achieve this is because Tradingview 2 hour timeframe is based on odd timeframe so I want to adjust my code to that)