I want to identify if the previous day's high and low was a pivot on a lower timeframe like the 15min

Viewed 24

Anyone has any idea how to do this?

I'm thinking I would first need to find the bar index of the highest high and lowest low of the previous day and then use the ta.pivothigh and ta.pivotlow function to see if they were pivots on the 15minute timeframe.

It sounds pretty simple but I can't seem to find a way to identify the previous day high or low's bar index on a lower timeframe.

1 Answers

You can identify the prior day price value for high and low - that is simple enough.

Identifying the 15min candle where that candles high/low = to the daily high/low would not necessarily occur uniquely (you could for example have multiple 15min touches to a daily high or low.

Then the question depends on whether you are looking at a 15min chart (for example) or whether you want to determine 15min data using a security call.

Related