Purpose:
This script is designed to identify and plot untested support and resistance levels across multiple timeframes on a trading chart. It helps traders visualize potential price levels that have not yet been retested, which can be significant for making trading decisions.
How It Functions:
The script operates by analyzing price data across different timeframes and identifying the highest high and lowest low over a defined lookback period. These identified levels are then categorized as "untested" until the price revisits them, at which point they are marked as "tested."
Key Features:
Multi-Timeframe Analysis:
The script analyzes price levels on four different timeframes: 30 minutes, 1 hour, 4 hours, and 1 day (8 hours).
Lookback Periods:
Defines how many bars to look back to identify the highest high and lowest low for each timeframe:
30 minutes: 10 bars
1 hour: 24 bars
4 hours: 30 bars
1 day (8 hours): 21 bars
Maximum Lines:
Limits the number of untested levels (lines) plotted on the chart to avoid clutter:
30 minutes: 4 lines
1 hour: 4 lines
4 hours: 3 lines
1 day (8 hours): 2 lines
Color Coding:
Uses different colors for each timeframe to distinguish the levels:
30 minutes: Green
1 hour: Yellow
4 hours: Orange
1 day (8 hours): Red
Line Extension Options:
Allows the user to choose whether the lines extend to the right, left, or both using checkboxes:
extend_right: Checkbox to extend lines to the right.
extend_left: Checkbox to extend lines to the left.
How to Use the Indicator:
Add the Script to Your Chart:
In TradingView, add the script to your chart by pasting it into the Pine Script editor and clicking "Add to Chart."
Adjust Settings:
In the indicator settings, adjust the checkboxes to control how the lines extend:
Check "Extend Lines Right" to extend the lines to the right.
Check "Extend Lines Left" to extend the lines to the left.
Check both to extend lines in both directions.
Interpret the Lines:
The script will plot untested levels as colored lines based on the timeframe:
Green lines for 30-minute untested levels.
Yellow lines for 1-hour untested levels.
Orange lines for 4-hour untested levels.
Red lines for 1-day (8-hour) untested levels.
These lines represent potential support and resistance levels that have not been revisited since they were identified.
Trading Decisions:
Use the untested levels to make informed trading decisions. For example:
Entry Points: Consider entering trades when the price approaches an untested support or resistance level, anticipating a potential bounce or reversal.
Exit Points: Use the levels to set profit targets or stop-loss orders, as these levels may act as significant barriers.
Confirmation: Combine the levels with other technical indicators or patterns to confirm trade signals.
Example Use Case:
Trend Reversal:
Identify a trend reversal when the price approaches an untested resistance level in a downtrend or an untested support level in an uptrend.
Enter a trade in the direction of the reversal, using the untested level as a reference point for setting your stop-loss.
Breakout Trading:
Watch for breakouts when the price breaches an untested level with high volume.
Enter a trade in the direction of the breakout, using the untested level as a reference point for setting your stop-loss or trailing stop.
Range Trading:
Identify potential trading ranges between untested support and resistance levels.
Enter trades near the support level and exit near the resistance level, or vice versa.