PulseHub
OPEN-SOURCE SCRIPT
Updated

Bionic -- Session Levels

162
Session Levels

This indicator plots the key reference levels that intraday traders track into the New York open: the Asia session high and low, the pre-market high and low, the previous NY session high and low, and the volume Point of Control from the previous NY session. All seven levels render as clean horizontal lines anchored to the session where they formed and extended to the current bar, each with an inline text label at the right edge of the chart.

------------

The Seven Levels

Asia High / Asia Low: The high and low of the most recent completed Asia session (default 18:00 to 00:00 New York time). These levels lock in when the session closes and remain on the chart until the next Asia session completes.

Pre-Market High / Pre-Market Low: The high and low of the current day's pre-market session (default 04:00 to 09:30 New York time). These levels develop live while pre-market is in progress, expanding in real time as new extremes print.

Prev Session High / Prev Session Low: The high and low of the most recently completed NY regular trading hours session (default 09:30 to 16:00 New York time). These levels reflect the RTH range only, so overnight Globex extremes are intentionally excluded. During the current RTH session, these hold the prior session's range.

POC: The Point of Control of the previous NY session, calculated as the price level where the most volume traded. The level is anchored at the start of the session that produced it.

------------

How the POC Is Calculated

While the NY session is in progress, the script collects price and volume data from a lower timeframe (default 1 minute, configurable). When the session closes, that data is binned into a configurable number of price rows (default 24) spanning the session range, and the row with the highest accumulated volume becomes the POC. More rows produce a finer-grained profile; fewer rows produce a smoother one. Because the calculation uses intrabar data rather than tick data, the result is a close approximation of the session volume profile, with precision governed by the intrabar timeframe and row count you select.

-------------------

Configuration

Every level has four independent controls arranged on a single settings row: a show/hide toggle, an editable label text field, a color picker, and a line width setting. You can rename any level to match your own terminology, restyle it, or remove it from the display entirely.

Session windows and the timezone are fully configurable. The defaults assume US equity and index futures conventions in New York time, but the indicator adapts to any market by adjusting the three session inputs and the timezone.

----------------

Display Behavior

The indicator shows only the current, active set of levels. It does not accumulate historical lines across prior days, which keeps the chart clean and the drawing object count low. Lines begin at the session that generated them and extend to the live bar, so you always see how far price has traveled from each reference.

------------__

Requirements and Notes

The indicator is designed for intraday timeframes. Session detection requires an intraday chart, so no levels plot on daily or higher timeframes.
POC accuracy depends on lower-timeframe data availability. On instruments or chart histories where intrabar data is limited, the script falls back to chart-timeframe close and volume.

Asia levels update only when a session completes. During a live Asia session, the displayed high and low belong to the prior completed session.

-----------------

This indicator is a decision-support tool. It does not constitute financial advice. Test it on your instrument and timeframe before trading live.
Release Notes
Session Levels — Release Notes

v1.3.0 — Pine Script v6 migration & new defaults

  • Migrated to Pine Script v6 (//version=6). Faithful port — no behavioral changes. Boolean history references updated for v6's strict non-na bool rules.
  • New defaults: line width now 2 (was 1), label text size now normal (was small) for all seven levels.
  • Note: existing chart instances keep their saved settings — use Settings → Defaults → Reset, or remove and re-add the indicator, to pick up the new defaults.


v1.2.0 — Label & styling options

P
  • rice in labels: each label now shows the level's price after its text, e.g. Asia High (29049.25), formatted to the symbol's tick size.
  • "Show price in labels" toggle (default: on) to switch the price suffix off globally.
  • Per-line width input (1–10) for every level.
  • Per-line text size dropdown (tiny / small / normal / large / huge) for every level.


v1.1.0 — Scale-tracking fix (major)

  • Fixed: lines rendering at wrong prices and ignoring price-axis zoom. Root cause: PulseWire can attach a drawings-only overlay indicator to a detached price scale, stretching its output to fit the pane. The indicator now pins itself to the symbol's scale in code — scale = scale.right in the declaration plus force_overlay = true on every line and label — so levels always render at their true prices and track zoom, with no manual "Pin to scale" step ever required.
  • Fixed: levels stuck at na when chart history starts mid-session (common on seconds charts, which load only a few days of bars). Running highs/lows now initialize on the first available in-session bar.


v1.0.1 — Seconds-chart crash fix

  • Fixed runtime error "The requested historical offset is beyond the historical buffer's limit" on low timeframes. All lines and labels now anchor with time-based coordinates (xloc.bar_time) instead of bar-index coordinates, which have a limited lookback buffer.




v1.0.0 — Initial release
  • Seven configurable levels, each drawn as a horizontal line from its session start to the current bar, with a text label anchored at the right end:
  • Asia Session High / Low (most recent completed session, default 18:00–00:00 NY)
  • Pre-Market High / Low (current day, develops live, default 04:00–09:30 NY)
  • Previous Day High / Low (NY RTH session only, default 09:30–16:00 NY)
  • POC — Point of Control of the previous NY session (volume profile from intrabar data, configurable row count and intrabar timeframe)
  • Per-level show/hide, label text, and color inputs; configurable session windows and timezone.
  • Drawing objects are created once and repositioned in place — no orphaned objects, no auto-scale pollution.
  • Intraday timeframes only (sessions aren't resolvable on daily+); on equities, extended-hours data must be enabled for Asia/pre-market levels.
Release Notes
Update the title of the indicator
Release Notes
Attempting to update the image on the script
Release Notes
Final attempt to update script to show lines. The script works, image does not reflect the functionality.
Release Notes
Fixed issue with panel opening on right side of chart that was blank/empty.
Release Notes
New display options

  • Line style per level — choose solid, dotted, or dashed for each of the seven lines.
  • Text size per level — set each label to tiny, small, normal, large, or huge (default: normal).
  • Global line width — a single Line width setting (default: 2) applies to all lines, keeping the settings panel compact.
Release Notes
Update — Label Display Styles

Labels can now be displayed in two styles, selectable via the new Label display option in Settings:

  • Tag — a filled tag in the line's color with a pointer at the line's right end, similar to price-tag style labels you may know from other tools. Text color inside the tag is configurable via the new Tag text color setting (default: white).
  • Text [Default} — the previous minimal style: plain text in the line's color with no background.


Both styles work with the existing options: custom label text, per-level text size, and the Show price in labels toggle (e.g. Asia High (29049.25)).

As always, labels stay anchored to the right end of their lines — they move with the level, not the screen, so they remain attached at any zoom level or timeframe.
Release Notes
Update — Label Position Offset

New Label offset (bars) setting: labels can now be positioned to the right of the current bar by a configurable number of bars (default: 10, range 0–500).

Set it to 0 to anchor labels directly at the right end of their lines (the previous behavior).

Larger values push all labels further into the space right of price, keeping the area around the current candle clear.

The offset is measured in bars, so labels pan and zoom together with the chart and always stay aligned with their levels.

Works with both label display styles (Tag and Text) and all existing label options — custom text, per-level size, and price display.
Release Notes
Update the image in the description
Release Notes
Update the image in the description
Release Notes
Update the image in the description

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 PulseWire. Read more in the Terms of Use.