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

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian