Advanced Support and Resistance with Reversal [AlphaPine]Advanced Support and Resistance with Reversal | AlphaPine
I built this indicator for a simple reason: a breakout line on its own does not tell me enough. I also want to know whether price comes back, holds the level from the other side, and later loses it again.
The script starts with confirmed swing highs and lows. Those become resistance and support. It then follows each level through three possible events: breakout, retest, and failure. Nothing here predicts the next move. It is a way to keep market structure organised without redrawing the same levels by hand.
The image below shows the full level lifecycle in one view, including the symbols that appear at each stage:
How a level is created
A resistance level comes from a confirmed pivot high. A support level comes from a confirmed pivot low. If zones are enabled, the zone uses the wick range of the pivot candle rather than an arbitrary fixed width.
Pivot confirmation takes time. With Pivot Length set to 10, for example, the script needs ten bars on the right side of the pivot before the level exists. This delay is intentional.
Pivot Length controls how selective the swing detection is. A larger value usually gives fewer levels and confirms them later.
Lookback Period sets how long a level remains in the script's working history.
Maximum Levels per Type limits stored resistance and support records so the chart does not keep growing indefinitely.
Wick Dominance Filter keeps only pivot candles whose rejection wick is larger than the body and opposite wick.
Merge Nearby Active Levels removes clutter by skipping a new pivot when an active level of the same type is already nearby. Broken levels do not block a fresh one.
The merge distance uses ATR-14, so it adjusts to the instrument instead of relying on one fixed price interval.
Breakouts
The default breakout mode is Close . Resistance must close above its boundary, while support must close below it. This avoids counting every small wick through a level.
Wick mode reacts earlier. It triggers when the high or low crosses the boundary during the live candle. The recorded extreme cannot retract, but price can still close back inside the level, so Wick mode will naturally include more intrabar fakeouts.
Breakout Buffer adds an optional ATR-based distance beyond the level. Leave it at zero for the exact boundary, or raise it if very small breaks are not useful for your chart.
By default:
A resistance breakout prints an upward blue triangle below the candle.
A support breakout prints a downward orange triangle above the candle.
The marker colours are fully adjustable.
Retests and role reversals
After resistance breaks, the script waits to see whether price can retest it as support. After support breaks, it watches for the same level to act as resistance.
RS means old resistance has been confirmed as new support.
SR means old support has been confirmed as new resistance.
Reversal Confirmation controls what counts as a retest:
Close (default) requires the retest candle to touch the original zone and close back beyond the whole zone on the new-role side.
Touch accepts any later overlap with the zone. It is more sensitive and less strict.
Once confirmed, the new role stays fixed. An RS level remains tracked as support; it does not turn red merely because the latest candle happens to sit below it.
When a flip fails
A flipped level is removed when a confirmed candle closes through the far side of its zone. In other words, RS support fails below the zone and SR resistance fails above it.
If Show Reversal Failures is enabled, an ✕ marks the failure candle. The flipped line stops there, but the cross stays on the chart as a record of where the level died. That is why a failure cross can appear without a continuing line.
Breakout triangles and failure crosses use the original pivot as their Lookback anchor. This keeps their expiry on the same structural clock as the level they came from instead of giving every marker a new lifetime from its event candle.
Reading the chart
R1 is the nearest active resistance above price, followed by R2, R3, and so on.
S1 is the nearest active support below price, followed by S2, S3, and so on.
RS marks a confirmed resistance-to-support flip.
SR marks a confirmed support-to-resistance flip.
Triangles mark breakouts. Crosses mark failed flips.
A breakout marker is an event, not an entry instruction. I find the retest more useful than the first break, but how it is traded still depends on trend, execution, and risk rules outside this indicator.
Lines, zones, and historical placement
Historical Level Start decides where an original level begins:
Confirmation (default) starts it on the bar where the pivot became known in real time.
Pivot extends it back to the swing candle. This is useful for visual context, but the level was not available on that earlier candle.
Display as Zones replaces the single-price lines with the original pivot-wick range. If that level flips, the same price range is preserved; the zone is not moved to the opposite side of the price.
Colours
The Colors group separates colours by purpose, so changing a label does not force the matching line to use the same colour.
Resistance and support lines/zones.
RS and SR lines/zones.
Resistance, support, RS, and SR price labels.
Resistance and support breakout triangles.
Support and resistance failure crosses.
Zone fills and borders use transparent versions of the selected line colour so candles remain visible underneath.
Alerts
Seven alert conditions are included:
Resistance Breakout
Support Breakout
Resistance to Support Flip
Support to Resistance Flip
Flipped Support Failed
Flipped Resistance Failed
Any S/R Event
The combined alert is useful when one alert should cover every structural event. Separate conditions are available when different actions are needed for breaks, flips, or failures.
A sensible starting setup
The defaults use Close confirmation for both breakouts and retests. Start there if you prefer signals that wait for the candle to finish. Wick breakout and Touch retest are available when earlier, more sensitive reactions are more important.
If the chart feels crowded, try increasing Pivot Length, increasing Merge Distance, enabling the Wick Dominance Filter, or reducing Maximum Levels per Type. Settings should be adjusted for the instrument and timeframe rather than treated as universal values.
Important limitations
Confirmed pivots always arrive late by Pivot Length bars. That is how pivot confirmation works, not a hidden predictive signal.
Pivot historical placement back-draws a confirmed level for context. Use Confirmation placement when real-time availability matters.
Wick mode can mark a breakout that later closes back inside the level.
The current-bar drawings rebuild while the candle updates.
The script uses chart data only. It does not request higher-timeframe data or use lookahead.
It does not place orders, calculate position size, or guarantee that a level will hold.
Use it as a structure tool, then apply your own trade plan and risk management.
Indicator

Linear GANN 2.0 - Adib NooraniLinear GANN 2.0 is a clean, visually unobtrusive indicator designed to automatically plot key mathematical price levels on your chart. Instead of manually drawing horizontal lines every day, this script instantly applies a massive array of predefined Gann-based numerical levels, saving you time and keeping your analysis consistent.
The Math Behind the Indicator
TradingView requires transparency in how indicators are calculated. This script does not use moving averages or volume; instead, it plots a hardcoded sequence of mathematical values inspired by Gann theory and the Square of Nine.
If you look at the underlying array, the price levels follow a distinct geometric sequence based on squares. The pattern alternates between perfect odd squares and even squares plus one:
1
5 (which is 2² + 1)
9 (which is 3²)
17 (which is 4² + 1)
25 (which is 5²)
37 (which is 6² + 1)
...and so on, scaling all the way up to accommodate high-value assets like Bitcoin or major indices.
How to Use It in Your Trading
Because these numbers act as psychological and mathematical pivot points, traders can use these lines as traditional Support and Resistance zones.
1. Trend Continuations - If the price breaks cleanly above a Gann line and retests it, that level often flips from resistance to support. The next line up becomes your logical take-profit target.
2. Reversals - Watch for exhaustion or liquidity sweeps around these exact levels. If price wicks heavily at one of these lines, it can signal a potential reversal.
Key Features
Dynamic Labels - To prevent chart clutter, the price labels are coded to constantly push to the far right edge of your screen, mimicking the native price scale.
Infinite Lines - The lines use the `extend.both` property, meaning no matter how far back or forward you scroll, your levels are always there.
Customization - Fully customizable line thickness and colors to match both dark and light themes, with a toggle to turn labels on or off.
Always use candlestick patterns or consolidation breakouts around the GANN levels to enter with good Risk : Reward Indicator

Indicator

Candlestick Edge Auto-Preset MTF Self-CalibratingCandlestick Edge only fires a candlestick pattern when it is "rightly placed" — confirmed by a higher-timeframe trend AND by where price sits in the developing volume profile. Then it does what most pattern tools don't: it forward-tests every signal and reports the MEASURED edge per pattern, so you read realized performance instead of a marketing claim.
WHY THIS IS ONE TOOL (not a bundle)
The parts answer one question about one candle: "is this pattern in a place that has historically paid, and does it beat a coin-flip here?"
PATTERN detection says WHAT printed (24 classic candlestick patterns).
HTF ALIGNMENT says whether the bigger trend agrees.
VOLUME-PROFILE POSITIONING says WHERE it printed — reversals only at value-area edges, naked POC, HVN support/resistance, or liquidity sweeps; continuations only through low-volume voids or on a value breakout.
The CALIBRATION SPINE forward-resolves each signal with a triple barrier and reports Hit% vs a matched Base% (Edge) with a Wilson confidence interval, so a placed-and-confirmed pattern can be told apart from a small-sample fluke.
One pattern substrate, one location read, one calibration spine.
MEASUREMENT (the differentiator)
Each signal opens at close with target = ±TP·ATR, stop = ∓SL·ATR, over a fixed horizon. The first barrier touched decides win/loss (same-bar tie counts as the stop — conservative). Base% is the unconditional same-barrier win-rate for that direction. Edge = Hit% − Base%; a "*" marks rows whose Wilson 95% lower bound clears the base rate. A leave-one-out row prices each filter's marginal contribution, and a footer lists only the patterns that are green AND have enough samples to trust in the current configuration.
AUTO PRESET (default on)
Candlestick edges are timeframe-specific. Auto Preset reads the chart's timeframe and switches on the pattern subset plus higher-timeframe distance that performed best for that timeframe in the author's study of NSE index futures, and forces the two filters on. Turn it OFF for full manual research mode: all 24 patterns selectable, filters and HTF distance (3x / 5x / 15x / custom) under your control. Nothing is ever removed — the preset only curates which patterns are active by default per timeframe.
HOW TO USE
Leave Auto Preset on and read the labelled signals (teal = bullish, red = bearish, each tagged with the pattern name). Open "Show scoreboard" to see measured Edge per pattern — trust the EDGE column and the "*", never a raw hit-rate. Best behaviour is on intraday timeframes (1H and below).
ORIGINALITY
Standard techniques are credited below. What is original is the combination: a location-gated pattern engine whose every signal is forward-calibrated, a timeframe-adaptive auto-preset, a leave-one-out filter attribution, and an auto-surfaced tradeable set — measured edge, not asserted.
NON-REPAINT
Signals open on confirmed bars; triple-barrier outcomes resolve on bars AFTER the trigger; all higher-timeframe / lower-timeframe / prior-day-POC requests use lookahead_off and confirmed intrabars. Pivots used by sweeps confirm first.
DATA & MARKETS
Runs on any symbol that reports volume; the developing profile needs volume to be meaningful. Defaults are tuned for intraday index futures. On the Enhanced data tier the delta read uses intrabar aggregation (richer on paid plans) and auto-falls-back to an OHLCV proxy when intrabars aren't served — safe to leave on for any plan.
CONCEPT CREDITS (methods operationalized — original Pine re-derivations)
Candlestick patterns — Nison; pattern-performance framing per Bulkowski
Market / auction profile, POC / Value Area — Steidlmayer; Dalton
Bulk Volume Classification — Easley, Lopez de Prado & O'Hara (2012)
Triple-barrier labelling — Lopez de Prado
Wilson score interval — Wilson (1927)
HONESTY / LIMITS
The profile is an ATR-binned developing session profile (not tick POC). Delta is an estimate (proxy or intrabar reconstruction), not true bid/ask. Reported edge is context measured on loaded history — not a prediction or a promise. The preset defaults were tuned on one instrument over a recent window, so treat them as a well-measured hypothesis, not proven alpha.
Educational tool. Not financial advice — you alone are responsible for your trading decisions. Indicator

Chart Narrator [verticetrading]An analyst that writes. Chart Narrator reads your chart and describes it in plain sentences — no cryptic numbers, no jargon.
◆ WHAT IT DOES
It turns the chart into a written briefing: main trend and whether the higher timeframe agrees, unusual calm or agitation in volatility, the last structural break in plain words, nearest tested support/resistance with distances in %, fresh candlestick patterns, and volume participation. Everything is summarized in a bias header with a conviction score ("BULLISH — 4 of 5 signals point the same way").
◆ HOW IT WORKS
Six evidence modules (trend + higher-timeframe confirmation, volatility ranking, market structure, merged pivot levels weighted by touches, candlestick patterns, volume vs its average) each produce a verdict and the numbers behind it. A narration engine turns them into sentences, stays silent when a module has nothing to say, and detects confluences between modules (e.g. a bullish pattern printed on a tested support) to flag higher-quality situations. With enough history it also adds a day-of-week tendency note with its sample size.
◆ HOW TO USE IT
Add it to any symbol and timeframe. Read the panel top to bottom: bias first, evidence after. Set the "Bias flip" alert to receive the full written analysis when the overall picture changes. Interface in English and Spanish.
◆ WHAT MAKES IT ORIGINAL
Indicators show numbers; this one explains itself. Every sentence cites its evidence, only confirmed bars are narrated (no repainting), and the panel says "mixed, no clear edge" when that is the truth.
◆ LIMITATIONS
It describes the present; it does not predict. Not financial advice.
────────────────────────
ESPAÑOL — El analista que escribe
Convierte el gráfico en un informe escrito: tendencia y si la temporalidad mayor la confirma, calma o agitación inusual de la volatilidad, la última ruptura estructural en palabras llanas, soporte/resistencia más cercanos con distancias en %, patrones de velas recientes y participación del volumen — todo resumido en un sesgo con puntuación de convicción ("ALCISTA — 4 de 5 señales apuntan en la misma dirección"). Seis módulos de evidencia alimentan un motor de redacción que calla cuando no hay nada que decir y detecta confluencias entre señales. Solo narra velas confirmadas (sin repintado). Interfaz en inglés y español. Describe el presente, no predice; no es asesoramiento financiero. Indicator

MT BarColor TrackerMT BarColor Tracker 🎨
A clean, lightweight tool that colors your bars based on Master Trend alignment — instantly showing you the market's directional bias at a glance. 🟢🔴⚪
🔹 How it works:
Bars turn green when EMA4, RSI, and price are aligned bullish across EMA21/SMA50/EMA55/EMA89/EMA750, red when everything aligns bearish, and grey when the trend is mixed/neutral. 🎯
🔹 Features:
✅ Automatic Long/Short entries on trend transitions (Neutral → Bull/Bear)
✅ Exit signals when trend returns to Neutral
✅ Visual trade boxes 📦 showing entry-to-exit range (green = win, red = loss)
✅ Entry/exit labels with pip results 🏷️
✅ Live floating P&L while in an active trade 💹
✅ Full performance stats table: trades, win rate, net pips, avg win/loss, avg R:R, and max win/loss streaks 📈🔥
A simple, visual way to track how price behaves around Master Trend shifts — no clutter, just color-coded clarity. ⚡ Indicator

Indicator

Market Sessions, Asia, EU, US v0.1.1Market Sessions — Asia / EU / US: session highlights + attribution stats
WHAT IT DOES
Shades the chart background during each major market's business hours — Asia (Tokyo), EU (London), US (New York). Plenty of scripts do that; the point of this one is the rolling attribution table, which shows which market's hours are actually driving price rather than leaving you to eyeball it.
HOW IT WORKS
- Sessions are defined in each market's local IANA timezone (Asia/Tokyo, Europe/London, America/New_York), so daylight-saving shifts are handled automatically — no hardcoded UTC offsets that drift twice a year.
- Overlapping sessions blend visually; the London/NY overlap shows as a mixed tint.
- For each market, the script records every completed session's open→close return and high–low range over a rolling window of N sessions (default 20).
READING THE TABLE
- Avg % — mean session return: directional bias.
- Rng % — mean session range as % of session open: energy/participation, direction-agnostic.
- Win % — share of sessions closing positive.
- Cum % — summed returns across the window.
High Rng with near-zero Avg means that session produces chop, not leadership. High Rng with consistent Avg/Cum means that market is driving the trend.
SETTINGS
Each session's hours, timezone and colour are editable. A weekdays-only filter (default on) excludes Sat/Sun — desks are closed, so weekend action shouldn't be attributed to any market. Stats are computed on standard OHLC via ticker.standard(), so the numbers stay honest even on a Heikin Ashi chart.
NOTES
Intraday charts only. Stats cover completed sessions; the live session isn't counted until it closes. Attribution is regime-dependent — leadership rotates — hence a rolling window rather than all-history stats. Defaults: Tokyo 09:00–18:00, London 08:00–16:30, New York 09:30–16:00, all local time. Indicator

ICT Atlas - Execution ToolkitICT Atlas — Liquidity Execution Toolkit
Use best with #ICTPulse
ICT Atlas is an execution-focused visual toolkit for discretionary ICT-style futures traders. It is designed to organize session liquidity, timed intraday windows, SMT divergence, liquidity sweeps, and post-sweep market structure confirmation in one workflow.
This script is not an automated trading system and does not issue buy or sell signals. Its purpose is to help traders visually follow a sequence of conditions often used in manual execution:
1. Identify session liquidity.
2. Observe whether liquidity is swept.
3. Check for SMT divergence.
4. Wait for market structure confirmation after the sweep.
5. Use the trader’s own entry and risk model.
How it works
The script tracks Asia, London, and New York sessions using the selected timezone. At the end of each session, it records the session high and low, then extends those levels to the right side of the chart. These levels are labeled as AH/AL, LH/LL, and NYH/NYL.
Liquidity sweep detection is based on price interacting with those stored session levels. The user can choose between a simple wick-touch condition or a stricter wick-and-close-back condition. This allows the trader to decide whether a sweep should mean only that price traded through a level, or that price traded through the level and then rejected back inside it.
The SMT module compares the active chart symbol with a user-selected comparison symbol. It uses pivot highs and pivot lows to detect divergence between the two markets. A bearish SMT condition appears when one market makes a higher high while the comparison market does not confirm. A bullish SMT condition appears when one market makes a lower low while the comparison market does not confirm.
The MSS/BOS confirmation module only becomes relevant after a liquidity sweep. After a valid high-side or low-side sweep, the script waits for price to break a recent swing level within the configured expiry window. This is intended to separate simple liquidity touches from situations where structure later confirms a possible shift.
The micro-box module highlights recurring intraday timing windows from :50 to :10 using the selected timezone. During each micro window, the script tracks the high, low, and midpoint of that window, allowing traders to study reactions around specific time-based execution windows.
Main features
* Asia, London, and New York session tracking
* Previous session high and low levels
* AH/AL, LH/LL, and NYH/NYL labels
* Liquidity sweep labels
* Wick-touch or wick-and-close-back sweep modes
* SMT divergence using a comparison symbol
* Post-sweep MSS/BOS confirmation
* ICT-style micro timing boxes from :50 to :10
* Optional alerts for sweeps and structure confirmation
* Adjustable colors, line widths, lookbacks, and object limits
How to use it
ICT Atlas is best used on lower timeframes such as 1-minute, 3-minute, and 5-minute charts.
Suggested workflow:
1. Mark the latest session highs and lows.
2. Watch for a sweep of Asia, London, or New York liquidity.
3. Check whether SMT divergence is present between the chart symbol and the comparison symbol.
4. Wait for MSS/BOS confirmation after the sweep.
5. Apply your own entry model, invalidation, and risk management.
This script is intended for educational and analytical use only. It does not provide financial advice, trade recommendations, or guaranteed outcomes. Futures and financial market trading involves risk.
Indicator

Last Day Candle Range Marker Version IIIThe Last Day Range Marker Version III is designed to visualize important price ranges from both the previous trading day and the current chart timeframe.
Features
• Displays the Previous Day High and Previous Day Low as customizable horizontal lines.
• Optionally highlights the previous day's range with a colored box.
• Displays the High and Low of the current chart timeframe candle.
• Optional range box for the current timeframe candle.
• Calculates and displays the percentage range (High–Low) for both the previous day and the current timeframe.
• Fully customizable colors, line styles (Solid, Dashed, Dotted), and line widths.
• Adjustable line length to the left and extension to the right.
• Individual on/off switches for the Previous Day and Timeframe sections.
• Clean labels showing High, Low, and percentage range directly on the chart.
Benefits
• Quickly identify important support and resistance levels.
• Compare the previous day's range with the current timeframe's price action.
• Ideal for breakout, range, momentum, and intraday trading strategies.
• Works on all symbols and all TradingView-supported timeframes.
The indicator is lightweight, easy to customize, and helps traders keep the most relevant price levels visible without cluttering the chart.
Indicator

T4T High Probability Order BlocksMost order block indicators mark every last opposing candle before a move. This one doesn't. My HP-OB indicator only plots an order block when the full sequence that give OB its meaning is present - liquidity taken, displacement, and a FAVG - so what's on your chart is a shortlist, not a wallpaper.
How an OB qualifies
A bullish OB requires three consecutive candles to each do their job:
1. The OB candle - bearish candle that engages sell-side liquidity: a lower against recent price, a raid of a prior swing low, or a tap of equal/relatively equal lows. It must also hold the extreme move.
2. The displacement candle - a candle with real conviction.
3. The confirmation candle - its close must leave a clean FVG behind - No gap > No order block!
Everything is mirrored for bearish OBs. Nothing plots until the confirmation candle closes - no repainting, no provisional boxes.
Zone management
Zones extend forward until price interacts with them. A tap into the zones dims after the OB has been tested; a close through the far side retires it. Delays for both are configurable, and stale zones are automatically pruned so charts stay readable.
Settings
Pivots sensitivity, displacement strength, equal-level tolerance, and lower -lower lookback are all adjustable, along with zone boundaries, colours, and optional FVG boxes.
Alerts
Four built-in conditions: new bullish OB, new bearish OB, and first test of either - so you can wait for price to come to your level instead of chasing.
This tool mark structure; it doesn't make decisions. Fewer, cleaner zones and the discipline to wait for them - #PatiencePays Indicator

Indicator

Indicator

Indicator

Indicator

JJB OTT Alert RelayJJB OTT Alert Relay
A bridge indicator that exposes Optimized Trend Tracker (OTT) Buy/Sell signals as alert conditions for automated webhook notifications.
🔍 What This Does
The Optimized Trend Tracker by TradingView generates clean Buy/Sell crossover signals but doesn't expose alertcondition() natively. This relay indicator mirrors the OTT's Support and OTT lines, detects crossovers, and surfaces them as alert conditions — so you can catch signals via webhook, email, or push without watching the chart.
🟢 Buy Signal: Support line crosses above OTT line
🔴 Sell Signal: Support line crosses below OTT line
⚙️ Setup (One-Time, 60 Seconds)
1. Add both indicators to your chart:
The original Optimized Trend Tracker (Community Script)
This JJB OTT Alert Relay
2. Wire the inputs:
Open JJB OTT Alert Relay → Settings → Inputs
Set "Support Line" → #1 Optimized Trend Tracker: Support Line
Set "OTT Line" → #1 Optimized Trend Tracker: OTT
3. Verify the match:
Both indicators should show identical Support and OTT values in the Data Window. If they match, the relay is wired correctly.
🔔 Creating the Alert
Open TradingView's Alert dialog
Condition → "Any alert() function call"
Select "JJB OTT Alert Relay" as the source
Paste your webhook URL
Use this JSON message template:
{"topic":"JJB BTC OTT","title":"BTC OTT {{strategy.order.action}}","message":"OTT Signal: {{strategy.order.action}} | Price: {{close}} | Interval: {{interval}}","tags": ,"passphrase":"YOUR_WEBHOOK_PASSPHRASE"}
Replace YOUR_WEBHOOK_PASSPHRASE with your actual webhook passphrase. The {{strategy.order.action}} placeholder resolves to "buy" or "sell" on each crossover.
Set expiration (default 30 days) and create.
💡 One alert covers both signals. No need for separate buy/sell alerts.
📊 Signal Logic
Condition Signal Meaning
Support ↑ crosses above OTT 🟢 BUY Trend turning bullish
Support ↓ crosses below OTT 🔴 SELL Trend turning bearish
This is a trend-following system — signals are infrequent (typically 2-4 per quarter on daily timeframe) but high-quality. Each signal confirms a structural shift, not noise.
📌 Tips
Daily timeframe is the sweet spot — lower timeframes generate more noise
The relay mirrors the original OTT exactly — it doesn't recalculate
If you change OTT's settings, the relay picks them up automatically via the wired inputs
The plot on your chart confirms the wiring: green line = Support, blue line = OTT
🔧 Requirements
Original Optimized Trend Tracker indicator on the same chart
Basic Pine Script v5+ (TradingView)
Author: JJB | Version: 1.0 Indicator

Indicator

Indicator

Indicator

Indicator

HTF Candle Architecture [MQLSoftware]HTF Candle Architecture overlays up to three higher-timeframe candles simultaneously on any chart, rendering each at full structural fidelity — body, wicks, and open mid-line — and extending the live candle in real time as bars print. A right-side panel shows the bias, range position, and cross-timeframe alignment for all active levels. Level-touch signals mark when price closes near a key HTF boundary.
This is a visual analytical tool intended for chart reading and structural context. It does not execute trades and does not provide financial advice.
Key Features
Three simultaneous HTF levels, auto-selected from the standard timeframe ladder above the chart, with an override for manual pinning
Three display modes per level: Candles (body box + wicks), Bars (H-L spine with open/close ticks), and HL (high and low range lines only)
Live candle extends in real time — the body, wicks, and projection lines follow price as the current HTF period develops
OHLC Projection lines project the current HTF candle's High, Low, Open, and Close as dotted levels to the right, labeled with the timeframe and price
Range Position gauge — a filled-block bar (`████░░░ 71%`) showing where price sits inside each HTF candle's range; extremes (above 80% or below 20%) highlight in amber
Alignment row — cross-timeframe bias summary: ↑↑ ALIGNED when all enabled levels agree bullish, ↓↓ ALIGNED when all agree bearish, ⇅ MIXED when they conflict
Level-touch signals — fires when price first closes within a configurable ATR threshold of a HTF High, Low, or Open; one signal per HTF candle, per level
HTF Bias Background — subtle background tint matching the primary level's direction (blue for bull, red for bear)
Four alert conditions, all confirmed-bar only
Core Concept
Most HTF candle overlay scripts show a single timeframe. The useful information in a multi-timeframe view is not just that a candle exists at a higher timeframe — it is the structural relationship between that candle and the current position of price, repeated across multiple timeframes at once.
This indicator builds that view directly. Three independent HTF levels render simultaneously with separate depth cues: the closest timeframe uses a lighter body and thinner border; deeper timeframes use heavier borders and darker fills, so the layered structure reads without confusion at a glance.
The range position gauge is the specific addition that single-timeframe tools miss. Whether price is at 91% or 47% of the current Weekly candle's range changes the structural read. The gauge answers that for all three active levels without requiring the user to manually measure.
The alignment row adds the cross-timeframe read in a single line. When all enabled timeframes agree on direction, a single colored label replaces the need to read each row and compare manually. When they conflict, ⇅ MIXED in amber flags it explicitly so a false conviction read is not made.
The level-touch signal system layers actionable entries on top of the structural view. It applies a zone-entry filter — the signal fires only when price moves into the zone on this bar, not while it is already inside — and a per-period gate that allows at most one signal per active HTF candle per level. Combined, these two filters remove the signal spam that plagues basic proximity alerts.
Anatomy of the Display
HTF candle bodies are box objects spanning the HTF period's bar range. The live body updates right-edge and color on every bar. Closed candles are committed once the HTF period ends and stay anchored.
Wicks are line objects centered within the body's bar range, connecting the body edge to the High or Low. In Bars mode, the same lines form the H-L spine, open tick, and close tick of a standard bar representation.
The open mid-line is a dashed horizontal line at the Open price inside the body, visible when the body height exceeds 5% of ATR14, so it is suppressed on doji-like candles where it would overlap the border.
OHLC Projection lines are dotted horizontals extending from the HTF period start to `bar_index + N bars` (configurable). Each carries a tiny label on the right showing the timeframe abbreviation, level name, and price. They update every bar, so they track the live candle's developing values until the period closes.
The panel occupies the top-right corner. Rows 1-3 show the active timeframe, its bias (↑ BULL / ↓ BEAR), and the range position gauge. Row 4 shows the alignment verdict with a colored background. Rows 5-6 show the last signal fired. The header row shows the ticker.
Level-touch signal arrows appear below or above the bar that closes near a HTF level: ▲ for a Low touch (potential support), ▼ for a High touch (potential resistance). Signal size scales with HTF depth: L1 uses the smallest arrow, L3 the largest.
Notes on Repainting
HTF candle visual rendering uses `request.security` with `lookahead=barmerge.lookahead_on`. The live body and wicks update intrabar as the current HTF candle develops. This is display-only and is the standard practice for visualizing a forming HTF candle. The `lookahead_on` value is never used in any signal condition.
All signals are gated by `barstate.isconfirmed` and fire only on closed bars, never intrabar.
Zone-entry filter : a signal fires only if `math.abs(close - level) <= threshold` on this bar AND `math.abs(close - level) > threshold` on the prior bar. Price must move into the zone on this bar; already being inside the zone does not retrigger.
Per-period gate : a boolean flag resets at the start of each new HTF candle and is set on the first signal. At most one signal fires per HTF period per level.
Alerts are gated by `barstate.isconfirmed` and fire once per confirmed bar.
Typical Analysis Workflow
A common analytical workflow may include:
Checking the alignment row to establish a directional context — ↑↑ or ↓↓ ALIGNED suggests all active timeframes agree; ⇅ MIXED means caution
Reading the range position gauge to see whether price is extended (above 80% or below 20% of the HTF range, highlighted in amber) or mid-range
Watching the OHLC projection lines for the current session's active levels — these are the structurally meaningful prices for the live HTF candle
Noting level-touch signals as markers where price has closed near a key HTF boundary; combine with other analysis to assess significance
Configuration
Auto Timeframes — when enabled, selects the three most relevant standard TFs above the chart automatically. Disable to pin timeframes manually per level.
Candles to Show — how many closed HTF candles to keep on chart per level. Older candles are removed as new ones close.
Display Type — Candles, Bars, or HL. Applied to all levels simultaneously.
Per level (HTF 1 / 2 / 3) — enable/disable, custom timeframe, body opacity (0=opaque to 95=near-transparent), and separate bull/bear color pickers.
Visual group — show/hide wicks, mid-line, timeframe labels, live-candle highlight, bias background, anchor dots at period starts, and new-period shade.
Projections — show/hide H, L, O, C levels independently; extend-right bars; price labels on/off.
Panel — show/hide.
Signals — show/hide; touch threshold as ATR multiplier (0.05–1.0); H/L and Open toggles per level independently.
Markets and Timeframes
Works on any instrument and timeframe where at least one higher timeframe exists above the chart:
Forex
Stocks and Indices
Commodities
Cryptocurrencies
Auto timeframe selection scales from 1m charts (1H / 4H / D auto) through Daily (W / M auto). At the top of the timeframe ladder, fewer than three higher timeframes exist and the unused levels can be disabled.
Alerts
HTF 1 H/L Touch — price closed near HTF 1 High or Low
HTF 2 H/L Touch — price closed near HTF 2 High or Low
HTF 3 H/L Touch — price closed near HTF 3 High or Low
Any HTF H/L Touch — price closed near any active HTF High or Low
All alerts fire on confirmed bars only. Indicator

Indicator

Indicator
