OPEN-SOURCE SCRIPT
Dynamic Support & Resistance (DSR)

tndicator description: Dynamic Support & Resistance (DSR)
What it does
Plots dynamic support and resistance that adapt to any timeframe. In bullish phases it highlights resistances; in bearish phases it highlights supports. Works for scalping, binary options, and day trading.
How it works
Detects recent swing highs/lows with noise filtering.
Merges nearby levels into “zones” with configurable tolerance.
Promotes a zone after a valid break-and-close.
Classifies context as trend, channel, or range via slope and move strength.
Shows only context-relevant zones to reduce clutter.
Inputs
Swing length (pivot high/low).
Merge tolerance (%, ticks, or ATR fraction).
Lookback depth.
Trend filter (EMA or optional ADX).
Minimum touches to validate a zone.
Display mode: lines, bands, or blocks.
Break sensitivity (close condition, wick allowance, body %).
Visual outputs
Resistance zones during bullish phases.
Support zones during bearish phases.
Dual zones in ranges/channels.
Labels: touch count, zone strength, last test timestamp.
Signals and rules (suggested)
Reversal: rejection candle at a valid zone + momentum/volume confirmation.
Continuation: strong close through the zone + successful retest.
Invalidation: two full closes back inside the zone in the opposite direction.
Alerts (templates)
“Price touched DSR Resistance [strength X, touches N].”
“Break of DSR Support with close > sensitivity.”
“Successful retest at DSR Zone. Possible continuation.”
Timeframe guidance
1–5m: higher sensitivity, tighter tolerance. For scalping and binaries.
15–60m: balance between frequency and reliability.
4H–D: anchor levels for intraday planning.
Risk management
Technical stop: beyond the opposite zone + tolerance buffer.
Scaled TP: first at mid-range, second at next DSR zone.
Avoid trading into high-impact news.
Advantages
Auto-adapts to trend, channel, and range without constant tuning.
Reduces noise by merging redundant levels.
Focus on zones with verified touches and strength.
Limitations
Not predictive. Use with price/volume confirmation.
In high volatility, zones can update quickly. Tune tolerance accordingly.
Disclaimer
Educational only. Not financial advice. Test on demo before live use.
What it does
Plots dynamic support and resistance that adapt to any timeframe. In bullish phases it highlights resistances; in bearish phases it highlights supports. Works for scalping, binary options, and day trading.
How it works
Detects recent swing highs/lows with noise filtering.
Merges nearby levels into “zones” with configurable tolerance.
Promotes a zone after a valid break-and-close.
Classifies context as trend, channel, or range via slope and move strength.
Shows only context-relevant zones to reduce clutter.
Inputs
Swing length (pivot high/low).
Merge tolerance (%, ticks, or ATR fraction).
Lookback depth.
Trend filter (EMA or optional ADX).
Minimum touches to validate a zone.
Display mode: lines, bands, or blocks.
Break sensitivity (close condition, wick allowance, body %).
Visual outputs
Resistance zones during bullish phases.
Support zones during bearish phases.
Dual zones in ranges/channels.
Labels: touch count, zone strength, last test timestamp.
Signals and rules (suggested)
Reversal: rejection candle at a valid zone + momentum/volume confirmation.
Continuation: strong close through the zone + successful retest.
Invalidation: two full closes back inside the zone in the opposite direction.
Alerts (templates)
“Price touched DSR Resistance [strength X, touches N].”
“Break of DSR Support with close > sensitivity.”
“Successful retest at DSR Zone. Possible continuation.”
Timeframe guidance
1–5m: higher sensitivity, tighter tolerance. For scalping and binaries.
15–60m: balance between frequency and reliability.
4H–D: anchor levels for intraday planning.
Risk management
Technical stop: beyond the opposite zone + tolerance buffer.
Scaled TP: first at mid-range, second at next DSR zone.
Avoid trading into high-impact news.
Advantages
Auto-adapts to trend, channel, and range without constant tuning.
Reduces noise by merging redundant levels.
Focus on zones with verified touches and strength.
Limitations
Not predictive. Use with price/volume confirmation.
In high volatility, zones can update quickly. Tune tolerance accordingly.
Disclaimer
Educational only. Not financial advice. Test on demo before live use.
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.