I am dealing with OHLC data of a stock in pandas. I have set 'date' column as index. Other columns are - open, high, low and close.
low = df['2021']['low'][0]
shall give first value in low column/first low of year 2021
How do I find the earliest value in 'high' column which is 1000 pts away & falls after the date of low
. For example, if such first low is 12000, How do I fetch first high that's bigger than 13000(12000+1000) ?
Also, how to fetch index of such high when found?
I'm a beginner in python/pandas. Any suggestions would be welcome. Thank you.