This script is inspired (published with approval) by "All Lines" [C06alt], Many thanks and gratitude to the original creator!
The difference is that here, you can choose how many Support/Resistance lines you want to see. (0-15, perhaps more in the future)
The script will always show the closest S/R levels, if for example the 'M.P level' becomes closest to the price while before '1h.ema20' was closer, the line/label will automatically change to the 'M.P level'.
For me, this was a nice practise for my 'array' skills :)
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 publications is governed by House rules. 您可以收藏它以在圖表上使用。