access the last trading day OHLCV 1H time frame?
Need your assistance as I have no idea how to solve the below issue (after reading documentation several times).
I am writing an indicator that is going to calculate some values/levels (unknown number of levels - depending on the last day price movement) based on the last day 1H time frame (OHLCV) and present those levels today 5M (or 15M) time frame.
Data I deliver is: data0 - 1M OHLCV and additionally, I use “cerebro.resampledata” to resample date to 1H/5M/15M etc.
The questions are:
How can I access the last trading day OHLCV 1H time frame?
How to deal with an unknown number of levels generated by indicator - how to create lines for them?
run-out last edited by
@luzzalgos When you resample, you are accessing the
lastof higher timeframes in each minute bar. So in the current minute bar, you are getting the ohlc of the last
To access the last hour of the last day, you will need to create a custom indicator that records that last
hour'svalue at the end of the day, and then makes it available the next day for the entire day.
Thank you for your response @run-out
Okay, maybe that’s the way…
What if I will create an additional data feed OHLCV 1H time frame (I will be getting it from InfluxDB via influx_feed). Is there a way to get the last day data for calculation in 1H tf?