OPEN-SOURCE SCRIPT

SESSION TIME LEVELS (BRT) Xau24k

293
📍 SESSION TIME LEVELS (BRT)
Automatically marks the High and Low of up to 3 custom candles per day — defined by hour and minute in Brasília time (BRT). Each level is drawn as a horizontal line that extends forward throughout the session, with an optional fill zone between High and Low.

━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 WHAT THIS INDICATOR DOES
━━━━━━━━━━━━━━━━━━━━━━━━━━

Many trading strategies rely on the High and Low of specific candles — session opens, liquidity sweeps, institutional reference times. This tool automates that marking process for up to 3 configurable times per day, in Brasília time (UTC−3), with full historical replay.

At each defined time, the indicator:
• Captures the High and Low of that exact candle
• Draws a Max line (upper level) and a Min line (lower level)
• Fills the range between them with a transparent color zone
• Labels each level with the time and exact price
• Extends lines forward through the session (frozen at day close)
• Preserves up to 20 days of history on the chart

━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 HOW IT WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━

1. At the exact bar matching the configured hour and minute (in BRT), the indicator captures that candle's High and Low.
2. Two horizontal lines are drawn — one for the High (Max), one for the Low (Min) — extended to the right until the session ends.
3. A fill box is drawn between them as a visual reference zone.
4. At the turn of each new day (BRT), all lines and boxes from the previous session are frozen at their last bar — keeping history clean and readable.
5. Lines and boxes older than the configured history window are automatically excluded.

━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 VISUAL ELEMENTS
━━━━━━━━━━━━━━━━━━━━━━━━━━

For each active time slot:
• Max line — upper level of the reference candle (fully customizable color)
• Min line — lower level of the reference candle (fully customizable color)
• Fill zone — transparent box between Max and Min (customizable fill color)
• Labels — show time (HH:MM BRT) and price at High and Low

Lines extend to the right during the current session and freeze at day-end. Historical days are preserved for visual reference.

━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ CONFIGURABLE SETTINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━

TIME SLOTS (up to 3, independently toggleable):
• Enable/disable each slot individually
• Hour and minute in BRT (Brasília time)
• Max line color, Min line color, Fill zone color — all fully customizable per slot

VISUAL OPTIONS:
• Line style: Solid / Dashed / Dotted
• Line thickness: 1 to 4
• History depth: 0 (today only) up to 20 days
• Show/hide labels
• BRT UTC offset (default −3; adjust to −2 during daylight saving time)

━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 USAGE NOTES
━━━━━━━━━━━━━━━━━━━━━━━━━━

• Works on any asset and any intraday timeframe
• Designed around Brasília time (BRT / UTC−3) — adjust the offset if your broker uses a different timezone
• If your region observes daylight saving time, change the offset to −2 during summer
• Setting history to 0 shows only today's levels — useful for clean intraday charts
• The fill zone helps visually identify premium/discount areas between the High and Low

━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━━━━━
This indicator is for educational and informational purposes only. It does not constitute financial advice. Always manage your risk appropriately.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.