OPEN-SOURCE SCRIPT

Prior Day/Week Levels Indicator

Key Features:

Prior Day and Week Levels:
The indicator retrieves and displays the high and low prices from the previous trading day and week.
It uses request.security to fetch these levels, ensuring accuracy regardless of the current time frame being viewed.
Visual Representation:
Lines:
The prior day and week high/low levels are represented by horizontal lines that extend back to the bar where the level was formed. This makes it easy to identify key support and resistance zones.
Labels:
Labels are added to the chart to indicate the prior day high (PDH), prior day low (PDL), prior week high (PWH), and prior week low (PWL) for quick reference.
Premium and Discount Zones:
The indicator identifies whether the current price is above the prior day/week high (premium) or below the prior day/week low (discount).
Shading is applied to visually represent these zones:
Premium Zone: When the price is above the prior high, shaded in a transparent red color.
Discount Zone: When the price is below the prior low, shaded in a transparent green color.
Dynamic Status Table:
A status table is displayed in the top right corner of the chart, indicating the current trading status (Premium, Discount, or Neutral) for both the day and week levels. This allows traders to quickly assess market conditions at a glance.
Customizable Inputs:
Users can toggle the visibility of prior day and week levels through input options, allowing for a personalized trading experience.
Usage: This indicator is useful for day traders and swing traders looking to identify potential support and resistance levels based on historical price action. It helps traders make informed decisions by understanding market context and evaluating current price relative to prior day and week levels.
Candlestick analysisChart patternsCyclesictictconceptsinnercircletraderPO3premiumdiscountSMT

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad