OPEN-SOURCE SCRIPT

ICT Macros

566
The ICT macro windows as first-class chart objects: each window bracketed by
a vertical line at its start and one at its end, the pair joined by a
captioned rectangle on a strip at the chart's edge. The caption carries the
window's name with a countdown under it -- to the open while the window is
ahead, of what is left once inside. Split out of Time-Based Vertical Lines
the way the NinjaTrader pair is: that tool keeps the plain time lines, this
one owns the windows, and the two share a chart without double-booking an
edge -- the band strip defaults to the bottom and the line captions to the
top.

The slots are the full standard macro map, in New York time. The rule is
:50 to :10 around every top of the hour -- twenty minutes straddling it --
except the final trading hour, which replaces its window with the Final
Hour (15:15 - 15:45) and Market On Close (15:45 - 16:00) specials; the
settlement portion (15:50 - 16:00) rides inside MOC as its own optional
slot. That gives one row per window from the 18:50 Asia macro around the
clock to the close, grouped by the session each falls in. The playbook
trades the six regular-hours windows plus the Final Hour and MOC, so
exactly that set starts enabled; every other session's windows are carried
but off. The 08:30 news release and the opening ranges are separate
events, not macros -- the 08:30 line lives in Time-Based Vertical Lines.

Features:
- 24 macro slots, one row each: on/off, start and end as HH:MM, label
- Empty label captions the band with the window's times; the Final Hour,
MOC and Settlement windows come pre-labeled
- Countdown on its own line under the window's name
- A window may cross midnight (23:50 - 00:10 does); it stays keyed to the
day it starts on
- Bands and captions ride a strip at the bottom (or top) edge, set clear
of the bars by an adjustable gap
- Bracket lines can switch off, leaving only the bands on the strip
- Every window drawn for the whole day, future ones included
- Time zone support and historical-days control

Notes:
- Times are read as HH:MM in the selected zone. An entry that is not a
valid time is skipped, with a note in the Pine Logs pane; an end at or
before the start means the window runs into the next day.
- The strip hangs off the visible bars, not the panel edge: a script only
knows prices, never pixels, so it makes room by having the chart's
auto-scale give up range under (or over) the candles. Pine has no way to
read the viewport's own bounds, so the strip cannot be pinned to the
panel edge the way a platform-native tool could pin it.
- A window later today sits past the last bar. TradingView draws at most
500 bars past the last one, and the chart only reveals as much of that
as the right margin allows (Chart settings > Appearance).

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.