OPEN-SOURCE SCRIPT
Weekend Background Highlighter (UTC+12)

## Weekend Background Highlighter (UTC+12)
### Description
This indicator automatically highlights weekend periods on your TradingView charts specifically for the UTC+12 timezone (New Zealand Standard Time). Perfect for traders who need to visualize market closures and weekend gaps in the New Zealand/Pacific time zone, regardless of their exchange's native timezone or chart settings.
### Key Features
- **Fixed UTC+12 Timezone**: Hardcoded to always show weekends according to UTC+12, independent of exchange or chart timezone settings
- **Customizable Appearance**: Adjust background color and opacity to match your chart theme
- **Optional Weekend Labels**: Mark the beginning of each weekend period with customizable labels
- **Debug Mode**: View real-time timezone calculations to verify correct weekend detection
- **Lightweight**: Minimal performance impact with efficient calculations
### Use Cases
- **Forex Traders**: Identify weekend gaps and Monday openings in NZD pairs
- **Cryptocurrency Traders**: Visualize weekend trading patterns in the Pacific timezone
- **Multi-Market Traders**: Maintain consistent weekend awareness across different exchanges
- **Risk Management**: Clearly see when markets are closed for position management
### Settings
- **Weekend Background Color**: Choose any color for the weekend highlight
- **Opacity**: Control transparency (0-100%) to maintain chart visibility
- **Show Weekend Labels**: Toggle labels marking weekend start
- **Debug Info**: Display timezone calculations for verification
### How It Works
The indicator calculates the current UTC time and adds 12 hours to determine the UTC+12 time. It then checks if the resulting day falls on Saturday or Sunday, highlighting these periods on your chart. This ensures weekends are always displayed according to New Zealand time, regardless of your broker's timezone or your local settings.
### Notes
- Weekends begin at 00:00 Saturday UTC+12 (12:00 Friday UTC)
- Weekends end at 00:00 Monday UTC+12 (12:00 Sunday UTC)
- Works on all timeframes and markets
- Compatible with Pine Script v6
### Tags
weekend, background, timezone, UTC+12, New Zealand, highlight, trading sessions, forex, crypto, time zones, market hours, pacific time
### Description
This indicator automatically highlights weekend periods on your TradingView charts specifically for the UTC+12 timezone (New Zealand Standard Time). Perfect for traders who need to visualize market closures and weekend gaps in the New Zealand/Pacific time zone, regardless of their exchange's native timezone or chart settings.
### Key Features
- **Fixed UTC+12 Timezone**: Hardcoded to always show weekends according to UTC+12, independent of exchange or chart timezone settings
- **Customizable Appearance**: Adjust background color and opacity to match your chart theme
- **Optional Weekend Labels**: Mark the beginning of each weekend period with customizable labels
- **Debug Mode**: View real-time timezone calculations to verify correct weekend detection
- **Lightweight**: Minimal performance impact with efficient calculations
### Use Cases
- **Forex Traders**: Identify weekend gaps and Monday openings in NZD pairs
- **Cryptocurrency Traders**: Visualize weekend trading patterns in the Pacific timezone
- **Multi-Market Traders**: Maintain consistent weekend awareness across different exchanges
- **Risk Management**: Clearly see when markets are closed for position management
### Settings
- **Weekend Background Color**: Choose any color for the weekend highlight
- **Opacity**: Control transparency (0-100%) to maintain chart visibility
- **Show Weekend Labels**: Toggle labels marking weekend start
- **Debug Info**: Display timezone calculations for verification
### How It Works
The indicator calculates the current UTC time and adds 12 hours to determine the UTC+12 time. It then checks if the resulting day falls on Saturday or Sunday, highlighting these periods on your chart. This ensures weekends are always displayed according to New Zealand time, regardless of your broker's timezone or your local settings.
### Notes
- Weekends begin at 00:00 Saturday UTC+12 (12:00 Friday UTC)
- Weekends end at 00:00 Monday UTC+12 (12:00 Sunday UTC)
- Works on all timeframes and markets
- Compatible with Pine Script v6
### Tags
weekend, background, timezone, UTC+12, New Zealand, highlight, trading sessions, forex, crypto, time zones, market hours, pacific time
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.