PROTECTED SOURCE SCRIPT
已更新 Swing & Intraday Entry/Exit Setup V0.1

Support & Resistance Levels with Moving Averages & Supertrend
Overview
This comprehensive indicator combines Multi Support/Resistance analysis, Moving Average, and Supertrend signals into one powerful tool. Designed for intraday/swing traders, it helps identify key price levels across Daily, Weekly, and Monthly while providing trend confirmation through MAs and Supertrend.
Product of: CandleCodex
License: Free for personal use | NOT FOR SALE
Version: 5.0 (Pine Script v6)
---
KEY FEATURES
Swing & Intraday Entry/Exit Setup V0.1 © CandleCodex™ (Daily/Weekly/Monthly)
- Previous Day High/Low (PDH/PDL) with customizable styling
- Previous Week High/Low (PWH/PWL) with independent settings
- Previous Month High/Low (PMH/PML) for swing traders
- Mid Levels - Adjustable percentage (default 50%) between high and low
- R1, R2, R3 - Projected resistance levels based on price range
- S1, S2, S3 - Projected support levels for breakout/breakdown targets
Moving Average
- 4 Fully Customizable MAs (20, 50, 100, 200 by default)
- Multiple MA Types: SMA, EMA, SMMA (RMA), WMA, VWMA
- Custom Source Selection: Close, Open, High, Low, HL2, HLC3, OHLC4
- Individual Colors & Toggle:** Show/hide each MA independently
Supertrend Indicator
- Buy/Sell Signals - Automatic labels on trend reversals
- Trend Highlighting - Background fill for bullish/bearish trends
- Customizable ATR Period & Multiplier (Default: 10, 3.0)
- Multiple Source Options: HL2, Close, Open, etc.
- Alert Conditions: Set alerts for buy/sell signals and trend changes
Information Tables
- 3 Separate Tables for Daily, Weekly, Monthly levels
- Adjustable Positions: 9 position options (top, middle, bottom - left, center, right)
- Custom Text Size: Tiny, Small, Normal, Large
- Live Price Display: Shows all levels with current prices
- Range Calculation: Displays trading range for each timeframe
Advanced Customization
- Line Styling: Width (1-5), Style (Solid/Dashed/Dotted), Color for EVERY level
- Label Options: Show/hide labels, show/hide prices, left/right positioning
- Historical Data: Display up to 50 previous periods
- Custom Session Timing: Set specific hours for daily levels (Indian market: 9:15-15:30)
- Copyright Watermark: Toggleable branding with position control
---
VISUAL CUSTOMIZATION
Every line (High, Low, Mid, R1-R3, S1-S3) has independent controls for:
- Color - Choose from full color palette with transparency
- Width - 1 to 5 pixels thickness
- Style - Solid, Dashed, or Dotted lines
- Show/Hide - Toggle individual levels on/off
Default Color Scheme:
- Daily: Green (High), Red (Low), Yellow (Mid)
- Weekly: Cyan (High), Magenta (Low), Light Green (Mid)
- Monthly: Orange (High), Purple (Low), Pink (Mid)
---
HOW TO USE
For Day Traders:
1. Enable Daily Levels - Focus on PDH/PDL as key intraday S/R zones
2. Watch for Breakouts - Price breaking PDH = bullish, breaking PDL = bearish
3. Use Mid Level - Acts as equilibrium; rejection zone for mean reversion
4. R/S Targets - Use R1, R2, R3 as profit targets above PDH; S1, S2, S3 below PDL
5. MA Confirmation - Enter trades in direction of MA trend
6. Supertrend Signals - Take BUY when price above Supertrend, SELL when below
For Swing Traders:
1. Enable Weekly/Monthly Levels - PWH/PWL and PMH/PML for bigger picture
2. Combine Timeframes - Strong rejection at PWL + Daily bullish Supertrend = long opportunity
3. Range Trading - Trade between PWH and PWL in consolidation
4. Breakout Confirmation - Use MA ribbon to confirm trend direction on HTF breakouts
Risk Management:
- Place Stop Loss just below PDL for longs, above PDH for shorts
- Targets: Use R1/S1 for scalping, R2/S2 for swing trades, R3/S3 for momentum trades
- Avoid Chop Zones: When price between MAs, wait for clear trend
---
SETTINGS GROUPS
1. ENABLE/DISABLE FEATURES - Master toggles for all components
2. DISPLAY SETTINGS - Labels, prices, positioning, historical periods
3. DAILY LEVELS STYLING - Complete customization for daily timeframe
4. WEEKLY LEVELS STYLING - Complete customization for weekly timeframe
5. MONTHLY LEVELS STYLING - Complete customization for monthly timeframe
6. MOVING AVERAGES - 4 independent MA configurations
7. SUPERTREND - ATR period, multiplier, signals, highlighting
8. TABLE SETTINGS - Position, size, colors for info tables
9. ADVANCED SETTINGS - Custom session timing, timezone
---
UNIQUE ADVANTAGES
All-in-One Solution - No need for multiple indicators cluttering your chart
Zero Lag - Calculates previous day/week/month data accurately without repainting
Full Control - Every visual element is customizable
Clean Interface - Organized settings with clear tooltips
Performance Optimized - Efficient code, no lag even with all features enabled
Indian Market Ready - Custom session timing (9:15 AM - 3:30 PM IST)
Free Forever - No subscriptions, no hidden costs
---
## 📖 TECHNICAL DETAILS
- Pine Script Version: v6
- Chart Type: Overlay indicator
- Calculation Method: Uses `request.security()` for accurate HTF data with `lookahead_on` to prevent repainting
- Data Structures: Uses Pine v5 matrices and custom types for efficient level management
- Performance: Max 500 lines, 500 labels for historical level display
---
IMPORTANT NOTES
- Works best on intraday timeframes (15min to 4hour)
- Requires TradingView Premium/Pro for reliable multi-timeframe data
- Previous day data appears after the first bar of new day
- Custom session timing only affects Daily levels (Weekly/Monthly use standard calendar)
- Tables display only on last bar to maintain performance
---
LEARNING RESOURCES
This indicator is designed to help traders understand:
- Key support and resistance concepts
- Multi-timeframe analysis techniques
- Trend following with moving averages
- Momentum trading with Supertrend
- Professional chart setup and risk management
---
COPYRIGHT & TERMS
© 2025 CandleCodex™ - All Rights Reserved
Developer: Siddharth Sharma
License: Mozilla Public License 2.0 with additional restrictions
Allowed:
- Personal trading use
- Educational purposes
- Sharing with attribution
Prohibited:
- Commercial sale or resale
- Rebranding as your own work
- Removing copyright notices
- Claiming authorship
This indicator is FREE and will always remain FREE.
If someone is selling this, they are violating copyright.
---
SUPPORT & FEEDBACK
For questions, suggestions, or bug reports:
- Comment below this publication
- Follow CandleCodex™ for updates
- Check release notes for latest improvements
If you find this indicator useful, please Like ❤️ and leave a comment!
---
Disclaimer: This indicator is for educational purposes only. Trading involves risk. Past performance does not guarantee future results. Always practice proper risk management and consult with a financial advisor before trading.
Overview
This comprehensive indicator combines Multi Support/Resistance analysis, Moving Average, and Supertrend signals into one powerful tool. Designed for intraday/swing traders, it helps identify key price levels across Daily, Weekly, and Monthly while providing trend confirmation through MAs and Supertrend.
Product of: CandleCodex
License: Free for personal use | NOT FOR SALE
Version: 5.0 (Pine Script v6)
---
KEY FEATURES
Swing & Intraday Entry/Exit Setup V0.1 © CandleCodex™ (Daily/Weekly/Monthly)
- Previous Day High/Low (PDH/PDL) with customizable styling
- Previous Week High/Low (PWH/PWL) with independent settings
- Previous Month High/Low (PMH/PML) for swing traders
- Mid Levels - Adjustable percentage (default 50%) between high and low
- R1, R2, R3 - Projected resistance levels based on price range
- S1, S2, S3 - Projected support levels for breakout/breakdown targets
Moving Average
- 4 Fully Customizable MAs (20, 50, 100, 200 by default)
- Multiple MA Types: SMA, EMA, SMMA (RMA), WMA, VWMA
- Custom Source Selection: Close, Open, High, Low, HL2, HLC3, OHLC4
- Individual Colors & Toggle:** Show/hide each MA independently
Supertrend Indicator
- Buy/Sell Signals - Automatic labels on trend reversals
- Trend Highlighting - Background fill for bullish/bearish trends
- Customizable ATR Period & Multiplier (Default: 10, 3.0)
- Multiple Source Options: HL2, Close, Open, etc.
- Alert Conditions: Set alerts for buy/sell signals and trend changes
Information Tables
- 3 Separate Tables for Daily, Weekly, Monthly levels
- Adjustable Positions: 9 position options (top, middle, bottom - left, center, right)
- Custom Text Size: Tiny, Small, Normal, Large
- Live Price Display: Shows all levels with current prices
- Range Calculation: Displays trading range for each timeframe
Advanced Customization
- Line Styling: Width (1-5), Style (Solid/Dashed/Dotted), Color for EVERY level
- Label Options: Show/hide labels, show/hide prices, left/right positioning
- Historical Data: Display up to 50 previous periods
- Custom Session Timing: Set specific hours for daily levels (Indian market: 9:15-15:30)
- Copyright Watermark: Toggleable branding with position control
---
VISUAL CUSTOMIZATION
Every line (High, Low, Mid, R1-R3, S1-S3) has independent controls for:
- Color - Choose from full color palette with transparency
- Width - 1 to 5 pixels thickness
- Style - Solid, Dashed, or Dotted lines
- Show/Hide - Toggle individual levels on/off
Default Color Scheme:
- Daily: Green (High), Red (Low), Yellow (Mid)
- Weekly: Cyan (High), Magenta (Low), Light Green (Mid)
- Monthly: Orange (High), Purple (Low), Pink (Mid)
---
HOW TO USE
For Day Traders:
1. Enable Daily Levels - Focus on PDH/PDL as key intraday S/R zones
2. Watch for Breakouts - Price breaking PDH = bullish, breaking PDL = bearish
3. Use Mid Level - Acts as equilibrium; rejection zone for mean reversion
4. R/S Targets - Use R1, R2, R3 as profit targets above PDH; S1, S2, S3 below PDL
5. MA Confirmation - Enter trades in direction of MA trend
6. Supertrend Signals - Take BUY when price above Supertrend, SELL when below
For Swing Traders:
1. Enable Weekly/Monthly Levels - PWH/PWL and PMH/PML for bigger picture
2. Combine Timeframes - Strong rejection at PWL + Daily bullish Supertrend = long opportunity
3. Range Trading - Trade between PWH and PWL in consolidation
4. Breakout Confirmation - Use MA ribbon to confirm trend direction on HTF breakouts
Risk Management:
- Place Stop Loss just below PDL for longs, above PDH for shorts
- Targets: Use R1/S1 for scalping, R2/S2 for swing trades, R3/S3 for momentum trades
- Avoid Chop Zones: When price between MAs, wait for clear trend
---
SETTINGS GROUPS
1. ENABLE/DISABLE FEATURES - Master toggles for all components
2. DISPLAY SETTINGS - Labels, prices, positioning, historical periods
3. DAILY LEVELS STYLING - Complete customization for daily timeframe
4. WEEKLY LEVELS STYLING - Complete customization for weekly timeframe
5. MONTHLY LEVELS STYLING - Complete customization for monthly timeframe
6. MOVING AVERAGES - 4 independent MA configurations
7. SUPERTREND - ATR period, multiplier, signals, highlighting
8. TABLE SETTINGS - Position, size, colors for info tables
9. ADVANCED SETTINGS - Custom session timing, timezone
---
UNIQUE ADVANTAGES
All-in-One Solution - No need for multiple indicators cluttering your chart
Zero Lag - Calculates previous day/week/month data accurately without repainting
Full Control - Every visual element is customizable
Clean Interface - Organized settings with clear tooltips
Performance Optimized - Efficient code, no lag even with all features enabled
Indian Market Ready - Custom session timing (9:15 AM - 3:30 PM IST)
Free Forever - No subscriptions, no hidden costs
---
## 📖 TECHNICAL DETAILS
- Pine Script Version: v6
- Chart Type: Overlay indicator
- Calculation Method: Uses `request.security()` for accurate HTF data with `lookahead_on` to prevent repainting
- Data Structures: Uses Pine v5 matrices and custom types for efficient level management
- Performance: Max 500 lines, 500 labels for historical level display
---
IMPORTANT NOTES
- Works best on intraday timeframes (15min to 4hour)
- Requires TradingView Premium/Pro for reliable multi-timeframe data
- Previous day data appears after the first bar of new day
- Custom session timing only affects Daily levels (Weekly/Monthly use standard calendar)
- Tables display only on last bar to maintain performance
---
LEARNING RESOURCES
This indicator is designed to help traders understand:
- Key support and resistance concepts
- Multi-timeframe analysis techniques
- Trend following with moving averages
- Momentum trading with Supertrend
- Professional chart setup and risk management
---
COPYRIGHT & TERMS
© 2025 CandleCodex™ - All Rights Reserved
Developer: Siddharth Sharma
License: Mozilla Public License 2.0 with additional restrictions
Allowed:
- Personal trading use
- Educational purposes
- Sharing with attribution
Prohibited:
- Commercial sale or resale
- Rebranding as your own work
- Removing copyright notices
- Claiming authorship
This indicator is FREE and will always remain FREE.
If someone is selling this, they are violating copyright.
---
SUPPORT & FEEDBACK
For questions, suggestions, or bug reports:
- Comment below this publication
- Follow CandleCodex™ for updates
- Check release notes for latest improvements
If you find this indicator useful, please Like ❤️ and leave a comment!
---
Disclaimer: This indicator is for educational purposes only. Trading involves risk. Past performance does not guarantee future results. Always practice proper risk management and consult with a financial advisor before trading.
版本注释
Support & Resistance Levels with Moving Averages & SupertrendOverview
This comprehensive indicator combines Multi Support/Resistance analysis, Moving Average, and Supertrend signals into one powerful tool. Designed for intraday/swing traders, it helps identify key price levels across Daily, Weekly, and Monthly while providing trend confirmation through MAs and Supertrend.
Product of: CandleCodex
License: Free for personal use | NOT FOR SALE
Version: 5.0 (Pine Script v6)
---
KEY FEATURES
Swing & Intraday Entry/Exit Setup V0.1 © CandleCodex™ (Daily/Weekly/Monthly)
- Previous Day High/Low (PDH/PDL) with customizable styling
- Previous Week High/Low (PWH/PWL) with independent settings
- Previous Month High/Low (PMH/PML) for swing traders
- Mid Levels - Adjustable percentage (default 50%) between high and low
- R1, R2, R3 - Projected resistance levels based on price range
- S1, S2, S3 - Projected support levels for breakout/breakdown targets
Moving Average
- 4 Fully Customizable MAs (20, 50, 100, 200 by default)
- Multiple MA Types: SMA, EMA, SMMA (RMA), WMA, VWMA
- Custom Source Selection: Close, Open, High, Low, HL2, HLC3, OHLC4
- Individual Colors & Toggle:** Show/hide each MA independently
Supertrend Indicator
- Buy/Sell Signals - Automatic labels on trend reversals
- Trend Highlighting - Background fill for bullish/bearish trends
- Customizable ATR Period & Multiplier (Default: 10, 3.0)
- Multiple Source Options: HL2, Close, Open, etc.
- Alert Conditions: Set alerts for buy/sell signals and trend changes
Information Tables
- 3 Separate Tables for Daily, Weekly, Monthly levels
- Adjustable Positions: 9 position options (top, middle, bottom - left, center, right)
- Custom Text Size: Tiny, Small, Normal, Large
- Live Price Display: Shows all levels with current prices
- Range Calculation: Displays trading range for each timeframe
Advanced Customization
- Line Styling: Width (1-5), Style (Solid/Dashed/Dotted), Color for EVERY level
- Label Options: Show/hide labels, show/hide prices, left/right positioning
- Historical Data: Display up to 50 previous periods
- Custom Session Timing: Set specific hours for daily levels (Indian market: 9:15-15:30)
- Copyright Watermark: Toggleable branding with position control
---
VISUAL CUSTOMIZATION
Every line (High, Low, Mid, R1-R3, S1-S3) has independent controls for:
- Color - Choose from full color palette with transparency
- Width - 1 to 5 pixels thickness
- Style - Solid, Dashed, or Dotted lines
- Show/Hide - Toggle individual levels on/off
Default Color Scheme:
- Daily: Green (High), Red (Low), Yellow (Mid)
- Weekly: Cyan (High), Magenta (Low), Light Green (Mid)
- Monthly: Orange (High), Purple (Low), Pink (Mid)
---
HOW TO USE
For Day Traders:
1. Enable Daily Levels - Focus on PDH/PDL as key intraday S/R zones
2. Watch for Breakouts - Price breaking PDH = bullish, breaking PDL = bearish
3. Use Mid Level - Acts as equilibrium; rejection zone for mean reversion
4. R/S Targets - Use R1, R2, R3 as profit targets above PDH; S1, S2, S3 below PDL
5. MA Confirmation - Enter trades in direction of MA trend
6. Supertrend Signals - Take BUY when price above Supertrend, SELL when below
For Swing Traders:
1. Enable Weekly/Monthly Levels - PWH/PWL and PMH/PML for bigger picture
2. Combine Timeframes - Strong rejection at PWL + Daily bullish Supertrend = long opportunity
3. Range Trading - Trade between PWH and PWL in consolidation
4. Breakout Confirmation - Use MA ribbon to confirm trend direction on HTF breakouts
Risk Management:
- Place Stop Loss just below PDL for longs, above PDH for shorts
- Targets: Use R1/S1 for scalping, R2/S2 for swing trades, R3/S3 for momentum trades
- Avoid Chop Zones: When price between MAs, wait for clear trend
---
SETTINGS GROUPS
1. ENABLE/DISABLE FEATURES - Master toggles for all components
2. DISPLAY SETTINGS - Labels, prices, positioning, historical periods
3. DAILY LEVELS STYLING - Complete customization for daily timeframe
4. WEEKLY LEVELS STYLING - Complete customization for weekly timeframe
5. MONTHLY LEVELS STYLING - Complete customization for monthly timeframe
6. MOVING AVERAGES - 4 independent MA configurations
7. SUPERTREND - ATR period, multiplier, signals, highlighting
8. TABLE SETTINGS - Position, size, colors for info tables
9. ADVANCED SETTINGS - Custom session timing, timezone
---
UNIQUE ADVANTAGES
All-in-One Solution - No need for multiple indicators cluttering your chart
Zero Lag - Calculates previous day/week/month data accurately without repainting
Full Control - Every visual element is customizable
Clean Interface - Organized settings with clear tooltips
Performance Optimized - Efficient code, no lag even with all features enabled
Indian Market Ready - Custom session timing (9:15 AM - 3:30 PM IST)
Free Forever - No subscriptions, no hidden costs
---
## 📖 TECHNICAL DETAILS
- Pine Script Version: v6
- Chart Type: Overlay indicator
- Calculation Method: Uses `request.security()` for accurate HTF data with `lookahead_on` to prevent repainting
- Data Structures: Uses Pine v5 matrices and custom types for efficient level management
- Performance: Max 500 lines, 500 labels for historical level display
---
IMPORTANT NOTES
- Works best on intraday timeframes (15min to 4hour)
- Requires TradingView Premium/Pro for reliable multi-timeframe data
- Previous day data appears after the first bar of new day
- Custom session timing only affects Daily levels (Weekly/Monthly use standard calendar)
- Tables display only on last bar to maintain performance
---
LEARNING RESOURCES
This indicator is designed to help traders understand:
- Key support and resistance concepts
- Multi-timeframe analysis techniques
- Trend following with moving averages
- Momentum trading with Supertrend
- Professional chart setup and risk management
---
COPYRIGHT & TERMS
© 2025 CandleCodex™ - All Rights Reserved
Developer: Siddharth Sharma
License: Mozilla Public License 2.0 with additional restrictions
Allowed:
- Personal trading use
- Educational purposes
- Sharing with attribution
Prohibited:
- Commercial sale or resale
- Rebranding as your own work
- Removing copyright notices
- Claiming authorship
This indicator is FREE and will always remain FREE.
If someone is selling this, they are violating copyright.
---
SUPPORT & FEEDBACK
For questions, suggestions, or bug reports:
- Comment below this publication
- Follow CandleCodex™ for updates
- Check release notes for latest improvements
If you find this indicator useful, please Like ❤️ and leave a comment!
---
Disclaimer: This indicator is for educational purposes only. Trading involves risk. Past performance does not guarantee future results. Always practice proper risk management and consult with a financial advisor before trading.
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。