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

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明