OPEN-SOURCE SCRIPT
Aggiornato

YH / YL / YC (Live) - Improved

243
This is an enhanced version of the original **“YH / YL / YC (Live)”** script by **Ilse Filippo** (`Ilse_Filippo` on TradingView).

The indicator automatically plots the previous completed trading session’s:

* **YH** — Yesterday High
* **YL** — Yesterday Low
* **YC** — Yesterday Close

It supports stocks, ADRs, ETFs, indices, futures, forex, and metals.

### Improvements in v1.2

* Migrated to **Pine Script v6**
* Added weekend-aware handling so **Friday’s YH / YL / YC are already available on Saturday and Sunday**
* Friday remains the reference while Monday’s session is still active
* Replaced the original manual stock RTH tracking with TradingView’s native **regular-session data**
* Fixed missing **YH / YL** levels on stock charts
* Stocks, ADRs, and ETFs now use their exchange-defined regular trading session
* Preserved the original line and label presentation

### Credits

Original script: **YH / YL / YC (Live)**
Original author: **Ilse Filippo**
TradingView: **Ilse_Filippo**

This modified version retains the open-source distribution model of the original script.
Note di rilascio
// REVISION HISTORY
// v1.1 - 2026-08-23
// - Migrated to Pine Script v6.
// - Added completed-daily-bar detection for weekend handling.
// - Preserved the original stock RTH handling and drawing logic.
//
// v1.2 - 2026-09-26
// - Corrected the weekend/closed-session daily-source logic for indices/futures.
// - Current daily OHLC is requested with lookahead_on, while time_close/timenow
// explicitly gates whether the current daily bar is allowed to become YH/YL/YC.
// - During an active daily session, YH/YL/YC still use the previous completed day.
// - After the daily session closes, the just-completed day becomes the reference,
// so Friday remains visible on Saturday/Sunday and into Monday before Monday closes.
// - Updated default YH/YL/YC colors to the user's current chart defaults.
// - No changes to stock RTH tracking, line placement, or label placement.
//
// v1.3 - 2026-09-26
// - Added optional price display to YH / YL / YC labels.
// - Added "Show Price in Labels" configuration option.
// - Label format uses one space between level name and price.
// - Prices below 10,000 are displayed with maximum 1 decimal.
// - Prices at or above 10,000 are rounded to integer.
// - Increased default label offset from 15 to 45 bars.
// - No changes to YH/YL/YC source logic, weekend handling, or line placement.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.