Note that "Hidden Levels" part of the code is only expected to work on Forex charts, but apart from that, the other parts could be applied to any chart.
The script may:
- Draw classical levels which retraced the price previously, aided by multi-timeframe analysis
- Draw hidden levels based on psychological patterns of the price
- Adjust to wicks better than Pine Script built-in functions
- Differ the levels color based on chart reactions
- Merge nearby classical levels to avoid congestion on the chart
Feel free to use it and send me your thoughts.
Finally Pine Script added support for lines to arrays and made me to update some of my scripts like this one. So:
- Now user could define the count of most recent detected levels to be drawn on the chart
- Levels detection now works better than before
- Many levels which would be lost because of the language limitations are now fully present on the chart
- All detected types of levels could now be combined
- From now on, Forex-specific levels will be automatically hidden on non-Forex charts
This is my most complete S/R indicator so far and you could switch from all my previous ones to this one. Good luck!
Added an option and a procedure of auto-detecting proper distance to combine nearby levels on the chart, so:
- There is no more need to manually set the minimum ticks in case of time-frame and/or asset changes.
- The proper distance will be calculated dynamically and maybe change relative to the chart and bars conditions.
- Fixed disappearance of round levels in some cases
- Removed visible levels count limit (Practically it's at most 500 because of Pine Script limitation)
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.