This is what I'm aiming to achieve: enter image description here
This is the function I'm referring to:
//@version=5
indicator("`request.security_lower_tf()` Example", overlay = true)
// If the current chart timeframe is set to 120 minutes, then the `arrayClose` array will contain two 'close' values from the 60 minute timeframe for each bar.
arrClose = request.security_lower_tf(syminfo.tickerid, "60", close)
if bar_index == last_bar_index - 1
label.new(bar_index, high, str.tostring(arrClose))
Where the issue is:
this function displays lower timeframe candles for an already closed candle (past candle)
What I want is...to display past candles (already closed)...AND current active candles
If I go and change this part:
if bar_index == last_bar_index - 1
...with this part:
if bar_index == last_bar_index
...it displays (on-screen) the correct data (past candles + active candles)...and then it disappears from screen...as if it flashes for a few seconds and then data is gone.
Why does it do that? Out of range? Any thoughts?
It's seems to be fixed. Please check again, it looks like everything is working as expected now.