Zaktualizowano
LDO-2day v1.2

LDO-2day plots the high-low range of the last two completed days as two boxes that leap-frog each other.
WHAT IT DOES
Each completed day gets a box spanning that day's high and low. The box starts at the day's open and extends 48 hours forward, so it covers its own day and projects across the following day. Only two boxes are ever on the chart. When a day closes, the older box is removed and the day that has just finished takes its place. The two boxes alternate colour so you can tell them apart, and each carries a small label with the day it represents.
WHY TWO OVERLAPPING BOXES
Most daily-level tools draw yesterday's high and low as two lines that reset every day. LDO-2day keeps the last two daily ranges on screen as overlapping zones, each projected 48 hours from its own open. That shows at a glance whether price is trading inside both ranges (balance), has broken out of one but not the other, or is clear of both. Because each new box is drawn from its own day's open, it already extends a full day past the current bar when it appears, so the levels are in place before price reaches them.
HOW IT WORKS
- A day is the symbol's daily session as TradingView defines it (00:00 UTC for most crypto pairs).
- The script tracks each day's running high and low bar by bar.
- On the first bar of a new day it draws the finished day's box, from that day's open to the open plus 48 hours (configurable), and deletes the older of the two boxes on the chart.
- Boxes are only drawn for completed days, so a box never changes once it is on the chart.
HOW TO USE IT
Use it on intraday charts such as 15m, 1h or 4h. Watch how price behaves at the box edges: a sweep of a box high or low followed by a close back inside, or a retest of a broken edge from the other side. The boxes are reference levels, not signals. Combine them with your own entry and risk rules.
SETTINGS
Boxes: box length in hours (default 48), fill and line colour for box A and box B, shade box background on or off, line width, line style.
Day label: show or hide, colour, size.
LIMITATIONS
- Intraday charts only. On daily or higher timeframes the script shows an error message.
- Use timeframes that divide evenly into a day (for example 1h, 2h, 4h). With uneven bars a bar can straddle midnight, and its range is then counted in the wrong day.
- The 48-hour length is clock time. On markets that close at weekends, a Friday box extends into the weekend gap.
- The day boundary follows the exchange session, which may differ from your local time.
Original idea for the leap-frogging two-day boxes: Anton.
WHAT IT DOES
Each completed day gets a box spanning that day's high and low. The box starts at the day's open and extends 48 hours forward, so it covers its own day and projects across the following day. Only two boxes are ever on the chart. When a day closes, the older box is removed and the day that has just finished takes its place. The two boxes alternate colour so you can tell them apart, and each carries a small label with the day it represents.
WHY TWO OVERLAPPING BOXES
Most daily-level tools draw yesterday's high and low as two lines that reset every day. LDO-2day keeps the last two daily ranges on screen as overlapping zones, each projected 48 hours from its own open. That shows at a glance whether price is trading inside both ranges (balance), has broken out of one but not the other, or is clear of both. Because each new box is drawn from its own day's open, it already extends a full day past the current bar when it appears, so the levels are in place before price reaches them.
HOW IT WORKS
- A day is the symbol's daily session as TradingView defines it (00:00 UTC for most crypto pairs).
- The script tracks each day's running high and low bar by bar.
- On the first bar of a new day it draws the finished day's box, from that day's open to the open plus 48 hours (configurable), and deletes the older of the two boxes on the chart.
- Boxes are only drawn for completed days, so a box never changes once it is on the chart.
HOW TO USE IT
Use it on intraday charts such as 15m, 1h or 4h. Watch how price behaves at the box edges: a sweep of a box high or low followed by a close back inside, or a retest of a broken edge from the other side. The boxes are reference levels, not signals. Combine them with your own entry and risk rules.
SETTINGS
Boxes: box length in hours (default 48), fill and line colour for box A and box B, shade box background on or off, line width, line style.
Day label: show or hide, colour, size.
LIMITATIONS
- Intraday charts only. On daily or higher timeframes the script shows an error message.
- Use timeframes that divide evenly into a day (for example 1h, 2h, 4h). With uneven bars a bar can straddle midnight, and its range is then counted in the wrong day.
- The 48-hour length is clock time. On markets that close at weekends, a Friday box extends into the weekend gap.
- The day boundary follows the exchange session, which may differ from your local time.
Original idea for the leap-frogging two-day boxes: Anton.
Informacje o Wersji
LDO-2day Quick GuideTwo kinds of boxes on any intraday chart: the last two daily ranges, and the first hour of the Asia session. It also sends an alert when price breaks out of the Asia box.
What you see
Two-day boxes
Green and blue
The high and low of the last two completed days. Each box starts at its day's open and runs 48 hours. When a day closes (00:00 UTC for crypto), the older box is replaced by the day that just finished, so the two leap-frog each other.
Asia box
Outline only
The high and low of the first hour after the Tokyo open, 09:00–10:00 Tokyo. It grows candle by candle until the next Asia open, then stops and a new one starts.
When the Asia hour is on your chart: Tokyo's 09:00 is always 00:00–01:00 UTC. On a UTC+2 chart that's 02:00–03:00 now, and 01:00–02:00 once European clocks go back on 25 Oct. Japan doesn't change its clocks, so the box follows the real Tokyo open on its own.
Install
Open the Pine Editor at the bottom of TradingView and create a new indicator.
Select everything in it, paste the code from the bottom of this page, and Save.
Click Add to chart. The legend should read LDO-2day v2.1.
Use an intraday chart: 1m to 4h. On daily or higher it shows an error message.
Settings
Setting What it does
Two-day boxes
Show two-day boxes On or off.
Box length (hours) How far each box runs from its day's open. Default 48.
Box A / Box B Fill and line colour of the two alternating boxes.
Shade box background Untick for outlines only.
Line width / style Thickness 1–5; solid, dashed or dotted.
Day labels Show the day name in each box; colour and size.
Asia first-hour box
Show Asia box On or off.
Colour / thickness Outline colour and line thickness 1–5.
Show 'Asia 1st H' text Untick to show just the box.
Show previous sessions Tick, then type how many: 1 to 365. Old boxes only reach as far back as the chart's loaded history.
Your time zone UTC-12 to UTC+14 in half-hour steps. It only sets the times written in the alerts; it doesn't move the box. TradingView can't read your computer's clock, so pick it here.
Alerts
An alert fires when a candle closes above the top or below the bottom of the latest Asia box. Each side alerts once per box.
Open the chart you want to watch, with LDO-2day on it.
Create alert (the clock icon, or Alt+A) → Condition: LDO-2day → Any alert() function call.
Pick how you want to be told (app, pop-up, email) and click Create. One alert covers both top and bottom.
What an alert looks like
PUMPUSDT.P 60: Asia 1st H broke out the TOP at 0.006336, 04:00 04 Oct (UTC+1) (box top 0.006321)
An alert is tied to one symbol and timeframe, so set one on each chart you want watched. Alerts keep the settings the indicator had when you created them; recreate the alert if you change the time zone.
Informacje o Wersji
Yo can now set the time manually for the Asia session. Informacje o Wersji
Updated alertsInformacje o Wersji
The three changes in it:Alert text: just the line touched, e.g. Asia top or Sun bottom.
Several lines on one candle: sent as one alert, e.g. Sun bottom, Asia top.
Time zone setting: its help text no longer mentions alert times, since the alerts don't show a time any more.
Informacje o Wersji
No description in alertsWyłą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.
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.