OPEN-SOURCE SCRIPT
Optimus S/R Zones

Enhanced S/R Zones Pro is a sophisticated Support and Resistance indicator designed for traders who need reliable, validated S/R levels with professional-grade visualization. Unlike basic pivot indicators, this tool validates levels based on historical price interaction and provides comprehensive analysis of your current position within the market structure.
✨ Key Features
📊 Extended Lookback Analysis
Lookback Range: 20-500 bars (far beyond standard 80-bar limits)
Pivot Strength: Adjustable 2-10 bars for confirmation
Separate Controls: Independent max levels for support (1-8) and resistance (1-8)
Smart Filtering: Automatic level spacing with customizable minimum distance (0.3-5%)
🎨 Advanced Zone Visualization
Three Zone Styles:
Filled: Solid colored zones
Outlined: Border-only zones
Both: Combined for maximum visibility
Adjustable Transparency: 50-95% opacity control
Dynamic Extension: Zones extend to the right indefinitely
Custom Zone Width: 0.05-1.0% of price
💪 Level Strength System
Touch Validation: Only shows levels tested multiple times
Minimum Touches: Filter for 1-5 minimum confirmations
Color Intensity: Stronger levels (more touches) display darker/brighter
Touch Detection: Customizable sensitivity (0.1-1.0% range)
Independent Display: Show touch counts without color coding
📱 Enhanced Dashboard
Level Count: Active support/resistance zones
Distance Metrics: Percentage to nearest S/R levels
Range Position: Where price sits between S/R (0-100%)
Color Coding: Visual feedback on market position
Four Positions: Top/Bottom, Left/Right placement
🎭 Customizable Visuals
Label Sizes: Tiny, Small, Normal, Large, Huge
Adjustable Line Width: 1-4 pixels
Custom Colors: Full color picker for support/resistance
Optional Touch Count: Toggle touch numbers on/off
Midpoint Line: Shows equilibrium between nearest S/R
🔔 Smart Alerts
Proximity Alerts: Triggers when approaching support zones
Resistance Alerts: Triggers when nearing resistance zones
Customizable Range: Based on touch detection sensitivity
🔧 How It Works
1. Pivot Detection
The indicator scans historical price action using configurable pivot strength to identify significant highs and lows. Extended lookback allows detection of major structural levels that shorter timeframes might miss.
2. Touch Validation
Each potential level is validated by counting how many times price has tested it within the specified touch detection range. Only levels meeting the minimum touch threshold are displayed.
3. Strength Ranking
Levels are ranked by:
Number of touches (primary)
Proximity to current price (secondary)
This ensures the most reliable and relevant levels are always shown.
4. Smart Filtering
The minimum distance filter prevents level clustering, keeping your chart clean and focusing only on distinct, actionable zones.
💡 Use Cases
Swing Trading
Identify major support/resistance for position entries
Set profit targets at strong resistance levels
Place stops below validated support zones
Day Trading
Quick identification of intraday S/R
Monitor range position for mean reversion trades
Use proximity alerts for entry timing
Position Trading
Extended lookback reveals major structural levels
Touch count validation ensures reliability
Range position helps time accumulation/distribution
Risk Management
Distance metrics help size positions appropriately
Strong levels (high touch count) for tight stops
Midpoint line for partial profit taking
⚙️ Settings Guide
Core Settings
Lookback Period: Start with 100 for swing trading, 50 for day trading
Pivot Strength: Higher values = fewer but stronger levels
Max Levels: 2-3 support and 2-3 resistance recommended
Min Distance: 1.0% prevents clustering, increase for volatile assets
Zone Settings
Zone Width: 0.25% default works well for most assets
Zone Style: "Both" for maximum visibility
Extend Zones: Keep enabled to track levels forward
Transparency: 85% provides good visibility without clutter
Level Strength
Show Level Strength: Enable for color-coded importance
Min Touches: 2-3 for validated levels
Touch Detection: 0.3% for precise levels, increase for volatile markets
Visual Settings
Label Size: Small/Normal for most charts
Show Touch Count: Enable to see level validation
Line Width: 2 for standard, 3-4 for presentation charts
📈 Best Practices
Start Conservative: Begin with default settings, adjust based on asset volatility
Combine Timeframes: Use different lookback periods on multiple charts
Respect Strong Levels: Higher touch counts indicate institutional interest
Watch Range Position: <30% = near support, >70% = near resistance
Use Alerts: Set proximity alerts to avoid constant chart watching
Validate Breaks: Zone width shows where true breaks occur vs. fakeouts
🚀 What Makes This Different
Unlike basic pivot indicators that simply mark highs/lows:
✅ Validates levels through touch count analysis
✅ Ranks levels by actual strength, not just recency
✅ Visualizes zones, not just lines
✅ Quantifies your position within market structure
✅ Extends lookback far beyond standard limits
✅ Separates support and resistance controls
🎓 Tips for New Users
First Time Setup:
Add indicator to chart
Enable dashboard in settings (default on)
Observe which levels price respects
Adjust lookback/strength to match your trading style
Set proximity alerts for your key levels
Optimization:
Forex: 0.2-0.3% zone width, 100-200 lookback
Stocks: 0.3-0.5% zone width, 50-150 lookback
Crypto: 0.4-0.6% zone width, 100-200 lookback
Indices: 0.2-0.4% zone width, 100-250 lookback
⚠️ Disclaimer
This indicator is a technical analysis tool and should not be used as the sole basis for trading decisions. Support and resistance levels are not guarantees of price behavior. Always use proper risk management, combine with other analysis methods, and consider fundamental factors. Past performance does not guarantee future results.
✨ Key Features
📊 Extended Lookback Analysis
Lookback Range: 20-500 bars (far beyond standard 80-bar limits)
Pivot Strength: Adjustable 2-10 bars for confirmation
Separate Controls: Independent max levels for support (1-8) and resistance (1-8)
Smart Filtering: Automatic level spacing with customizable minimum distance (0.3-5%)
🎨 Advanced Zone Visualization
Three Zone Styles:
Filled: Solid colored zones
Outlined: Border-only zones
Both: Combined for maximum visibility
Adjustable Transparency: 50-95% opacity control
Dynamic Extension: Zones extend to the right indefinitely
Custom Zone Width: 0.05-1.0% of price
💪 Level Strength System
Touch Validation: Only shows levels tested multiple times
Minimum Touches: Filter for 1-5 minimum confirmations
Color Intensity: Stronger levels (more touches) display darker/brighter
Touch Detection: Customizable sensitivity (0.1-1.0% range)
Independent Display: Show touch counts without color coding
📱 Enhanced Dashboard
Level Count: Active support/resistance zones
Distance Metrics: Percentage to nearest S/R levels
Range Position: Where price sits between S/R (0-100%)
Color Coding: Visual feedback on market position
Four Positions: Top/Bottom, Left/Right placement
🎭 Customizable Visuals
Label Sizes: Tiny, Small, Normal, Large, Huge
Adjustable Line Width: 1-4 pixels
Custom Colors: Full color picker for support/resistance
Optional Touch Count: Toggle touch numbers on/off
Midpoint Line: Shows equilibrium between nearest S/R
🔔 Smart Alerts
Proximity Alerts: Triggers when approaching support zones
Resistance Alerts: Triggers when nearing resistance zones
Customizable Range: Based on touch detection sensitivity
🔧 How It Works
1. Pivot Detection
The indicator scans historical price action using configurable pivot strength to identify significant highs and lows. Extended lookback allows detection of major structural levels that shorter timeframes might miss.
2. Touch Validation
Each potential level is validated by counting how many times price has tested it within the specified touch detection range. Only levels meeting the minimum touch threshold are displayed.
3. Strength Ranking
Levels are ranked by:
Number of touches (primary)
Proximity to current price (secondary)
This ensures the most reliable and relevant levels are always shown.
4. Smart Filtering
The minimum distance filter prevents level clustering, keeping your chart clean and focusing only on distinct, actionable zones.
💡 Use Cases
Swing Trading
Identify major support/resistance for position entries
Set profit targets at strong resistance levels
Place stops below validated support zones
Day Trading
Quick identification of intraday S/R
Monitor range position for mean reversion trades
Use proximity alerts for entry timing
Position Trading
Extended lookback reveals major structural levels
Touch count validation ensures reliability
Range position helps time accumulation/distribution
Risk Management
Distance metrics help size positions appropriately
Strong levels (high touch count) for tight stops
Midpoint line for partial profit taking
⚙️ Settings Guide
Core Settings
Lookback Period: Start with 100 for swing trading, 50 for day trading
Pivot Strength: Higher values = fewer but stronger levels
Max Levels: 2-3 support and 2-3 resistance recommended
Min Distance: 1.0% prevents clustering, increase for volatile assets
Zone Settings
Zone Width: 0.25% default works well for most assets
Zone Style: "Both" for maximum visibility
Extend Zones: Keep enabled to track levels forward
Transparency: 85% provides good visibility without clutter
Level Strength
Show Level Strength: Enable for color-coded importance
Min Touches: 2-3 for validated levels
Touch Detection: 0.3% for precise levels, increase for volatile markets
Visual Settings
Label Size: Small/Normal for most charts
Show Touch Count: Enable to see level validation
Line Width: 2 for standard, 3-4 for presentation charts
📈 Best Practices
Start Conservative: Begin with default settings, adjust based on asset volatility
Combine Timeframes: Use different lookback periods on multiple charts
Respect Strong Levels: Higher touch counts indicate institutional interest
Watch Range Position: <30% = near support, >70% = near resistance
Use Alerts: Set proximity alerts to avoid constant chart watching
Validate Breaks: Zone width shows where true breaks occur vs. fakeouts
🚀 What Makes This Different
Unlike basic pivot indicators that simply mark highs/lows:
✅ Validates levels through touch count analysis
✅ Ranks levels by actual strength, not just recency
✅ Visualizes zones, not just lines
✅ Quantifies your position within market structure
✅ Extends lookback far beyond standard limits
✅ Separates support and resistance controls
🎓 Tips for New Users
First Time Setup:
Add indicator to chart
Enable dashboard in settings (default on)
Observe which levels price respects
Adjust lookback/strength to match your trading style
Set proximity alerts for your key levels
Optimization:
Forex: 0.2-0.3% zone width, 100-200 lookback
Stocks: 0.3-0.5% zone width, 50-150 lookback
Crypto: 0.4-0.6% zone width, 100-200 lookback
Indices: 0.2-0.4% zone width, 100-250 lookback
⚠️ Disclaimer
This indicator is a technical analysis tool and should not be used as the sole basis for trading decisions. Support and resistance levels are not guarantees of price behavior. Always use proper risk management, combine with other analysis methods, and consider fundamental factors. Past performance does not guarantee future results.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.