v3.0.2 is the active source snapshot represented here.
TradingView Script · Pine Revision History
Auto-Levels Pine Changelog
This page is the revision-history surface for the current Auto Levels pine script family
Tracking what shipped/changed in each version, and which features are source-landed versus those still awaiting user feedback and confirmation
If you need settings, a level legend, or usage guidance, open the paired guide instead
How to use this page
Keep the revision story separate from the manual story
This changelog covers
- where the indicator started
- what each major version changed
- bug-trail context that still matters publicly
- which items remain in the “needs fresh chart confirmation” category
This changelog does not try to be
- a settings guide
- a workflow tutorial
- a replay of internal repo wave naming
- a claim that every landed source fix is already visually closed
Current family layout
What the active Auto Levels family looks like today
| Surface | Role | Status |
|---|---|---|
auto-levels.pine | Main unified overlay for auto 1hr levels, session O/C, FCR, EMAs, FVG, patterns, and prior-day context | ✅ Active v3.0.2 Source |
fcr-standalone.pine | Shareable FCR-only companion | ✅ Active v2.2 companion |
webhook-alerts.pine | Alert-only companion kept intentionally separate from the visual overlay family | ✅ Active top-level companion |
Version history
Open any revision for the deeper notes
The summaries below stay public-facing and trader-relevant: what changed, why it mattered, and where the remaining caution still lives.
v3.0.2
First architectural release of v3. Trimmed levels now move to a dormant buffer instead of being hard-deleted. Six dorm_* parallel arrays hold price, type, tags, born, end, and is_eth for each dormant level. When price returns within swing tolerance of a dormant level at any 1hr boundary, the level is restored to active with its mitigation state preserved — no more phantom re-entries as fresh 5/5. Dormant levels expire after 48 hours.
Current
v3.0.2
First architectural release of v3. Trimmed levels now move to a dormant buffer instead of being hard-deleted. Six dorm_* parallel arrays hold price, type, tags, born, end, and is_eth for each dormant level. When price returns within swing tolerance of a dormant level at any 1hr boundary, the level is restored to active with its mitigation state preserved — no more phantom re-entries as fresh 5/5. Dormant levels expire after 48 hours.
- Dormant buffer arrays added:
dorm_price[],dorm_type[],dorm_tags[],dorm_born[],dorm_end[],dorm_is_eth[]declared as persistentvararrays alongside the activelvl_*arrays.DORM_EXPIRY_MSconstant set to 48 × 3,600,000ms (configurable). - Trim loops modified — push before delete: all 3 trim loops (KEY/5/5, 3/5, Ghost) now push level metadata to the dormant buffer before deleting the line/label objects and removing the active array slots. Drawings are still released to stay within Pine's object limits; only metadata is retained.
- Expiry pass: on each
trim_gateboundary, dormant entries born more than 48 hrs ago are permanently removed (backwards iteration for index safety). Prevents unbounded array growth on long active sessions. - Restore pass: on each
trim_gateboundary, any dormant level withinrestore_tol(0.1% of price or 20 ticks, whichever is larger — same tolerance as KEY/swing detection) of the current close price is restored if no active level already occupies that price zone (f_near_existingguard). Restored levels recreate their line + label from the originaldbornanchor with a fresh 48-hr ray end, and carry their originallvl_tagscount — a level that had been mitigated to 3/5 will restore as 3/5, not as a fresh 5/5.
v3.0.1
Two targeted fixes following v3.0.0. CL, GC, and all non-RTH-primary instruments were incorrectly receiving teal coloring for levels born outside RTH hours — level_is_eth was set via session-time check rather than the RTH-primary whitelist. Trim loops now prefer ETH levels for removal before touching RTH levels, preserving RTH context when "Show ETH-Derived" toggle adds extra budget pressure.
History
v3.0.1
Two targeted fixes following v3.0.0. CL, GC, and all non-RTH-primary instruments were incorrectly receiving teal coloring for levels born outside RTH hours — level_is_eth was set via session-time check rather than the RTH-primary whitelist. Trim loops now prefer ETH levels for removal before touching RTH levels, preserving RTH context when "Show ETH-Derived" toggle adds extra budget pressure.
- CL/GC teal bug fixed (RTH scan):
level_is_ethin theis_new_h1block was evaluated asnot f_is_rth_session_time(h1_flip_time)for non-RTH-primary symbols — any CL/GC level born overnight receivedis_eth=true→ teal. Fix:level_is_eth = falseunconditionally in the RTH scan block. All levels born on theis_new_h1path are RTH-born by definition; ETH levels for RTH-primary symbols come exclusively from theis_new_h1_ethblock. - LTF scan fix: same logic error in the
chart_above_1hpath.ltf_is_eth_lvlwasis_rth_primary_symbol ? false : not f_is_rth_session_time(ltf_t2)— backward: RTH-primary symbols gotfalsefor ALL times (missing ETH teal on NQ/MNQ/ES/YM above 1hr), non-RTH-primary gottrueovernight (CL/GC teal). Fixed tois_rth_primary_symbol and not f_is_rth_session_time(ltf_t2): RTH-primary = teal if ETH session, non-RTH-primary = always false. - Trim ETH-priority removal: all 3 trim loops (KEY/5/5, 3/5, Ghost) now prefer the farthest ETH level for removal before falling back to the farthest RTH level. Previously, enabling "Show ETH-Derived" added ETH levels to the same fixed budget, causing RTH levels to be trimmed away as the farthest-from-close candidates. ETH levels are now treated as the expendable tier — RTH context is protected.
v3.0.0
First release of the v3 major version. All ZTH levels (KEY, 5/5, 3/5) born during ETH session hours now render in teal instead of cyan. RTH levels remain cyan. Ghost stays violet for all levels. New "ETH-Derived Levels (teal)" color input added. f_lvl_color updated with is_eth parameter — the flag was already stored per-level in lvl_is_eth[]. CL/GC and other non-RTH-primary instruments unaffected. RTH levels remain fully visible on ETH charts.
History
v3.0.0
First release of the v3 major version. All ZTH levels (KEY, 5/5, 3/5) born during ETH session hours now render in teal instead of cyan. RTH levels remain cyan. Ghost stays violet for all levels. New "ETH-Derived Levels (teal)" color input added. f_lvl_color updated with is_eth parameter — the flag was already stored per-level in lvl_is_eth[]. CL/GC and other non-RTH-primary instruments unaffected. RTH levels remain fully visible on ETH charts.
- ETH-derived levels now teal:
f_lvl_color(typ, tgs)extended tof_lvl_color(typ, tgs, is_eth). Whenis_eth=true, KEY/5/5/3/5 use the newcolor_eth_lvlinput (default#089981teal). Ghost stays violet for all levels — re-mitigated state is session-agnostic. - New input — "ETH-Derived Levels (teal)": added to Level Management group, below "5/5 (1px solid) 1hr color-flip". Controls color for all ETH-born ZTH levels. Tooltip explains RTH-primary vs non-RTH-primary instrument behaviour.
- All 14 call sites updated: RTH creation uses
level_is_eth; ETH creation passestrue; LTF mitigation addseth_j = array.get(lvl_is_eth, j); LTF creation usesltf_is_eth_lvl; standard mitigation, visibility sync, and band color loops all hadis_ethalready available from existing array lookups. - CL, GC, and non-whitelisted instruments unaffected:
is_eth=falsefor all their levels (no session split in the source pull), so they continue to use the cyan RTH color palette as before. - RTH levels on ETH charts: display gating unchanged —
f_should_display_zth(is_eth_level=false)always returnstrue, so RTH levels are always visible regardless of chart session mode. The teal/cyan distinction now makes the origin immediately readable on both RTH and ETH charts without switching modes.
✅ Issues Resolved in v2.27–v3.0.2
- Single 4/5 toggle replaced with 4 independent per-chain toggles.
- Maint rail decoupled from ETH gate.
- 18:00 eopen rail decoupled from ETH gate.
- "prev 4/5" annotations appearing with any toggle on (f_sess_label cross-chain bug).
- "prev 4/5" text persisting on maint chain (f_sess_dual_text simplified).
- Erroneous 4/5 annotation on RTH 15:30 bar with maint toggle (f_near_t tolerance tightened).
- All ZTH levels rendering same cyan regardless of session origin (ETH-derived levels now teal via f_lvl_color is_eth parameter).
- CL/GC teal bug (level_is_eth incorrectly set via session-time check for non-RTH-primary instruments).
- Trim loops removing RTH levels before ETH when ETH toggle adds budget pressure.
v2.30
Root-cause fix for erroneous 4/5 annotation on RTH levels when only the 16:30 maint toggle is on. maint_t / eopen_t store bar open time, not session boundary time — on a 30min chart maint_t = 16:30, so a ZTH level born at 15:30 falls within the former 90min window. f_near_t now accepts a tolerance parameter: open + close keep 90min; maint + eopen reduced to 50min.
History
v2.30
Root-cause fix for erroneous 4/5 annotation on RTH levels when only the 16:30 maint toggle is on. maint_t / eopen_t store bar open time, not session boundary time — on a 30min chart maint_t = 16:30, so a ZTH level born at 15:30 falls within the former 90min window. f_near_t now accepts a tolerance parameter: open + close keep 90min; maint + eopen reduced to 50min.
- Root cause — maint_t stores bar open time:
maint_t_today(andeopen_t_today) hold the Pinetimeof the bar that triggeredis_new_maint/is_new_eopen— which is the bar's open time, not its close. On a 30min RTH chart, the maint bar opens at 16:30 (closes at 17:00), somaint_t_today = 16:30. A ZTH level born at the 15:30 bar is 60 min before 16:30 — within the former 90 min tolerance, triggering a false "4/5" annotation. - Fix — per-chain tolerance parameter:
f_near_tnow acceptstol_ms. Open + close branches call with5 400 000ms (90 min, unchanged). Maint + eopen branches call with3 000 000ms (50 min). The 60 min gap between a 15:30-born level and maint_t 16:30 now exceeds the 50 min window, eliminating the false annotation. - Legitimate maint levels preserved: 50 min covers bars born at 16:00 (30 min before maint_t 16:30) and 16:30 (same bar, 0 min). The v2.26 ZTH re-annotation for all chart timeframes is unaffected.
v2.29
Two user-facing changes. "prev 4/5" label string dropped — all 4/5 annotations now read simply "4/5" regardless of which trading day the level was born on. Color scheme restructured: RTH open + close today = full cyan, maint + eopen today = full teal, all previous days across all 4 chains = faded cyan. Input labels updated to reflect the new color meaning.
History
v2.29
Two user-facing changes. "prev 4/5" label string dropped — all 4/5 annotations now read simply "4/5" regardless of which trading day the level was born on. Color scheme restructured: RTH open + close today = full cyan, maint + eopen today = full teal, all previous days across all 4 chains = faded cyan. Input labels updated to reflect the new color meaning.
- "prev 4/5" label removed:
f_sess_dual_textsimplified from a day-comparison branch to always return' | 4/5'. The "prev" distinction caused confusion and was the last trigger for spurious annotations on the maint chain after the v2.28 toggle gating fix. All 4/5 labels now read identically regardless of which trading day the event was born. - 4/5 color scheme — RTH vs ETH-derived: open + close today render in full cyan (
color_4_5_today). Maint (17:00) + eopen (18:00) today render in full teal (color_4_5_yest) — visually separating the ETH-boundary sessions. All previous-day levels across all 4 chains now fade as transparent cyan, removing the prior mixed teal/cyan fade scheme for previous days. - Input labels updated:
color_4_5_todaynow labelled "4/5 Open + Close Today (cyan)";color_4_5_yestnow labelled "4/5 Maint + Reopen Today (teal) · All Prev Days Fade Cyan" with updated tooltips. - Regression introduced: maint/eopen time tolerance unchanged at 90 min — maint_t stored as bar open time (16:30 on 30min chart) still within 90 min of a 15:30-born level. Fixed in v2.30.
v2.28
Two targeted fixes for the independent 4/5 toggle system. f_sess_label was annotating ZTH levels from all 12 session rails regardless of which toggle was active, causing "prev 4/5" labels with any toggle on. 18:00 eopen chain decoupled from ETH gate — now independently accessible on RTH charts.
History
v2.28
Two targeted fixes for the independent 4/5 toggle system. f_sess_label was annotating ZTH levels from all 12 session rails regardless of which toggle was active, causing "prev 4/5" labels with any toggle on. 18:00 eopen chain decoupled from ETH gate — now independently accessible on RTH charts.
- f_sess_label cross-chain annotation bug fixed: each of the 12 branches in
f_sess_labelis now gated by its corresponding input toggle. Previously, when ANY 4/5 toggle was ON, session data for all chains was populated — causing ZTH levels near any session rail price to receive spurious "prev 4/5" annotations from unrelated chains (e.g.show_45_opentriggering a close-chain "prev 4/5" on the 4th day back). Now annotations only fire when the relevant chain's toggle is actively enabled. - 18:00 Open (eopen) chain decoupled from ETH gate:
show_eopen_4_5(renamed fromshow_eth_4_5) no longer requiresshow_eth_on_rth_primary. The 18:00 CME daily reopen rail is now independently accessible on RTH charts without enabling "Show ETH-Derived Levels" — matching the behaviour of the 17:00 maint chain. Tooltip updated.cnt_45counter updated: each chain now gated by its own toggle for accurate level count. - Regression introduced: maint-chain "prev 4/5" annotation still fired for previous-day events even with correct toggle gating — root cause was
f_sess_dual_textday-comparison logic. Fixed in v2.29.
v2.27
Single 'Show 4/5 Session Rails' toggle replaced with four independent inputs — one per event (9:30 open, 15:30/16:00 close, 16:30/17:00 maint, 18:00 reopen). Maint rail no longer gated by ETH toggle. Draw section restructured into four independent chain-specific if/else blocks.
History
v2.27
Single 'Show 4/5 Session Rails' toggle replaced with four independent inputs — one per event (9:30 open, 15:30/16:00 close, 16:30/17:00 maint, 18:00 reopen). Maint rail no longer gated by ETH toggle. Draw section restructured into four independent chain-specific if/else blocks.
- Four independent 4/5 toggles:
show_45_open,show_45_close,show_45_maint,show_45_eopenreplace the singleshow_sessioninput. Each can be enabled or disabled independently without affecting the other three rails. - Maint rail decoupled from ETH gate:
show_45_maintonly requireszth_allowed— no longer blocked by the "Show ETH-Derived Levels" toggle. - Backward-compatible
show_sessionderived var:show_session = show_45_open or show_45_close or show_45_maint or show_45_eopen. - Draw section restructured: four fully independent if/else blocks — one per chain. Enables per-toggle delete/lazy-create without cross-chain interference.
- Regression introduced:
f_sess_labelcross-chain annotation bug (all session rails checked regardless of toggle state) — fixed in v2.28.
v2.26
Four fixes addressing v2.25 regressions and a systematic level-count discrepancy between 1hr and lower-TF charts. Close fallbacks switched to lookahead_off; barstate.isconfirmed made conditional by TF; f_sess_label adds time proximity guard; trim gated on is_new_h1 to match creation/mitigation cadence.
History
v2.26
Four fixes addressing v2.25 regressions and a systematic level-count discrepancy between 1hr and lower-TF charts. Close fallbacks switched to lookahead_off; barstate.isconfirmed made conditional by TF; f_sess_label adds time proximity guard; trim gated on is_new_h1 to match creation/mitigation cadence.
- Close fallbacks switched to lookahead_off:
sess_30_close_c_fallbackandsess_30_close_t_fallbacknow usebarmerge.lookahead_off. Withlookahead_onthe 15:30 bar'stime_close = 16:00was visible at bar open — the confirmed close price was not yet available so a live (unconfirmed) price was stored. Withlookahead_offthe data only arrives after the 15:30 bar closes, fixing both the timing and the price in one change. - is_new_close_45 guard made TF-conditional:
barstate.isconfirmedis now required only on charts > 30min, wheresecurity_lower_tfscan includes forming intrabars that need the confirmation check. On charts ≤ 30min thelookahead_offfallback already handles timing correctly withoutbarstate.isconfirmed. This eliminates the v2.25 regressions: missing current 9:30 open 4/5 rail and missing ZTH levels on 5min/10min/15min charts. - f_sess_label — time proximity guard added: ZTH level label annotations (
| 4/5/| prev 4/5) now require the level's birth timestamp to be within 90 minutes of the session event time, not just within price tolerance. Without this, levels born at 17:00, 21:00, or 6:00 whose prices accidentally matched old session rail values (e.g., yesterday's 16:00 close) received spuriousprev 4/5annotations. The 4 valid annotation windows (9:30 open, 16:00 close, 16:30 maint close, 18:00 reopen) remain fully annotated. - Trim cadence gated on is_new_h1: the three trim while loops (KEY+5/5, 3/5, Ghost) previously ran on every chart bar. On a 5min chart that is 12× per hour vs 1× per hour on a 1hr chart. Each run re-evaluated "farthest from close" against the current intrabar price, progressively removing levels that the 1hr chart retained. Over a session this caused systematically fewer 5/5 and 3/5 levels on 5min/10min/15min charts. Fix:
trim_gate = chart_above_1h or is_new_h1 or is_new_h1_eth— trim fires at the same cadence as level creation and mitigation, producing consistent level sets across all TFs ≤ 1hr.
✅ Issues Resolved in v2.26
- 16:00 close rail printing at bar open (lookahead root cause).
- Spurious "prev 4/5" annotations at wrong ETH session times.
- Missing 9:30 open 4/5 rail and ZTH levels on ≤15min charts (v2.25 regression).
- Missing 5/5 and 3/5 levels on ≤15min charts due to trim cadence mismatch.
v2.25
Adds barstate.isconfirmed to is_new_close_45 and is_new_maint. time_close is a fixed property of the bar — it equals 16:00 (or 17:00) from the moment the bar opens, so the v2.24 time_close guard still fired at bar open. barstate.isconfirmed ensures both events only fire when the bar has actually closed. Introduced regressions on ≤30min charts — resolved in v2.26.
History
v2.25
Adds barstate.isconfirmed to is_new_close_45 and is_new_maint. time_close is a fixed property of the bar — it equals 16:00 (or 17:00) from the moment the bar opens, so the v2.24 time_close guard still fired at bar open. barstate.isconfirmed ensures both events only fire when the bar has actually closed. Introduced regressions on ≤30min charts — resolved in v2.26.
- Root-cause fix — barstate.isconfirmed on close events:
time_closeis a fixed property of a chart bar — on a 5min chart, the bar that opens at 15:55 and closes at 16:00 hastime_close = 16:00from the moment it opens. The v2.24 guardtime_close >= sess_15_close_twas already TRUE at bar open, so the event still fired early.barstate.isconfirmedisfalseduring all intrabar ticks and onlytrueon the final confirmed close. Added tois_new_close_45andis_new_maint. - Regression introduced on ≤30min charts: applying
barstate.isconfirmedunconditionally caused missing 9:30 open 4/5 rail and missing ZTH levels on 5min/10min/15min charts. Fixed in v2.26 by making the guard conditional on chart TF.
v2.24
Three event guards added to prevent lookahead_on fallback paths from firing 4/5 session events before the bar actually closes. Fixes: 16:00 close rail drawing 30min early; ETH maintenance and reopen events mislabelling ZTH levels as "prev 4/5"; ETH 4/5 levels appearing at wrong session boundary times.
History
v2.24
Three event guards added to prevent lookahead_on fallback paths from firing 4/5 session events before the bar actually closes. Fixes: 16:00 close rail drawing 30min early; ETH maintenance and reopen events mislabelling ZTH levels as "prev 4/5"; ETH 4/5 levels appearing at wrong session boundary times.
- is_new_close_45 guard (
time_close >= sess_15_close_t): therequest.securityfallback for the 16:00 close usedbarmerge.lookahead_on, which made the 16:00 close value available at the open of the 15:30 bar — 30 minutes early. The event now only fires when the current bar'stime_closehas actually reached the 16:00 anchor timestamp. On a 1min chart the level fires at 15:59's close (16:00 ET); on a 30min chart it fires at the 15:30 bar close (16:00 ET). Historical replay is unaffected. - is_new_maint guard (
time_close >= eth_maint_t + 1800000):eth_maint_tstores the 16:30 bar open (the x-position anchor for the line — intentional, as no bar exists at 17:00 in the CME maintenance gap). Adding 30 min (1 800 000 ms) targets the actual 17:00 close time. The maintenance event previously fired at the 16:30 bar open; it now fires when the bar actually closes at 17:00. - is_new_eopen guard (
time >= eth_reopen_t): safety guard ensuring the 18:00 reopen event fires no earlier than the 18:00 bar open. Prevents any lookahead edge-case where the fallback value becomes available before the 18:00 bar actually starts. - Root cause of "prev 4/5" mislabelling fixed: premature maint/close events caused
maint_t_todayandsess_close_t_todayto hold timestamps from the previous session.f_trade_day_idcomparisons then returned a date-mismatch →' | prev 4/5'on ZTH levels formed during ETH hours. With correct event timing, today's session timestamps populate correctly and the "4/5" vs "prev 4/5" dual-label is accurate.
✅ Issues Resolved in v2.24
- 16:00 close rail firing 30 minutes early.
- ETH maintenance (17:00) rail firing 30 minutes early.
- ETH ZTH levels mislabelled "prev 4/5" due to wrong chain timestamps.
v2.23
Trim strategy switched to farthest-from-current-price-first across all three level budgets. 4/5 accuracy documentation added to tooltip and guide. f_near_45_level placement fix resolves levels-not-attached visual regression from v2.20.
History
v2.23
Trim strategy switched to farthest-from-current-price-first across all three level budgets. 4/5 accuracy documentation added to tooltip and guide. f_near_45_level placement fix resolves levels-not-attached visual regression from v2.20.
- Farthest-from-price trim (all three budgets): when KEY/5/5, 3/5, or Ghost level counts exceed their respective maximums, the level farthest from current price is removed first — not the oldest. On extended directional moves where many historical levels accumulate far from current price, the indicator now always keeps the N levels closest to where price actually is. Applies independently to each of the three type budgets.
- Raised default budgets:
Max Active KEY / 5/5 Levelsraised from 20 → 40;Max Active 3/5 Levelsraised from 15 → 20.maxvalfor all three inputs raised from 100 → 200 to accommodate wider range reviews. - 4/5 accuracy tooltip and guide note (v2.22): the
show 4/5 Levelsinput tooltip now includes a verification note (30min chart is authoritative — 4/5 OPEN = 9:30 bar open, 4/5 CLOSE = 15:30 bar close), a pre-session note (before 9:30 ET, "Today's" open rail shows the prior session's open — expected), and a contract rollover note (historical rails may appear 1–5 ticks off after roll — stabilizes on current contract). Guide cards updated identically via hover tooltip. - f_near_45_level placement fix (v2.21): function moved to after ALL
varsess drawing variable declarations — out of the middle of the var-declaration chain where it was placed in v2.20. Resolves the "levels not attached to candles" visual regression on first load. Pine v6 edge case with function definitions inside var-declaration chains.
v2.20
Max Active ZTH Levels split into three independent thresholds (KEY/5/5, 3/5, Ghost). 4/5 pattern toggle activated. FCR standalone updated to v2.2 with Pine v6 and multi-9:30 rotation fix.
History
v2.20
Max Active ZTH Levels split into three independent thresholds (KEY/5/5, 3/5, Ghost). 4/5 pattern toggle activated. FCR standalone updated to v2.2 with Pine v6 and multi-9:30 rotation fix.
- Split Max Active ZTH Levels: the single
Max Active ZTH Levelsinput (was 40) replaced by three independent thresholds —Max Active KEY / 5/5 Levels(default 20),Max Active 3/5 Levels(default 15),Max Active Ghost Levels(default 10). Each type is trimmed independently so you can control density per level class when comparing across timeframes. KEY and 5/5 share one budget; trim strategy: oldest-first within each type (superseded by v2.23 — now farthest-from-price-first). - 4/5 pattern level toggle:
Include 4/5 Levels in Pattern Recognitiontoggle activated (was reserved). When ON, patterns (R, B, P, SFP, 1-2-3) can fire at RTH 9:30 open and 16:00 close session prices for today, yesterday, and the day before. Uses the existingProximity: 4/5 session levelsthreshold (default 20 ticks). Off by default — mirrors the 3/5 toggle design. Works regardless of whether 4/5 rail lines are visually visible. - FCR standalone v2.2: migrated from Pine v5 to Pine v6. Ported the v2.19 rotation array fix — scan loop now rotates for every 9:30 found per chart bar (not just the last one). On weekly/monthly charts where multiple trading days exist per bar, all three rotation slots (today/yesterday/day-before) are correctly populated. Drawing moved to
barstate.islastexclusively, matching the main script pattern.
v2.19
ZTH levels now match the 1hr chart exactly on 4hr, Daily, Weekly, and Monthly. FCR rotation populates all three slots correctly on weekly/monthly. BRK/RT label color unified.
History
v2.19
ZTH levels now match the 1hr chart exactly on 4hr, Daily, Weekly, and Monthly. FCR rotation populates all three slots correctly on weekly/monthly. BRK/RT label color unified.
- ZTH LTF scan for chart TF > 1hr:
security_lower_tf("60")scan added for level creation and mitigation on 4hr, Daily, Weekly, and Monthly charts. A 4-slot ring buffer carries 1hr OHLC+time across chart bar boundaries so every 1hr bar is processed — levels now match the 1hr chart exactly on all timeframes. - FCR all-TF rotation fix: the scan loop now rotates the rotation array for each 9:30 found per chart bar. On weekly/monthly charts with 5 trading days per bar, all 5 9:30 events are captured in order — slots 0/1/2 always hold today/yesterday/day-before correctly. Drawing moved to
barstate.islastexclusively. - BRK/RT color fix:
h_col/l_colnow force purple (#9b59b6) when BRK or RT is present on a candle side, regardless of co-occurring R/P/SFP labels.
✅ Issues Resolved in v2.15–v2.19
- ZTH sparse detection on 4hr/Daily/Weekly/Monthly charts.
- FCR prior-day slots incorrect on Weekly/Monthly charts.
- ZTH vertical post on 4hr/Daily RTH charts.
- BRK/RT color inconsistency — purple not applied when co-occurring with R/P/SFP.
v2.18
FCR drawing simplified to direct ta.valuewhen for all three slots. Pattern proximity consolidated to per-level-type thresholds. 1-2-3 "1" candle wick filter added.
History
v2.18
FCR drawing simplified to direct ta.valuewhen for all three slots. Pattern proximity consolidated to per-level-type thresholds. 1-2-3 "1" candle wick filter added.
- FCR all-slot simplification: all three FCR slots now use the direct scan+fallback approach — rotation array no longer used for drawing at any timeframe. Eliminates the extra 4th FCR artifact that was appearing on 4hr charts.
- Per-level-type proximity thresholds: replaced per-pattern proximity inputs (
prox_ticks_r/b/p/123) with per-level-type inputs —prox_ticks_key55(KEY/5/5, default 20),prox_ticks_45(4/5, reserved),prox_ticks_35(3/5 when enabled, default 15). Tune each level class independently instead of each pattern independently. - 1-2-3 "1" candle wick filter: new
one_wick_pct_123input (default 30%) — the wick in the trade direction on the "1" candle must be ≤ this % of the candle range. Ensures the break candle is a committed move, not a rejection wick.
v2.17
FCR prior-day slots use ta.valuewhen direct lookback on all timeframes. 1-2-3 requires the "1" candle to close in the continuation direction. "1"/"2" label visual improved.
History
v2.17
FCR prior-day slots use ta.valuewhen direct lookback on all timeframes. 1-2-3 requires the "1" candle to close in the continuation direction. "1"/"2" label visual improved.
- FCR prior-day universal fix: slots 1/2 now always use direct 15min
ta.valuewhenlookback on all chart timeframes. Slot 0 (today) uses the rotation array. Eliminates the Daily-and-lower regression from v2.15/v2.16 and the weekly/monthly multi-day rotation problem. - 1-2-3 direction requirement: the "1" candle (bar[2]) must close in the continuation direction — bearish close for a bearish 1-2-3, bullish close for a bullish one. Prevents a rejection wick that touches a level from being misread as a break candle.
- 1-2-3 "1"/"2" label visual: changed from boxed arrow style to floating text (
label.style_none+yloc.abovebar/belowbar). Added a min-gap guard (≥3 bars between patterns) to prevent consecutive patterns from sharing bar text.
v2.16
Fixed v2.15 FCR regression on 1hr charts. 3/5 pattern toggle added. 1-2-3 "3" folded into bar[0] stack; proximity anchored to "1" candle.
History
v2.16
Fixed v2.15 FCR regression on 1hr charts. 3/5 pattern toggle added. 1-2-3 "3" folded into bar[0] stack; proximity anchored to "1" candle.
- FCR 1hr regression fix: v2.15's direct
ta.valuewhenapproach for prior-day FCR slots was correct for Weekly/Monthly but broke 1hr charts (rotation array fires once per day there, which is reliable). v2.16 gates the direct approach to Weekly/Monthly only; Daily and lower revert to rotation array slots 1/2. - 3/5 pattern toggle: new
Include 3/5 Levels in Pattern Recognitiontoggle (off by default). Patterns (R, B, P, SFP, 1-2-3) only fire at KEY/5/5 by default; enable to extend to 3/5. Ghost levels excluded regardless. - 1-2-3 "3" folded into bar[0] stack: the confirming candle "3" label is now part of the
\n-stacked label at bar[0] alongside R/B/SFP/BRK/RT. "1"/"2" remain as standalone historical labels. - 1-2-3 proximity anchored to "1" candle: the proximity check now runs on bar[2] (the break candle) rather than bar[0]. Added
paus_body_pct_123input (default 50%) — "2" candle body must be ≤ this % of its range.
v2.15
1-2-3 redrawn as three separate bar labels. FCR prior-day slots use direct ta.valuewhen lookback. ATR bands normalized to 15min ATR. ZTH vertical fix on 4hr/Daily.
History
v2.15
1-2-3 redrawn as three separate bar labels. FCR prior-day slots use direct ta.valuewhen lookback. ATR bands normalized to 15min ATR. ZTH vertical fix on 4hr/Daily.
- 1-2-3 individual bar labels: "1", "2", and "3" now draw as three separate
label.newcalls on bar[2], bar[1], and bar[0] respectively — removed from the\n-stacked main label. - FCR prior-day fix: slots 1/2 now use
ta.valuewhen(index=1/2)direct 15min lookbacks instead of the rotation array, which was only accurate on Daily and lower (one rotation per chart bar = one trading day only). Weekly/monthly charts with multiple days per bar now show correct yesterday/day-before FCR levels. - ATR band width normalized: band width now uses 15min ATR (
atr_15minviarequest.security) rather than the chart-TF ATR — consistent visual width across 5min, 4hr, daily, and weekly charts. - ZTH vertical post fix (4hr/Daily):
barstate.islastloop updates all ZTH level line x2 totime + chart_bar_ms. Root cause: x2 = born_time + 48h falls in weekend gaps on RTH daily/4hr charts; TradingView snapped it back to x1, causing a vertical spike.
v2.14
BRK confirmation gates: minimum pierce distance (ticks) and minimum candle body percentage, replacing the old upper-bound tolerance check.
History
v2.14
BRK confirmation gates: minimum pierce distance (ticks) and minimum candle body percentage, replacing the old upper-bound tolerance check.
- BRK minimum pierce distance: new
brk_ticksinput (default 5 ticks) sets the minimum distance the close must clear the level on a BRK candle. Replaces the old upper-bound tolerance check. Too-short breaks no longer qualify. - BRK minimum body percentage: new
brk_body_pctinput (default 30%) requires the BRK candle body to be at least that percentage of the full candle range. Doji-like candles with large wicks but tiny bodies are excluded — commitment required.
✅ Issues Resolved in v2.9–v2.14
- Global proximity tick applied to all patterns equally — split into per-pattern inputs in v2.9.
- All session rails and FCR rays still rendering as verticals on Daily/Weekly — f_visible_ray_end() applied to all in v2.11.
- Weekly open golden vertical not showing when 4/5 session rails are OFF — show_session gate removed in v2.13.
- BRK firing on low-commitment candles — minimum pierce distance and body % gates added in v2.14.
v2.13
Weekly open creation gate decoupled from session rails toggle; auto-scale lockout note added to Max Active Levels tooltip.
History
v2.13
Weekly open creation gate decoupled from session rails toggle; auto-scale lockout note added to Max Active Levels tooltip.
- Weekly open show_session gate removed: the golden Sunday 18:00 ET vertical was gated on the "Show 4/5 Session Rails" toggle at creation — which defaults OFF since v2.7. The line never appeared unless 4/5 rails were also visible. Creation now requires only
show_weekly_openandzth_allowed. The line draws independently of the session rails toggle. - Price-axis auto-scale note: the Max Active ZTH Levels tooltip now explains why TradingView's "Fit chart to data" button includes all level lines in the price range. Workaround documented: right-click the price axis and select "Lock Price Axis Scale" to prevent auto-scale from jumping to level extremes.
v2.12
RT suppresses BRK on the same candle side, weekly open y-values use close ± ATR instead of ta.highest/lowest, and BR tooltip added.
History
v2.12
RT suppresses BRK on the same candle side, weekly open y-values use close ± ATR instead of ta.highest/lowest, and BR tooltip added.
- RT suppresses BRK on same side: when RT fires on the same candle side as a BRK, the BRK label is suppressed in the stack. RT takes visual priority since the retest is the actionable signal once a break has been established. BRK and RT always appear on separate candles — the suppression only applies when an existing BRK state triggers RT on the same bar side as a new BRK would also fire.
- Weekly open y-values: replaced
ta.highest(500)andta.lowest(500)withclose + atr14 * 10andclose - atr14 * 10. The historical-range lookback was expanding the price scale and triggering "should be called on each calculation" scope warnings. ATR-based extents update each bar and scale with instrument volatility. - BR tooltip added: Break & Retest toggle now has a descriptive tooltip explaining the BRK candle definition and RT fire conditions.
v2.11
SFP gates expanded to all visible ZTH levels, ATR bands defaulted lower, all 4/5 rails and FCR rays wrapped in f_visible_ray_end, and typed na fix.
History
v2.11
SFP gates expanded to all visible ZTH levels, ATR bands defaulted lower, all 4/5 rails and FCR rays wrapped in f_visible_ray_end, and typed na fix.
- SFP at all visible levels: SFP detection expanded from KEY and 5/5 only to all visible ZTH levels (any level that passes
f_should_display_level). SFP default pierce threshold raised from 5 to 30 ticks to compensate for the broader gate. - ATR proximity bands default lowered:
atr_band_multdefault changed from 0.5 to 0.11. Values above ~1.0 produce visually excessive boxes on most instruments. - 1-2-3 "3" folded into bar[0] stack: the third bar of a 1-2-3 pattern now draws its label in the current-bar vertical stack alongside R/B/SFP/BRK/RT.
- BRK/RT label color unified: both BRK and RT labels use the same purple (
#9b59b6) since they are part of the same pattern sequence. - All 4/5 rails and FCR rays wrapped in f_visible_ray_end(): every session rail and FCR line creation call now routes its x2 endpoint through
f_visible_ray_end(t, int(na), 48 * one_hour_ms), guaranteeing a minimum of one full chart bar's width. Fixes vertical rendering on Daily, Weekly, and Monthly charts for all session level lines. - int(na) typing fix: all
f_visible_ray_end(t, na, ...)calls changed tof_visible_ray_end(t, int(na), ...). Pine requires typed na for non-typified function arguments.
v2.10
Break & Retest replaced with separate BRK+RT state machine, 1-2-3 across 3 bars, P pivot in current-bar stack, SFP pierce input, bounce body %, ATR band crash fixes.
History
v2.10
Break & Retest replaced with separate BRK+RT state machine, 1-2-3 across 3 bars, P pivot in current-bar stack, SFP pierce input, bounce body %, ATR band crash fixes.
- BRK+RT split: the old single BR label replaced by a two-stage state machine. BRK fires when a candle opens on one side and closes through the level by the minimum distance with sufficient body. RT fires on the next qualifying candle that returns to the broken level from the committed side. State tracked in
var array<float/int/bool>arrays (brk_lvl, brk_dir, brk_age, brk_rt). Each BRK state expires after 50 bars. Each RT fires once per BRK and is consumed. - 1-2-3 across 3 bars: pattern detection spread across bar[2] ("1" label), bar[1] ("2" label), and bar[0] ("3" in current-bar stack). All three labels must be within proximity of a ZTH level.
- P pivot folded into current-bar stack: Pivot high/low now draw in the same-bar vertical label stack as R/B/SFP/BRK/RT.
- SFP pierce threshold input:
prox_ticks_sfpadded — minimum wick pierce beyond the level required to qualify as an SFP. Default 5 ticks (changed to 30 in v2.11). - Bounce body percentage:
bounce_body_pctinput added. Requires the B candle body to be a minimum percentage of the range — same gate structure as Rejection. - ATR band crash fix:
array.size(na)crash when size was 0 before the deletion loop. Addedif array.size(lvl_band_boxes) > 0guard. Also fixed the reverse iteration crash: Pine v6 requires step > 0 — forward iteration with reverse-index access (rm_n - 1 - kpattern) used instead. - ATR band controls moved:
show_level_bandsandatr_band_multmoved to Level Management group,minval = 0.01.
v2.9
Individual proximity inputs per pattern type, ATR proximity bands around ZTH levels, single stacked label with \n per candle side, atr14 extracted to script scope.
History
v2.9
Individual proximity inputs per pattern type, ATR proximity bands around ZTH levels, single stacked label with \n per candle side, atr14 extracted to script scope.
- Per-pattern proximity inputs:
prox_ticks(global v2.8) split into individual inputs —prox_ticks_r,prox_ticks_b,prox_ticks_p,prox_ticks_123— each configurable independently. SFP and BRK gate differently (SFP by pierce, BRK by level cross) so they use separate thresholds. - ATR proximity bands:
show_level_bandstoggle andatr_band_multinput. When enabled, a translucent box is drawn around each active ZTH level with half-width ofatr14 × atr_band_mult— showing the "zone of influence" around each structural level. Default OFF. - Single stacked label per candle side: all patterns firing on the same candle side are combined into a single Pine label with newline-separated text (
\n). Eliminates pixel overlap at any zoom level without relying on y-offset logic. - atr14 extracted to script scope:
atr14 = ta.atr(14)computed once at script scope and reused by ATR bands, weekly open y-values, and label stacking offset calculations.
v2.8
Pattern proximity gate, per-pattern toggles, label stacking, Daily/Weekly vertical level fix, and weekly open toggle.
History
v2.8
Pattern proximity gate, per-pattern toggles, label stacking, Daily/Weekly vertical level fix, and weekly open toggle.
- Pattern proximity gate: R, B, P, and 1-2-3 now only fire when the relevant candle high or low is within a configurable distance (in ticks, default 20) of an active ZTH level. SFP and BR already fire at levels by definition — their detection logic is unchanged. Patterns no longer appear all over the chart, only at points of structural confluence.
- Per-pattern toggles: six new boolean toggles in the ZTH Strategy Pattern Thresholds group —
show_sfp,show_r,show_b,show_p,show_br,show_123. All default ON. Toggle any pattern type off individually without affecting others. - Pattern label stacking: when multiple patterns fire on the same candle and the same side (high or low), each subsequent label is offset vertically by ATR × 0.15 per slot, preventing overlap. HIGH side order from wick tip outward: R → SFP → BR → 1-2-3. LOW side order: B → SFP → BR → 1-2-3. P always draws on bar[1] so it cannot collide with current-bar patterns.
- Daily/Weekly vertical level fix: ZTH level rays were rendering as vertical 90° lines on Daily and Weekly charts. Root cause: the ray x2 endpoint was only 48 hours ahead of x1 — less than one weekly bar (168 hours), so both endpoints mapped to the same chart pixel. Fixed by routing ray end time through the existing
f_visible_ray_end()helper, which guarantees the x2 endpoint is at least one full chart bar ahead of x1 on all timeframes. - Weekly open vertical toggle: new
show_weekly_opentoggle in the Display More group. When off, the Sunday 18:00 ET golden vertical is hidden without affecting the underlying event tracking. Toggle includes a tooltip explaining what the line marks and when it draws.
✅ Issues Resolved in v2.8
- ZTH levels rendering as vertical 90° lines on Daily/Weekly charts.
- Patterns firing anywhere on chart (not near levels).
- Pattern labels overlapping when multiple patterns fire on same candle side.
v2.7
Pine v6 migration, 4/5 on 30min TF, 1-bar confirmation delay, pattern color system, FVG polish, H/L/C directional shadows, weekly open golden vertical line, and ETH gate overhaul.
History
v2.7
Pine v6 migration, 4/5 on 30min TF, 1-bar confirmation delay, pattern color system, FVG polish, H/L/C directional shadows, weekly open golden vertical line, and ETH gate overhaul.
- Pine v6 migration: script migrated from Pine v5 to Pine v6 using TradingView's conversion tool. Original v5 source preserved as
auto-levels_pine-v5.pine. Syntax differences include single-quoted strings, explicitarray<float>type declarations, and nativebreaksupport inforloops. - 4/5 detection on 30min TF: 4/5 session event detection moved from 15-min to 30-min scan arrays. FCR still uses the 15-min scan. Output variable names preserved for downstream compatibility. 4/5 levels on the chart are established from 30-minute bars — note this in your chart read accordingly.
- 1-bar confirmation delay: ZTH flip detection now confirms on bar[2] (the bar that just closed before the one before current), not bar[1]. Mitigation body also uses bar[2] data. This prevents the candle that just closed from immediately creating or mitigating a level — a one-candle buffer before any level influence. The third candle and beyond mitigate normally.
- 4/5 colors: today's RTH 4/5 pair is cyan (
#00bcd4), prior-day RTH pairs fade to teal. ETH maintenance (17:00) and reopen (18:00) chains render in faded teal at higher transparency to visually distinguish them from RTH pairs without adding a separate line style. - ETH 4/5 gate overhauled: the Show-ETH-Derived toggle now gates ETH 4/5 events for all instruments — including non-whitelisted instruments (GC, CL, etc.). Previously these always showed regardless of toggle state. ETH 4/5 is now always intentional.
- 4/5 in ZTH toggle: 4/5 session rails are now gated by the "Show ZTH Levels on Timeframes Above 1hr" toggle, keeping the chart clean on higher timeframe views.
- 17:00 maintenance close anchor fix: reverted to bar open (16:30 ET bar) rather than
time_close(17:00 ET). No visible bar exists at 17:00 during the CME maintenance gap — anchoring totime_closecaused the ray to appear on the 18:00 candle instead of at the actual price. - Weekly open golden vertical line: a golden (
#f39c12) vertical line now marks the Sunday 18:00 ET CME weekly reopen. Drawn full-height, 60% opacity. Lets you immediately see where the new trading week began on your chart. - Pattern label color system: each pattern type now has a distinct color — Reversal (red
#e74c3c), Bounce (green#2ecc71), Pivot high (orange#f39c12), Pivot low (lime#a8e063), SFP bearish (pink#ff6b6b), SFP bullish (teal#00b894), Break & Retest (purple#9b59b6), 1-2-3 (cyan#00bcd4). Continuation label removed. - Prior-day H/L/C directional shadows: the prior-day high line now casts a translucent red shadow band downward; the prior-day low casts a translucent green shadow band upward. Both use an 88% transparency fill so they read as context without competing with structural levels.
- FVG polish: FVG boxes no longer have visible borders. Each zone extends 5 bars to the right of where it starts, and a dashed midpoint line bisects the gap at the 50% level.
✅ Issues Resolved in v2.7
- ETH toggle bypass on non-whitelisted instruments (GC, CL, etc. — gate now requires Show-ETH-Derived to be ON for all instruments).
- 17:00 maintenance close anchor printing on 18:00 candle (reverted to bar open 16:30 anchor).
- Bar[1] levels and mitigation firing too early — shifted to bar[2] for one-candle confirmation buffer.
- Sunday 18:00 vertical line (stray unintentional vertical converted to intentional golden weekly open marker).
v2.6
4/5 dual-slot model, FCR sentinel fix, higher-TF ray geometry, close anchor fix, FCR standalone v2.0, ETH maintenance 4/5 chains, and prior-day H/L/C polish.
History
v2.6
4/5 dual-slot model, FCR sentinel fix, higher-TF ray geometry, close anchor fix, FCR standalone v2.0, ETH maintenance 4/5 chains, and prior-day H/L/C polish.
- 4/5 root cause fixed: replaced single rolling queue with two independent chains — one for 9:30 RTH open events, one for 16:00 RTH close events. The prior
sess_use_opencondition was alwaystrue, so 16:00 closes were never stored and the table showed0. Both chains now print correctly. - FCR & 4/5 sentinel fix: three sentinel variables were initialized to
na. In Pine v5,x != nareturnsna, nottrue, making the event guards permanently false. Changed all three to= 0. FCR and 4/5 now fire and print correctly. - Higher-TF horizontal rays: extended the ray x2 endpoint to 48 hours ahead. On 4-hour+ charts a 1-hour lookahead mapped to the same pixel as x1, producing vertical spikes instead of rightward rails.
- 4/5 close anchor: the 16:00 close ray now anchors to the 15:45 bar open time rather than the
time_closevalue. On RTH-only chart views the 16:00 timestamp has no visible bar and the ray was floating against the last visible candle. - Runtime crash fix:
array.size(na)on 1-min through 10-min charts. Pine v5 does not short-circuitand, so thesecurity_lower_tfnull guard now nests instead of inlining. - Toggle added: "Show ZTH Levels on Timeframes Above 1hr" (default OFF) — contextual workaround for the cross-TF detection limitation on 4hr/Daily/Weekly charts.
- FCR standalone v2.0: replaced the bar-index-based v1.0 with the same multi-TF scan + fallback model used by the main overlay. Works correctly on any chart timeframe.
- ETH 4/5 events — 17:00 close + 18:00 open: new independent chains for the CME daily maintenance window pause (16:45–17:00 bar close) and reopen (18:00 bar open). Gated by the "Show ETH-Derived Levels for Whitelisted" toggle on index futures; always active for non-whitelisted instruments. Each chain carries today / yesterday / 2 days' ago slots with the same fade pattern as the RTH chains.
security_lower_tfscan +request.securityfallback — same multi-TF architecture as 9:30 and 16:00. - Prior-day H/L/C polish: transparency increased from 30% to 50% so H/L/C reads as quiet context, not a competing structural rail. A subtle range fill (95% gray) now frames the prior-day high-to-low zone without adding visual noise.
✅ Issues Resolved in v2.6
- 4/5 showing zero (sess_use_open always true — dual open/close chains introduced).
- FCR rays not printing (sentinel variables initialized to na instead of 0).
- Vertical spikes on 4hr+ charts (ray x2 only 1hr ahead — extended to 48hrs).
- Runtime crash on 1–10min charts (array.size(na) — nested guard added).
- ETH 4/5 events (17:00/18:00) not implemented — both chains now live.
- Prior-day H/L/C too prominent (transparency increased, range fill added).
v2.5
Scoped behavior pass for exact FCR anchors, ETH/RTH sync, and 4/5 rebuild behavior.
History
v2.5
Scoped behavior pass for exact FCR anchors, ETH/RTH sync, and 4/5 rebuild behavior.
- Explicitly excludes
NKDandMZKfrom the RTH-primary whitelist. - Moves FCR capture/drawing to exact 15-minute 9:30 high, low, and time anchors.
- Updates the ETH/RTH display behavior so already-stored ETH-derived ZTH levels respond to the current toggle state.
- Lets existing 4/5 session drawings rebuild or disappear from the current display toggle instead of affecting only future prints.
- FCR rays were not printing and 4/5 table values could still read
0— root causes identified and fixed inv2.6.
v2.4
Introduced the RTH-primary ETH-visibility policy and exact 4/5 time anchoring.
History
v2.4
Introduced the RTH-primary ETH-visibility policy and exact 4/5 time anchoring.
- Whitelisted major equity-index futures and micros for the cleaner RTH-primary session view.
- Preserved the visible-level budget so hidden ETH-derived levels do not consume the on-chart count.
- Anchored 4/5 session-open drawings to exact 9:30 timing instead of looser chart-bar timing.
v2.3
Doji-safe flip handling and birth-time anchoring for ZTH rays.
History
v2.3
Doji-safe flip handling and birth-time anchoring for ZTH rays.
- Stops doji clusters from blocking the first real opposite-color flip.
- Anchors ZTH lines and labels to the actual 1-hour flip-candle time via
xloc.bar_time.
v2.1 → v2.2
Cross-timeframe consistency and alignment work for the main level engine.
History
v2.1 → v2.2
Cross-timeframe consistency and alignment work for the main level engine.
v2.1added var-tracked 1-hour history to avoid timeframe-dependent drift.v2.2tuned the confirmed higher-timeframe offsets so 1-hour and lower-timeframe views align more closely.
v2.0
Initial major attempt to address ray geometry and under-detection.
History
v2.0
Initial major attempt to address ray geometry and under-detection.
- Reworked the intent around rightward rays instead of full-width lines.
- Revisited the detection path to improve level count and chart coverage.
- The later validation notes below explain why those fixes could not yet be treated as visually final.
v1.4 → v1.6-fix
Early screenshot-driven accuracy passes plus the shift to persistent drawings.
History
v1.4 → v1.6-fix
Early screenshot-driven accuracy passes plus the shift to persistent drawings.
v1.4began the first major accuracy overhaul after initial review.v1.5staged the early source-side fixes for the first screenshot bug set, andv1.5-fixrepaired a Pine scoping issue.v1.6changed the drawing architecture so levels stayed persistent during scroll/drag, andv1.6-fixcleaned up horizontal geometry.
v1.3
Merged FCR into the main overlay while keeping a shareable companion available.
History
v1.3
Merged FCR into the main overlay while keeping a shareable companion available.
- The main indicator became a more complete “single overlay” view.
- The FCR-only companion still remained useful when a cleaner FCR-only share surface was preferred.
v1.2
Added EMAs, FVG zones, pattern labels, and prior-day context.
History
v1.2
Added EMAs, FVG zones, pattern labels, and prior-day context.
- This is the moment the script stopped being “just levels” and became a broader chart context overlay.
- It also introduced the density problem that made later display discipline more important.
v1.1
Runtime error cleanup after the first build.
History
v1.1
Runtime error cleanup after the first build.
- Short but necessary stability pass before broader feature growth continued.
v1.0
Initial Auto Levels build plus the standalone FCR companion.
History
v1.0
Initial Auto Levels build plus the standalone FCR companion.
- The project began as the move away from the older manual-input lineage toward an automatic unified overlay.
- That original split between the main overlay and an FCR-only companion still shapes the family today.
Known issues and validation boundary
Recent Implementations & Auditing
🔎 Still open after v3.0.2
- Previous-day 16:00 close ray vertical on RTH chart: yesterday's close 4/5 ray renders as a vertical post on some RTH 1hr chart configurations. Under continued observation.
- KEY level vertical post on Weekly chart (current week): a KEY level near the current week boundary can render as a vertical post at the start of the upcoming week bar. Likely a ray-end time snapping issue on Weekly — the x2 endpoint lands at the bar start rather than mid-bar. Under investigation.
- QI 3rd candle mitigation: bar[2] mitigation code is in place; needs runtime confirmation that the QI instrument mitigates correctly on the third candle in live chart testing.
- 1-2-3 "1" and "2" label overlap on congested charts: bar[2] and bar[1] labels draw on historical bars outside the current-bar stack, so vertical stacking via \n is not available. The
yloc.abovebar/belowbarapproach (v2.17) helps but does not eliminate all overlap. - BRK/RT mutual exclusion nuance: RT suppresses the BRK label when both fire on the same candle side — but a new BRK in an unrelated succession should not be suppressed by a prior RT. Per-level rather than per-side logic needed.
This changelog documents source history, keeping what'simplemented in repo separate from what's observed live on chart so unresolved behavior does not get mislabeled as fixed.
Roadmap
Planned and deferred features
v2 is locked as a stable public release. Every bug found through live testing has been addressed — the 4/5 session rail system is solid. v3.0.0 begins a new chapter: architectural changes that were deliberately deferred from v2 because they touch the foundational level lifecycle itself, plus a new class of level derived from Heikin Ashi candle color-flips, and a unified color language that makes context visible at a glance regardless of session mode.
🏗️ Level retention — dormant buffer
The most impactful architectural change. Trimmed levels move to a dormant buffer instead of being permanently deleted, preserving mitigation state when price reclaims the zone.
🎨 Unified color language — RTH / ETH / HA
Completes the cyan/teal/golden color split across the full level stack — cyan for RTH-derived, teal for ETH-derived, and soft yellow/gold for the new Heikin Ashi class.
✨ Heikin Ashi levels — 3rd level class
A new level class born from Heikin Ashi 1hr color-flips — independent overlay layer with soft yellow (RTH) and golden (ETH) coloring, participating in the same proximity and mitigation system.
🔧 Carried-forward bug fixes
4 open items carried into v3 scope: 5/5 not downgrading after body mitigation, 17:00 4/5 vertical position intermittent, previous-day 16:00 close ray vertical on RTH chart, and QI 3rd candle mitigation confirmation.
🏗️ Architectural — security_lower_tf("60") scan
- Replace the
request.security1hr flip-detection path with asecurity_lower_tf("60")scan loop. This is the single fix that unblocks the 1hr ETH missing-levels issue on GC/CL and the 4hr+ sparse-detection gap. Bundled into v3.0.0 scope as it touches the same level-creation pipeline as the dormant buffer work.
📝 Deferred features
- ATR-based per-level shadow bands on individual ZTH levels: a per-level translucent fill centered on each KEY/5/5/3/5 level, with band width proportional to the instrument's current ATR. This is distinct from the directional PDH/PDL fills shipped in v2.7. Not yet scoped for implementation.
- ETH 4/5 pattern level support: the 4/5 pattern toggle (v2.20) covers RTH session prices only (9:30 open and 16:00 close). ETH maintenance window (17:00 close, 18:00 reopen) prices are not yet included in pattern proximity. Deferred until ETH 4/5 today/yesterday/day-before tracking vars are added.
✨ Additional features deferred to v3
- ETH 4/5 pattern level support: extend the 4/5 annotation system (17:00 maint + 18:00 reopen) to the pattern proximity detection, not just the draw chain.
- ATR-based per-level shadow bands: translucent fill ±ATR around each KEY/5/5 level. Broad directional fills shipped in v2.7; targeted per-level bands deferred to v3.
- BRK/RT succession nuance: per-level mutual exclusion so a BRK on a new level is not suppressed by RT from a prior state on the same candle side.
- 1-2-3 label y-offset: small ATR-based vertical offset for historical "1" and "2" labels to reduce overlap on congested charts.
Name history and paired guide
The only name-history context that still matters publicly
Earlier names you may still see
Older notes or screenshots may still refer to the indicator as zth_auto_levels.pine or fcr_levels.pine - path is historical only.
Need the manual instead?
The paired guide is where the settings map, level legend, and usage workflow live. Keeping those topics separate is what lets this page stay revision-first.