Zaktualizowano

[ad] Opens & Previous Day H/L

430
Opens & Previous Day H/L draws the reference levels many traders watch, directly on the chart:
• yOpen, mOpen, wOpen, dOpen: Yearly, Monthly, Weekly and Daily Open
• PDH, PDL: Previous Day High and Low
• Optional: PWH, PWL (Previous Week High/Low) and PMH, PML (Previous Month High/Low)

How it looks
Every level is a thin 1 px line that starts on the candle where its period opened (previous highs and lows start where the previous period began). A short label sits inside the line, so it reads like a gap in the line instead of a banner on top of the chart. Levels at the same price share one label, for example "wOpen / dOpen" on a Monday, and labels of nearby levels are moved apart horizontally so they do not cover each other.

How it works
The levels come from the higher timeframe via request.security() with lookahead_on and a [1] offset for previous highs and lows, so only values that are already final are used: an open is known as soon as its period starts, and a previous high or low comes from the last completed period. Nothing repaints. A level is hidden when its period is shorter than the chart timeframe, for example there are no daily levels on a weekly chart.

Settings
• Levels: switch each of the ten levels on or off.
• Lines: fixed distance (default 90 bars) or full width, line style, line width.
• Labels: text size (8 / 10 / 12), short or full names, optional price in brackets, label position, line cut behind the label, overlap avoidance.
• Colors: yOpen, mOpen, wOpen, dOpen, previous highs, previous lows.

Notes
• Day, week, month and year boundaries follow the symbol's own session and time zone (00:00 UTC on most crypto exchanges), so values differ between instruments, for example spot vs perpetual.
• The levels are reference prices, not trade signals or financial advice. The script has no alerts.
• Free and open source (Mozilla Public License 2.0).
Informacje o Wersji
Version 1.0.1
• Lines now start no earlier than the first loaded candle, so levels whose period began long ago (for example the Yearly Open on an intraday chart) are always drawn, even when little history is loaded.
• Labels of nearby levels are moved apart by at least 8 bars, so they no longer cover each other when only a few candles are visible.
• Refreshed the publication chart image.
Informacje o Wersji
Version 1.0.2
• Lines no longer start more than 50 bars before the left edge of the visible chart, so a level whose period began long ago (for example the Yearly Open on an intraday chart) is drawn reliably, including in the chart preview of this publication.
Informacje o Wersji
Version 1.0.3
• Line starts are now bar indexes of the chart instead of timestamps: each line begins on the bar where its period started, or on the first loaded bar when the period began earlier. This draws long-running levels such as the Yearly Open reliably on every timeframe and in the chart preview of this publication.
• Avoids TradingView's "too far from the current bar index" error on deep intraday history.
Informacje o Wersji
Version 1.0.4
• Lines never start on the first 3 bars of the loaded history. The chart preview of this publication did not draw a line that began exactly on the first loaded bar (the Yearly Open), although its label was shown.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.