talks about Open being the most important price of the day. Hence, this indicator.
The Green line is average Open-to-High for occurrences of Red days. The Red line is average Open-to-Low for occurrences of Green days.
Average are not perfect calculations since occurrences(of Red or Green) will vary within the time-span used for averages.
These can used to gauge likelihood of the intra-day price reversal. If the price exceeds green/red line, there is higher likelihood of the price closing above/below open.
The blue lines are average Open-to-close for Green and Red occurrences.
Be careful on days where consecutive 3rd Highest High or Lowest Low day is made and also on the next day after such day. Prices may turn direction at least for a short while.
The precursor to this script of the Candle Infopanel script. That script was just numbers in panel and this is a graphical representation. I
Some of the calculations from original script are commented here because it would make visuals clutters (and probably the left-out calculation are not critical to making trade decisions!)
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
"Security" function with "D" parameter, gets data for the current day. So I call the previous data by using "avgDnOp2Lo_" where is getting previous days data. If you use "5" in place of "D", you will get data of 5 minutes' candle and probably won't give right results if your chart is on a timeframe larger than 5 minutes. If you want to same calculations for 5 days range, you need to replace "D" with "5D".