OPEN-SOURCE SCRIPT
Cập nhật Support and Resistance Lines

Draw the last 5 support and resistance lines. It works on the current timeframe. You can adjust the sensibility by changing the diff variable.
Phát hành các Ghi chú
Draw the last 5 support and resistance lines on current timeframe.Phát hành các Ghi chú
Exposed some parameters:- Maximum Bars to Analyze
- Sensitivity in Pips for Resistance/Support
Phát hành các Ghi chú
Some improvements for JPY chartsPhát hành các Ghi chú
This script dynamically identifies and plots support and resistance levels on the chart using recent highs and lows. The indicator is fully customizable, allowing traders to adjust sensitivity and the number of bars analyzed, making it suitable for different timeframes and trading strategies.What It Does
The indicator calculates up to five resistance levels and five support levels based on recent price action:
- Resistance Lines: Represent areas where price has faced upward rejection.
- Support Lines: Represent areas where price has shown buying interest and bounced upward.
The script:
- Scans historical bars to detect significant highs (resistance) and lows (support).
- Filters new levels based on a configurable sensitivity parameter in pips to ensure meaningful zones.
- Plots the lines dynamically:
- Yellow lines for resistances.
- Blue lines for supports.
How It Works
- A parameter (Sensitivity in Pips) allows users to define the minimum distance required for a new support or resistance level to be identified. For example, a higher sensitivity (e.g., 10 pips) will filter out small fluctuations, focusing on stronger levels.
- The script iterates through a user-defined number of historical bars (Maximum Bars to Analyze) to identify key highs and lows.
- It maintains the most recent five resistance and five support levels, updating dynamically as new highs and lows are detected.
- Resistance and support lines are drawn horizontally across the chart and update automatically with the most relevant levels.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.