OPEN-SOURCE SCRIPT
Last 2 Days Key Levels

Last 2 Days Key Levels
Overview
This indicator is designed for intraday traders who leverage key historical price levels to identify potential support and resistance zones. It cleanly plots the most important levels from the previous two trading days, giving you a clear map of the price action and helping you anticipate potential turning points in the market.
The core principle is that the market has memory. The highs, lows, and calculated pivot points from previous sessions often remain significant and can act as powerful magnets or barriers for price in the current session. This script gives you a configurable and visually clean way to track these critical zones.
Key Features
Multi-Day Level Plotting: Display key levels not just from the prior day (PD), but also from two days ago (PD2), allowing you to track a deeper level of market structure.
Comprehensive Key Levels: For each historical day, the indicator plots:
High
Low
Mid-Point (the direct halfway point of the day's range)
Central Pivot Point (the average of the high, low, and close)
Premarket High/Low: Includes the high and low from the current day's premarket session, which are critical levels for morning trading.
Full Customization: Every level is fully configurable. Through a cleanly organized input menu, you can:
Toggle the visibility of each individual line (e.g., show only the highs and lows).
Customize the color, line style (solid, dotted, dashed), and thickness for each group of levels (Prior Day, 2-Day Prior, Premarket).
The Strategic Advantage: Why Track 2-Day Prior Levels?
While many traders focus exclusively on the previous day's levels, tracking the levels from two days ago provides a distinct strategic edge, especially in the early morning session.
In the opening minutes of trading, or even in the premarket, price action is often volatile and searching for direction. The market will frequently test not just yesterday's levels, but also the key zones from the day before. These "older" levels are often overlooked by other market participants, making them powerful hidden support and resistance zones.
By having the 2-day prior levels on your chart, you can:
Anticipate early session turning points that others might not see.
Identify stronger confirmation when a 2-day level aligns with a prior-day or premarket level.
Avoid being caught off guard by reactions to seemingly "random" price points that are, in fact, significant historical levels.
How to Use
Support & Resistance: Use the plotted lines as potential areas where price may bounce or reverse. Look for price to respect these levels for potential entry or exit signals.
Breakout & Breakdown Zones: A clean break and hold above a resistance level (or below a support level) can signal the start of a new directional move.
Targeting: The levels can serve as logical price targets for your trades.
All settings are organized into clear groups in the "Inputs" tab, allowing you to easily configure the indicator to your exact preferences.
This script is based on the foundational concepts of the 'Daily Levels Suite' by FourC. It was generated and optimized with Gemini, by Mercadero.AI.
Overview
This indicator is designed for intraday traders who leverage key historical price levels to identify potential support and resistance zones. It cleanly plots the most important levels from the previous two trading days, giving you a clear map of the price action and helping you anticipate potential turning points in the market.
The core principle is that the market has memory. The highs, lows, and calculated pivot points from previous sessions often remain significant and can act as powerful magnets or barriers for price in the current session. This script gives you a configurable and visually clean way to track these critical zones.
Key Features
Multi-Day Level Plotting: Display key levels not just from the prior day (PD), but also from two days ago (PD2), allowing you to track a deeper level of market structure.
Comprehensive Key Levels: For each historical day, the indicator plots:
High
Low
Mid-Point (the direct halfway point of the day's range)
Central Pivot Point (the average of the high, low, and close)
Premarket High/Low: Includes the high and low from the current day's premarket session, which are critical levels for morning trading.
Full Customization: Every level is fully configurable. Through a cleanly organized input menu, you can:
Toggle the visibility of each individual line (e.g., show only the highs and lows).
Customize the color, line style (solid, dotted, dashed), and thickness for each group of levels (Prior Day, 2-Day Prior, Premarket).
The Strategic Advantage: Why Track 2-Day Prior Levels?
While many traders focus exclusively on the previous day's levels, tracking the levels from two days ago provides a distinct strategic edge, especially in the early morning session.
In the opening minutes of trading, or even in the premarket, price action is often volatile and searching for direction. The market will frequently test not just yesterday's levels, but also the key zones from the day before. These "older" levels are often overlooked by other market participants, making them powerful hidden support and resistance zones.
By having the 2-day prior levels on your chart, you can:
Anticipate early session turning points that others might not see.
Identify stronger confirmation when a 2-day level aligns with a prior-day or premarket level.
Avoid being caught off guard by reactions to seemingly "random" price points that are, in fact, significant historical levels.
How to Use
Support & Resistance: Use the plotted lines as potential areas where price may bounce or reverse. Look for price to respect these levels for potential entry or exit signals.
Breakout & Breakdown Zones: A clean break and hold above a resistance level (or below a support level) can signal the start of a new directional move.
Targeting: The levels can serve as logical price targets for your trades.
All settings are organized into clear groups in the "Inputs" tab, allowing you to easily configure the indicator to your exact preferences.
This script is based on the foundational concepts of the 'Daily Levels Suite' by FourC. It was generated and optimized with Gemini, by Mercadero.AI.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。