OPEN-SOURCE SCRIPT

Custom Sessions [AtomicPips]

636
Overview
Custom Sessions is a flexible session-range visualization tool that lets you map up to eight fully independent trading sessions directly onto your chart. Each session draws its own range, body, and reference lines so you can study how price behaves during specific market windows such as London, New York, Tokyo, and Sydney — or any custom time block you define.

Key Features
- 8 independent sessions — each with its own name, session time, and color. Sessions A–D are enabled by default (New York, London, Tokyo, Sydney); E–H are free slots for custom windows.
- Range box — plots the full high-to-low range of each session as a shaded zone with an optional dotted outline.
- Session body — an inner box spanning the open-to-close range, helping you distinguish the directional core of the session from its extremes (wicks).
- Open & Close lines — optional horizontal markers for each session's opening and closing price.
- Adaptive background — when enabled, each session is colored bullish or bearish based on whether price closed above or below the session open, instead of using the fixed session color.
- Timezone control — choose a manual UTC offset or follow the chart's exchange timezone, so sessions stay accurate across instruments.
- Historical sessions — display previous days' sessions (configurable days back) or keep the chart focused on the current day only.
- Status dashboard — an on-chart table showing which sessions are currently active or inactive.
- Session & daily dividers — optional vertical markers for session boundaries and day-of-week separators.

How It Works
For every enabled session, the script tracks the session window using TradingView's session-time logic in your selected timezone. When a session opens, it records the opening price and begins tracking the running high and low. As each bar develops, the range box and body box are updated in real time to reflect the evolving high, low, and close. When the session ends, the range is finalized and (optionally) a close line is drawn at the session's last price.
Each session's drawings are stored and managed individually, and older sessions are automatically cleaned up based on your history setting to keep the chart efficient and uncluttered.

Settings
- Session A–H — toggle, name, session time, color, and per-session Range / Open Line / Close Line options.
- Timezone — manual UTC offset or exchange timezone.
- History — show historical sessions and number of days back.
- Ranges Settings — wick/body transparency, body toggle, outline toggle, label toggle, and adaptive background colors.
- Dashboard — show/hide, location, and text size.
- Dividers — session dividers and daily dividers.

How to Use
Add the indicator to any intraday timeframe. Configure each session's time to match the market windows you trade, and set your timezone so the boxes align correctly. Use the range box to identify session highs and lows that often act as intraday support/resistance, and use the body and open/close lines to gauge directional bias within each window. The adaptive background option provides a quick visual read of whether a session closed bullish or bearish.

Notes
This indicator is a visualization and study tool. It does not generate buy or sell signals and makes no claim about future performance. Always combine it with your own analysis and risk management.

Original Indicator by : LuxAlgo (Big Thanks)

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。