OPEN-SOURCE SCRIPT
Updated Near N Bars Real Body High and Low Support and Resistance

This indicator dynamically identifies support and resistance levels based on the highest and lowest values of the real bodies (open and close prices) of the most recent N bars. Users can interactively select the starting bar by clicking on the chart, and the script calculates the highest high and lowest low within the specified range, drawing horizontal support and resistance lines accordingly. The lines can be extended to the left and right according to user inputs. This tool helps traders visually identify key price levels for technical analysis based on recent price action.
Release Notes
A higher timeframe setting has been added. It should be noted that if a higher timeframe is set and the anchor arrow is dragged on a lower timeframe chart to select a new bar, it will automatically round up to the next bar of the higher timeframe.For example, if the higher timeframe is set to 1 hour (1H) and the initial bar is at 17:00, dragging the arrow on a 5-minute chart to 17:10 will change the initial bar to 18:00.
Release Notes
Updated the drawing of the wick highest/lowest lines, the corresponding timezone labels, and enabled switching between display modes.Release Notes
Add the arrow backOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.