OPEN-SOURCE SCRIPT
Previous Day High & Low with Breakout Zones

📌 Script Summary: Previous Day High/Low with Breakout Zones and Alerts
This Pine Script plots the previous day’s high and low on intraday charts, and highlights when the current price breaks out of that range during regular trading hours.
✅ Key Features
• Previous Day High/Low Lines: Draws horizontal lines at the prior day’s high and low, updated daily.
• Time-Filtered Session (09:15–15:30 IST): All logic applies only during Indian market hours.
• Breakout Zone Highlighting:
• 🟩 Green background when price closes above previous high
• 🟥 Red background when price closes below previous low
• Dynamic Labels: Displays labeled levels each day on the chart.
• Alerts:
• 🔼 Triggered when price crosses above the previous day’s high.
• 🔽 Triggered when price crosses below the previous day’s low.
• Customizable Inputs:
• Enable/disable alerts
• Toggle breakout zone highlights
• Set label offset
⚙️ Optimized For
• Intraday timeframes (e.g., 5m, 15m, 1h)
• Trading during NSE/BSE market hours
• Breakout strategy traders and range watchers
This Pine Script plots the previous day’s high and low on intraday charts, and highlights when the current price breaks out of that range during regular trading hours.
✅ Key Features
• Previous Day High/Low Lines: Draws horizontal lines at the prior day’s high and low, updated daily.
• Time-Filtered Session (09:15–15:30 IST): All logic applies only during Indian market hours.
• Breakout Zone Highlighting:
• 🟩 Green background when price closes above previous high
• 🟥 Red background when price closes below previous low
• Dynamic Labels: Displays labeled levels each day on the chart.
• Alerts:
• 🔼 Triggered when price crosses above the previous day’s high.
• 🔽 Triggered when price crosses below the previous day’s low.
• Customizable Inputs:
• Enable/disable alerts
• Toggle breakout zone highlights
• Set label offset
⚙️ Optimized For
• Intraday timeframes (e.g., 5m, 15m, 1h)
• Trading during NSE/BSE market hours
• Breakout strategy traders and range watchers
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.