OPEN-SOURCE SCRIPT
ICT Macros

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).
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).
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.