OPEN-SOURCE SCRIPT
Timeframe Resistance Evaluation And Detection - CoffeeKiller

TREAD - Timeframe Resistance Evaluation And Detection Guide
🔔 Important Technical Limitation 🔔
**This indicator does NOT fetch true higher timeframe data.** Instead, it simulates higher timeframe levels by aggregating data from your current chart timeframe. This means:
- Results will vary depending on what chart timeframe you're viewing
- Levels may not match actual higher timeframe candle highs/lows
- You might miss important wicks or gaps that occurred between chart timeframe bars
- **Always verify levels against actual higher timeframe charts before trading**
Welcome traders! This guide will walk you through the TREAD (Timeframe Resistance Evaluation And Detection) indicator, a multi-timeframe analysis tool developed by CoffeeKiller that identifies support and resistance confluence across different time periods.(I am 50+ year old trader and always thought I was bad a teaching and explaining so you get a AI guide. I personally use this on the 5 minute chart with the default settings, but to each there own and if you can improve the trend detection methods please DM me. I would like to see the code. Thanks)
Core Components
1. Dual Timeframe Level Tracking
- Short Timeframe Levels: Tracks opening price extremes within shorter periods
- Long Timeframe Levels: Tracks actual high/low extremes within longer periods
- Dynamic Reset Mechanism: Levels reset at the start of each new timeframe period
- Momentum Detection: Identifies when levels change mid-period, indicating active price movement
2. Visual Zone System
- High Zones: Areas between long timeframe highs and short timeframe highs
- Low Zones: Areas between long timeframe lows and short timeframe lows
- Fill Coloring: Dynamic colors based on whether levels are static or actively changing
- Momentum Highlighting: Special colors when levels break during active periods
3. Customizable Display Options
- Multiple Plot Styles: Line, circles, or cross markers
- Flexible Timeframe Selection: Wide range of short and long timeframe combinations
- Color Customization: Separate colors for each level type and momentum state
- Toggle Controls: Show/hide different elements based on trading preference
Main Features
Timeframe Settings
- Short Timeframe Options: 15m, 30m, 1h, 2h, 4h
- Long Timeframe Options: 1h, 2h, 4h, 8h, 12h, 1D, 1W
- Recommended Combinations:
- Scalping: 15m/1h or 30m/2h
- Day Trading: 30m/4h or 1h/4h
- Swing Trading: 4h/1D or 1D/1W
Display Configuration
- Level Visibility: Toggle short/long timeframe levels independently
- Fill Zone Control: Enable/disable colored zones between levels
- Momentum Fills: Special highlighting for actively changing levels
- Line Customization: Width, style, and color options for all elements
Color System
- Short TF High: Default red for resistance levels
- Short TF Low: Default green for support levels
- Long TF High: Transparent red for broader resistance context
- Long TF Low: Transparent green for broader support context
- Momentum Colors: Brighter colors when levels are actively changing
Technical Implementation Details
How Level Tracking Works
The indicator uses a custom tracking function that:
1. Detects Timeframe Periods: Uses `time()` function to identify when new periods begin
2. Tracks Extremes: Monitors highest/lowest values within each period
3. Resets on New Periods: Clears tracking when timeframe periods change
4. Updates Mid-Period: Continues tracking if new extremes are reached
The Timeframe Limitation Explained
`pinescript
// What the indicator does:
short_tf_start = ta.change(time(short_timeframe)) != 0 // Detects 30m period start
[short_high, _, _] = track_highest(open, short_tf_start) // BUT uses chart TF opens!
// What true multi-timeframe would be:
// short_tf_high = request.security(syminfo.tickerid, short_timeframe, high)
`
This means:
- On a 5m chart with 30m/4h settings: Tracks 5m bar opens during 30m and 4h windows
- On a 1m chart with same settings: Tracks 1m bar opens during 30m and 4h windows
- Results will be different between chart timeframes
- May miss important price action that occurred between your chart's bars
Visual Elements
1. Level Lines
- Short TF High: Upper resistance line from shorter timeframe analysis
- Short TF Low: Lower support line from shorter timeframe analysis
- Long TF High: Broader resistance context from longer timeframe
- Long TF Low: Broader support context from longer timeframe
2. Zone Fills
- High Zone: Area between long TF high and short TF high (potential resistance cluster)
- Low Zone: Area between long TF low and short TF low (potential support cluster)
- Regular Fill: Standard transparency when levels are static
- Momentum Fill: Enhanced visibility when levels are actively changing
3. Dynamic Coloring
- Static Periods: Normal colors when levels haven't changed recently
- Active Periods: Momentum colors when levels are being tested/broken
- Confluence Zones: Different intensities based on timeframe alignment
Trading Applications
1. Support/Resistance Trading
- Entry Points: Trade bounces from zone boundaries
- Confluence Areas: Focus on areas where short and long TF levels cluster
- Zone Breaks: Enter on confirmed breaks through entire zones
- Multiple Timeframe Confirmation: Stronger signals when both timeframes align
2. Range Trading
- Zone Boundaries: Use fill zones as range extremes
- Mean Reversion: Trade back toward opposite zone when price reaches extremes
- Breakout Preparation: Watch for momentum color changes indicating potential breakouts
- Risk Management: Place stops outside the opposite zone
3. Trend Following
- Direction Bias: Trade in direction of zone breaks
- Pullback Entries: Enter on pullbacks to broken zones (now support/resistance)
- Momentum Confirmation: Use momentum coloring to confirm trend strength
- Multiple Timeframe Alignment: Strongest trends when both timeframes agree
4. Scalping Applications
- Quick Bounces: Trade rapid moves between zone boundaries
- Momentum Signals: Enter when momentum colors appear
- Short-Term Targets: Use opposite zone as profit target
- Tight Stops: Place stops just outside current zone
Optimization Guide
1. Timeframe Selection
For Different Trading Styles:
- Scalping: 15m/1h - Quick levels, frequent updates
- Day Trading: 30m/4h - Balanced view, good for intraday moves
- Swing Trading: 4h/1D - Longer-term perspective, fewer false signals
- Position Trading: 1D/1W - Major structural levels
2. Chart Timeframe Considerations
**Important**: Your chart timeframe affects results
- Lower Chart TF: More granular level tracking, but may be noisy
- Higher Chart TF: Smoother levels, but may miss important price action
- Recommended: Use chart timeframe 2-4x smaller than short indicator timeframe
3. Display Settings
- Busy Charts: Disable fills, show only key levels
- Clean Analysis: Enable all fills and momentum coloring
- Multi-Monitor Setup: Use different color schemes for easy identification
- Mobile Trading: Increase line width for visibility
Best Practices
1. Level Verification
- Always Cross-Check: Verify levels against actual higher timeframe charts
- Multiple Timeframes: Check 2-3 different chart timeframes for consistency
- Price Action Confirmation: Wait for candlestick confirmation at levels
- Volume Analysis: Combine with volume for stronger confirmation
2. Risk Management
- Stop Placement: Use zones rather than exact prices for stops
- Position Sizing: Reduce size when zones are narrow (higher risk)
- Multiple Targets: Scale out at different zone boundaries
- False Break Protection: Allow for minor zone penetrations
3. Signal Quality Assessment
- Momentum Colors: Higher probability when momentum coloring appears
- Zone Width: Wider zones often provide stronger support/resistance
- Historical Testing: Backtest on your preferred timeframe combinations
- Market Conditions: Adjust sensitivity based on volatility
Advanced Features
1. Momentum Detection System
The indicator tracks when levels change mid-period:
`pinescript
short_high_changed = short_high != short_high[1] and not short_tf_start
`
This identifies:
- Active level testing
- Potential breakout situations
- Increased market volatility
- Trend acceleration points
2. Dynamic Color System
Complex conditional logic determines fill colors:
- Static Zones: Regular transparency for stable levels
- Active Zones: Enhanced colors for changing levels
- Mixed States: Different combinations based on user preferences
- Custom Overrides: User can prioritize certain color schemes
3. Zone Interaction Analysis
- Convergence: When short and long TF levels approach each other
- Divergence: When timeframes show conflicting levels
- Alignment: When both timeframes agree on direction
- Transition: When one timeframe changes while other remains static
Common Issues and Solutions
1. Inconsistent Levels
Problem: Levels look different on various chart timeframes
Solution: Always verify against actual higher timeframe charts
2. Missing Price Action
Problem: Important wicks or gaps not reflected in levels
Solution: Use chart timeframe closer to indicator's short timeframe setting
3. Too Many Signals
Problem: Excessive level changes and momentum alerts
Solution: Increase timeframe settings or reduce chart timeframe granularity
4. Lagging Signals
Problem: Levels seem to update too slowly
Solution: Decrease chart timeframe or use more sensitive timeframe combinations
Recommended Setups
Conservative Approach
- Timeframes: 4h/1D
- Chart: 1h
- Display: Show fills only, no momentum coloring
- Use: Swing trading, position management
Aggressive Approach
- Timeframes: 15m/1h
- Chart: 5m
- Display: All features enabled, momentum highlighting
- Use: Scalping, quick reversal trades
Balanced Approach
- Timeframes: 30m/4h
- Chart: 15m
- Display: Selective fills, momentum on key levels
- Use: Day trading, multi-session analysis
Final Notes
**Remember**: This indicator provides a synthetic view of multi-timeframe levels, not true higher timeframe data. While useful for identifying potential confluence areas, always verify important levels by checking actual higher timeframe charts.
**Best Results When**:
- Combined with actual multi-timeframe analysis
- Used for confluence confirmation rather than primary signals
- Applied with proper risk management
- Verified against price action and volume
**DISCLAIMER**: This indicator and its signals are intended solely for educational and informational purposes. The timeframe limitation means results may not reflect true higher timeframe levels. Always conduct your own analysis and verify levels independently before making trading decisions. Trading involves significant risk of loss.
🔔 Important Technical Limitation 🔔
**This indicator does NOT fetch true higher timeframe data.** Instead, it simulates higher timeframe levels by aggregating data from your current chart timeframe. This means:
- Results will vary depending on what chart timeframe you're viewing
- Levels may not match actual higher timeframe candle highs/lows
- You might miss important wicks or gaps that occurred between chart timeframe bars
- **Always verify levels against actual higher timeframe charts before trading**
Welcome traders! This guide will walk you through the TREAD (Timeframe Resistance Evaluation And Detection) indicator, a multi-timeframe analysis tool developed by CoffeeKiller that identifies support and resistance confluence across different time periods.(I am 50+ year old trader and always thought I was bad a teaching and explaining so you get a AI guide. I personally use this on the 5 minute chart with the default settings, but to each there own and if you can improve the trend detection methods please DM me. I would like to see the code. Thanks)
Core Components
1. Dual Timeframe Level Tracking
- Short Timeframe Levels: Tracks opening price extremes within shorter periods
- Long Timeframe Levels: Tracks actual high/low extremes within longer periods
- Dynamic Reset Mechanism: Levels reset at the start of each new timeframe period
- Momentum Detection: Identifies when levels change mid-period, indicating active price movement
2. Visual Zone System
- High Zones: Areas between long timeframe highs and short timeframe highs
- Low Zones: Areas between long timeframe lows and short timeframe lows
- Fill Coloring: Dynamic colors based on whether levels are static or actively changing
- Momentum Highlighting: Special colors when levels break during active periods
3. Customizable Display Options
- Multiple Plot Styles: Line, circles, or cross markers
- Flexible Timeframe Selection: Wide range of short and long timeframe combinations
- Color Customization: Separate colors for each level type and momentum state
- Toggle Controls: Show/hide different elements based on trading preference
Main Features
Timeframe Settings
- Short Timeframe Options: 15m, 30m, 1h, 2h, 4h
- Long Timeframe Options: 1h, 2h, 4h, 8h, 12h, 1D, 1W
- Recommended Combinations:
- Scalping: 15m/1h or 30m/2h
- Day Trading: 30m/4h or 1h/4h
- Swing Trading: 4h/1D or 1D/1W
Display Configuration
- Level Visibility: Toggle short/long timeframe levels independently
- Fill Zone Control: Enable/disable colored zones between levels
- Momentum Fills: Special highlighting for actively changing levels
- Line Customization: Width, style, and color options for all elements
Color System
- Short TF High: Default red for resistance levels
- Short TF Low: Default green for support levels
- Long TF High: Transparent red for broader resistance context
- Long TF Low: Transparent green for broader support context
- Momentum Colors: Brighter colors when levels are actively changing
Technical Implementation Details
How Level Tracking Works
The indicator uses a custom tracking function that:
1. Detects Timeframe Periods: Uses `time()` function to identify when new periods begin
2. Tracks Extremes: Monitors highest/lowest values within each period
3. Resets on New Periods: Clears tracking when timeframe periods change
4. Updates Mid-Period: Continues tracking if new extremes are reached
The Timeframe Limitation Explained
`pinescript
// What the indicator does:
short_tf_start = ta.change(time(short_timeframe)) != 0 // Detects 30m period start
[short_high, _, _] = track_highest(open, short_tf_start) // BUT uses chart TF opens!
// What true multi-timeframe would be:
// short_tf_high = request.security(syminfo.tickerid, short_timeframe, high)
`
This means:
- On a 5m chart with 30m/4h settings: Tracks 5m bar opens during 30m and 4h windows
- On a 1m chart with same settings: Tracks 1m bar opens during 30m and 4h windows
- Results will be different between chart timeframes
- May miss important price action that occurred between your chart's bars
Visual Elements
1. Level Lines
- Short TF High: Upper resistance line from shorter timeframe analysis
- Short TF Low: Lower support line from shorter timeframe analysis
- Long TF High: Broader resistance context from longer timeframe
- Long TF Low: Broader support context from longer timeframe
2. Zone Fills
- High Zone: Area between long TF high and short TF high (potential resistance cluster)
- Low Zone: Area between long TF low and short TF low (potential support cluster)
- Regular Fill: Standard transparency when levels are static
- Momentum Fill: Enhanced visibility when levels are actively changing
3. Dynamic Coloring
- Static Periods: Normal colors when levels haven't changed recently
- Active Periods: Momentum colors when levels are being tested/broken
- Confluence Zones: Different intensities based on timeframe alignment
Trading Applications
1. Support/Resistance Trading
- Entry Points: Trade bounces from zone boundaries
- Confluence Areas: Focus on areas where short and long TF levels cluster
- Zone Breaks: Enter on confirmed breaks through entire zones
- Multiple Timeframe Confirmation: Stronger signals when both timeframes align
2. Range Trading
- Zone Boundaries: Use fill zones as range extremes
- Mean Reversion: Trade back toward opposite zone when price reaches extremes
- Breakout Preparation: Watch for momentum color changes indicating potential breakouts
- Risk Management: Place stops outside the opposite zone
3. Trend Following
- Direction Bias: Trade in direction of zone breaks
- Pullback Entries: Enter on pullbacks to broken zones (now support/resistance)
- Momentum Confirmation: Use momentum coloring to confirm trend strength
- Multiple Timeframe Alignment: Strongest trends when both timeframes agree
4. Scalping Applications
- Quick Bounces: Trade rapid moves between zone boundaries
- Momentum Signals: Enter when momentum colors appear
- Short-Term Targets: Use opposite zone as profit target
- Tight Stops: Place stops just outside current zone
Optimization Guide
1. Timeframe Selection
For Different Trading Styles:
- Scalping: 15m/1h - Quick levels, frequent updates
- Day Trading: 30m/4h - Balanced view, good for intraday moves
- Swing Trading: 4h/1D - Longer-term perspective, fewer false signals
- Position Trading: 1D/1W - Major structural levels
2. Chart Timeframe Considerations
**Important**: Your chart timeframe affects results
- Lower Chart TF: More granular level tracking, but may be noisy
- Higher Chart TF: Smoother levels, but may miss important price action
- Recommended: Use chart timeframe 2-4x smaller than short indicator timeframe
3. Display Settings
- Busy Charts: Disable fills, show only key levels
- Clean Analysis: Enable all fills and momentum coloring
- Multi-Monitor Setup: Use different color schemes for easy identification
- Mobile Trading: Increase line width for visibility
Best Practices
1. Level Verification
- Always Cross-Check: Verify levels against actual higher timeframe charts
- Multiple Timeframes: Check 2-3 different chart timeframes for consistency
- Price Action Confirmation: Wait for candlestick confirmation at levels
- Volume Analysis: Combine with volume for stronger confirmation
2. Risk Management
- Stop Placement: Use zones rather than exact prices for stops
- Position Sizing: Reduce size when zones are narrow (higher risk)
- Multiple Targets: Scale out at different zone boundaries
- False Break Protection: Allow for minor zone penetrations
3. Signal Quality Assessment
- Momentum Colors: Higher probability when momentum coloring appears
- Zone Width: Wider zones often provide stronger support/resistance
- Historical Testing: Backtest on your preferred timeframe combinations
- Market Conditions: Adjust sensitivity based on volatility
Advanced Features
1. Momentum Detection System
The indicator tracks when levels change mid-period:
`pinescript
short_high_changed = short_high != short_high[1] and not short_tf_start
`
This identifies:
- Active level testing
- Potential breakout situations
- Increased market volatility
- Trend acceleration points
2. Dynamic Color System
Complex conditional logic determines fill colors:
- Static Zones: Regular transparency for stable levels
- Active Zones: Enhanced colors for changing levels
- Mixed States: Different combinations based on user preferences
- Custom Overrides: User can prioritize certain color schemes
3. Zone Interaction Analysis
- Convergence: When short and long TF levels approach each other
- Divergence: When timeframes show conflicting levels
- Alignment: When both timeframes agree on direction
- Transition: When one timeframe changes while other remains static
Common Issues and Solutions
1. Inconsistent Levels
Problem: Levels look different on various chart timeframes
Solution: Always verify against actual higher timeframe charts
2. Missing Price Action
Problem: Important wicks or gaps not reflected in levels
Solution: Use chart timeframe closer to indicator's short timeframe setting
3. Too Many Signals
Problem: Excessive level changes and momentum alerts
Solution: Increase timeframe settings or reduce chart timeframe granularity
4. Lagging Signals
Problem: Levels seem to update too slowly
Solution: Decrease chart timeframe or use more sensitive timeframe combinations
Recommended Setups
Conservative Approach
- Timeframes: 4h/1D
- Chart: 1h
- Display: Show fills only, no momentum coloring
- Use: Swing trading, position management
Aggressive Approach
- Timeframes: 15m/1h
- Chart: 5m
- Display: All features enabled, momentum highlighting
- Use: Scalping, quick reversal trades
Balanced Approach
- Timeframes: 30m/4h
- Chart: 15m
- Display: Selective fills, momentum on key levels
- Use: Day trading, multi-session analysis
Final Notes
**Remember**: This indicator provides a synthetic view of multi-timeframe levels, not true higher timeframe data. While useful for identifying potential confluence areas, always verify important levels by checking actual higher timeframe charts.
**Best Results When**:
- Combined with actual multi-timeframe analysis
- Used for confluence confirmation rather than primary signals
- Applied with proper risk management
- Verified against price action and volume
**DISCLAIMER**: This indicator and its signals are intended solely for educational and informational purposes. The timeframe limitation means results may not reflect true higher timeframe levels. Always conduct your own analysis and verify levels independently before making trading decisions. Trading involves significant risk of loss.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.