KillZones & Sessions with AlertsKill Zones & Sessions with Alerts
This TradingView indicator provides comprehensive visualization and alerting for major trading sessions and their associated "kill zones" - periods of high liquidity and price volatility that institutional traders often target.
Based on the great work done by TFlab
Key Features:
1. Four Major Trading Sessions:
Asia Session (2300-0600 UTC) - Sydney + Tokyo markets
London Session (0700-1425 UTC) - Frankfurt + London markets
New York AM Session (1430-1925 UTC)
New York PM Session (1930-2255 UTC)
2. Kill Zones:
Each session includes a "Kill Zone" - the most active trading period within that session:
Asia Kill Zone: 2300-0355 UTC
London Kill Zone: 0700-0955 UTC
NY AM Kill Zone: 1430-1655 UTC
NY PM Kill Zone: 1930-2055 UTC
3. Market Open Zones:
Highlights the first 5 minutes (configurable 1-60 minutes) after each session starts
Shows high/low range with colored boxes and labels
Helps identify initial volatility and price discovery periods
4. Visual Elements:
Session Boxes: Color-coded boxes showing high/low ranges for each session
Kill Zone Overlays: Highlighted areas within sessions showing peak activity times
Dynamic Lines: Track session highs and lows that update as price moves
Optional Volume/Time Info: Display bars, duration, and volume statistics for each session
5. Alert System:
Configurable alerts for session starts (8 total toggles)
Separate alerts for each kill zone start
Once-per-bar frequency to avoid spam
Use Cases:
Identify optimal trading times based on your strategy
Track institutional activity during kill zones
Monitor session breakouts and breakdowns
Set alerts to catch market opens and high-volatility periods
Analyze price behavior across different global markets
The indicator is fully customizable with color coding for each session, toggle switches to show/hide elements, and adjustable market open duration.
Циклический анализ
Moving Average Ribbon (10x, per-MA timeframe)A flexible moving‑average ribbon that plots up to 10 MAs, each with its own type, length, source, color, and independent timeframe selector for true multi‑timeframe analysis without repainting on higher‑timeframe pulls.
What it does
Plots ten moving averages with selectable types: SMA, EMA, SMMA (RMA), WMA, and VWMA.
Allows per‑line timeframe inputs (e.g., 5, 15, 60, 1D, 1W) so you can overlay higher‑ or equal‑timeframe MAs on the current chart.
Uses a non‑repainting request pattern for higher‑timeframe series to keep lines stable in realtime.
How to use
Leave a TF field blank to keep that MA on the chart’s timeframe; type a timeframe (like 15 or 1D) to fetch it from another timeframe.
Typical trend‑following setup: fast MAs (10–21) on chart TF, mid/slow MAs (34–200) from higher TFs for bias and dynamic support/resistance.
Color‑code faster vs slower lines and optionally hide lines you don’t need to reduce clutter.
Best practices
Prefer pulling equal or higher timeframes for stability; mixing lower TFs into a higher‑TF chart can create choppy visuals.
Combine with price action and volume/volatility tools (e.g., RSI, Bollinger Bands) for confirmation rather than standalone signals.
Showcase example charts in your publish post and explain default settings so users know how to interpret the ribbon.
Inputs
Show/Hide per MA, Type (SMA/EMA/SMMA/WMA/VWMA), Source, Length, Color, Timeframe.
Defaults cover common lengths (10/20/50/100/200 etc.) and can be customized to fit intraday or swing styles.
Limitations
This is an analysis overlay, not a signal generator; it doesn’t place trades or alerts by default.
Effectiveness depends on instrument liquidity and user configuration; avoid overfitting to one market or regime.
Attribution and etiquette
Provide a brief explanation of your calculation choices and note that MA formulas are standard; credit any borrowed concepts or snippets if used.
Z-Score of RSI//@version=5
indicator("Z-Score of RSI", overlay=false)
// Tham số
rsi_length = input.int(14, "RSI Length")
z_length = input.int(60, "Z-Score Period")
// Tính RSI
rsi = ta.rsi(close, rsi_length)
// Tính Z-Score
mean_rsi = ta.sma(rsi, z_length)
std_rsi = ta.stdev(rsi, z_length)
z_rsi = (rsi - mean_rsi) / std_rsi
// Vẽ biểu đồ
plot(z_rsi, color=color.new(color.aqua, 0), linewidth=2, title="Z-Score(RSI)")
hline(0, "Mean", color=color.gray)
hline(2, "Overbought (+2σ)", color=color.red)
hline(-2, "Oversold (-2σ)", color=color.lime)
// Cảnh báo (tuỳ chọn)
bgcolor(z_rsi < -2 ? color.new(color.lime, 85) : na)
bgcolor(z_rsi > 2 ? color.new(color.red, 85) : na)
Improved ICT MultiTF A+ IndicatorThis indicator provides ICT-style multi time frame fair value gaps with a 4-hour moving average bias. It prioritizes 15-minute gaps and falls back to 5-minute and 1-minute gaps when none are present. It also includes alert conditions for long and short signals based on session filters and bias.
ICT Smart Money Zones - Sessions & MacrosThe script helps traders identify high-probability trading times by automatically plotting:
Major market sessions (Asian, London, New York)
ICT Kill Zones (Asian Range, London KZ, New York AM/PM, Lunch Dead Zone, Power Hour)
Opening Ranges (5-min, 15-min, 30-min)
London & New York Macro phases (pre-defined institutional timing windows)
It combines visual session overlays, macro labels, and a timeline bar that dynamically adjusts for Daylight Savings Time (DST) and user time zone preferences.
⚙️ Main Features
🕓 Time Zone Control
Time Zone Modes:
UTC
Session Local Time
Your Time Zone (custom)
Dynamically calculates DST changes for London and New York markets.
Converts session times based on your selected mode.
🌎 Major Market Sessions
Displayed as soft-colored background zones:
Asian Session: 7 PM – 4 AM ET (purple)
London Session: 3 AM – 12 PM ET (blue)
New York Session: 9:30 AM – 4 PM ET (green)
These create context for when liquidity and volatility shift between sessions.
⚡ ICT Kill Zones
Kill zones are the “smart money” time windows where liquidity sweeps and reversals often occur:
Zone Time (ET) Color Purpose
Asian Range 7 PM – 12 AM Red Establishes range / accumulation
London KZ 2 AM – 5 AM Cyan Early volatility & sweep setups
NY Open KZ 7 AM – 10 AM Lime Primary NY session move
Lunch Dead Zone 12 PM – 1 PM Gray Low volume / avoid trading
NY PM KZ 1 PM – 3 PM Orange Reversal or continuation
Power Hour 3 PM – 4 PM Gold Final hour volatility burst
Each is drawn as a translucent box, with automatic high-low range boxes and labels via the LowHighSessionDetector() function.
🏛️ ICT Macros
Institutional “macro” timing blocks used by ICT traders:
London Macros: Two separate sub-sessions (LDN 1, LDN 2)
New York Macros: AM 1–3, Lunch, PM, Last Hour
Each phase is color-coded and labeled with optional start–end times displayed in your chosen time zone.
📈 Opening Ranges
Helps visualize early volatility:
5-min Opening Range (9:30–9:35 ET) – Red
15-min Range (9:30–9:45 ET) – Orange
30-min Range (9:30–10:00 ET) – Violet
Used to measure breakout behavior and morning session direction.
🧮 Technical Architecture
DST_Detector() – Determines when daylight saving time is active per region.
Market_TimeZone_Calculator() – Generates session macros in UTC or local time dynamically.
LowHighSessionDetector() – Tracks the high and low within each session and draws labeled boxes.
draw_session() – Handles visual rendering for timeline zones (background layer).
SplitFunction() – Parses string time ranges into human-readable text for labeling.
📊 Visual Layers
The chart layers follow this order:
Major Sessions (background layer)
ICT Kill Zones (mid layer)
Opening Ranges
ICT Macros (top layer)
Each layer can be toggled on/off individually with color customization.
🧩 Customization Options
Toggle on/off for each zone, macro, or session.
Adjustable timeline bar height (3–30 % of chart).
Optional time display next to macro labels.
Selectable color transparency for each zone.
🧭 Intended Use
This indicator is designed for:
ICT traders analyzing session-based liquidity shifts.
Day traders identifying optimal trading windows.
Market structure enthusiasts visualizing time-based volatility zones.
Combining with Fair Value Gaps, Order Blocks, and SMT Divergences for precise entries.
Delta Absolute Difference Highlight This indicator measures the brute delta difference of volume between consecutive candles and highlights significant changes in market aggression. It calculates the absolute difference in volume delta, plotting it as a histogram above zero for clear visibility.
When the magnitude of this difference exceeds 90% above its recent average, the corresponding bar is highlighted in green or red. Green bars indicate increasing positive delta changes, signaling growing buying pressure, while red bars indicate decreasing positive delta, suggesting weakening momentum.
This visual aid helps traders quickly identify sharp shifts in volume aggression, useful for making timely decisions in active markets.
Trading Range Aggression Histogram
This indicator is a histogram that accumulates the net volume of aggressive buying and selling per candle, representing the dominant market pressure within defined time-frame.
The indicator works by continuously summing volumes as long as the aggression remains in the same direction, resetting and reversing the accumulation when the pressure changes sides.
This creates visual waves that facilitate the perception of phases dominated by buyers and sellers over time. The tool is useful to identify moments of strength, weakness, and potential reversals in a dynamic market, especially in short-term trading.
Boss Short Setup ScannerThis indicator identifies my Retest-Fail Short Setup. It scans for 3 conditions happening in sequence:
Downtrend confirmed: 20 EMA below 50 EMA and price trading below both → momentum is already bearish.
Flip Candle: Price pushes up into a minor pullback, then prints a bearish shift candle that closes below the midpoint of the prior bullish candle. This shows buyer exhaustion and seller re-control.
Confirmation Break: The next candle closes below the flip candle’s low, confirming continuation and removing guesswork.
When all 3 align, the indicator prints a Short Signal.
This setup is designed to catch the first continuation move after a failed upward retest — not tops, not guesswork, just controlled trend re-entry with clear invalidation.
Best used on:
• 5m, 10m, or 15m execution charts
• With pre-marked supply zones or prior failure levels
• Only on liquid tickers (avoid illiquid trash)
Trade Idea:
Enter on the confirmation break.
Stop goes above flip candle high.
Target prior swing lows or next liquidity pocket.
Keep it simple, disciplined, and repeatable.
US Leverage Overlay — Margin Debt & Total Credit (YoY / Z-score)What this does
An overlay indicator that brings U.S. leverage proxies from FRED onto your main price chart (left axis). Choose between a proxy for investor margin debt or total credit market debt and view them as YoY %, Z-score of YoY, or an Indexed Level so they’re comparable with price without wrecking the scale.
Data sources (FRED symbols)
--- Margin (investor leverage proxy): FRED:BOGZ1FL663067003Q
Brokers & Dealers; Receivables Due from Customers ≈ margin loans (quarterly).
--- TotalCredit (economy-wide leverage): FRED:TCMDO
All sectors; Debt Securities & Loans; Liability (quarterly).
Note: These are quarterly series. The indicator samples monthly and holds values between official prints, so you’ll see step-like updates when new data drops.
Views (pick one in settings)
--- YoY % — 12-month rate of change. Above 0% = leverage expanding; below 0% = contracting.
--- Z-score (YoY) — Standardizes YoY vs. its recent history to flag unusual moves (regime shifts).
--- Indexed Level — 100 × (level / moving average), a compact “above/below trend” view.
How to read quickly
--- Rising YoY % > 0 → leverage expansion (often supportive for risk).
--- Falling YoY % < 0 → deleveraging headwind.
--- Z-score spikes (±2) → unusually fast changes; watch for volatility or policy inflections.
--- Indexed Level crossing down through 100 → slipping below trend.
Inputs
--- Data source: Margin or TotalCredit
--- YoY/Z-score lookbacks and Index baseline length
--- Overlay: overlay=true, scale=scale.left (uses its own left axis by default)
Tips
--- If it spawns in a sub-pane, right-click the label → Move to → Main chart.
--- For context, consider adding related series on separate panes:
FRED:TOTALSL (Consumer Credit), FRED:REVOLSL (Credit Cards),
FRED:BUSLOANS (C&I Loans), FRED:TDSP (Debt Service Ratio).
--- Occasionally FRED returns “Failed to fetch”; re-add or reload fixes it.
Why it’s useful
Equity drawdowns often line up with turns in leverage (households, corporates, or brokers). This overlay gives you a clean, normalized read so you can spot expansion vs. contraction alongside price action.
Compatibility
--- Pine Script® v6
--- Works on any chart timeframe (data internally sampled monthly)
Educational use only — not financial advice.
Mother & Baby — Nifty 5m (Bull/Bear)The Mother & Baby — Nifty 5m (Bull/Bear) indicator automatically detects two-bar inside-bar patterns, where the second (child) candle is completely within the previous (mother) candle. It highlights potential bullish or bearish setups using boxes, labels, and alerts. Includes optional ATR filtering, high/low guide lines, and customizable visuals for clear pattern recognition. Designed for educational and analytical use only — not financial advice.
Contango/Backwardation Monitor
This is an indicator to display the spread difference between two products. I designed it around VX1! and VX2! but any other two products can be chosen. It is a simple subtraction of VX2-VX1. I will go through the options first and what they do followed by what contango/backwardation is in my own words. You will need the data package for VX futures for the default version to work.
INPUTS
-Apply Smoothing: choose to apply smoothing or not.
-Smoothing Method: choose between SMA,EMA,WMA, etc.
-Line Width: Width of line if line is chosen style(can be changed in style section)
-Threshold 1-5: This is the level at which the line will change colors(defaults are for VX)
-Color 1-5: The color the line will change to when crossing threshold.
Towards Backwardation: Background color change when line is slanted down
Towards Contango: Background color change when line is slanted up
Bars to Confirm Trend: This is my method to cut down on background color changes. It is how many bars consecutive going back needed to change color.
STYLE
-All colors and whatnot can be changed here(threshold colors can be changed here or on the input page).
T1 Line-T5 line: These are simple horizontal lines that can be used to denote threshold areas or whatever you want.
Contango/Backwardation-These terms are used mostly with futures to define the calendar spread between two contracts. Contango is when that spread is is getting longer and backwardation is when that spread is closing. In terms of VIX futures, Contango would imply that volatility is stabilizing and the S and P will likely gain. Backwardation, woudl eb the opposite.
The most simple way to read this indicator with default settings- If the line is up, red, and the background is red, then you can assume S and P prices are going down. And if the opposite is true, then prices are likely going up.
Please feel free to ask any questions and I will do my best to answer them.
Hourly ORB NY Session (5/15min) - FixedDrawing ORB each hour in NY session
First ORB is 9.30 to 11.00am
then every hour we have a 15 min ORB
11am
12pm
1pm
2pm
3pm
You dont need anything else than this! Simple and powerful
週一普跌策略 Monday shit Strategy Strategy Description / 策略敘述
EN
This strategy takes a short position at the start of each Monday, based on the hypothesis that cryptocurrency markets tend to experience post-weekend risk-off behavior.
The system enters a full-equity short position at the Tokyo open (Taipei 08:00), aiming to capture Monday downside pressure resulting from accumulated weekend information and macro sentiment adjustments when traditional financial markets reopen.
Risk management uses fixed percentage take-profit and stop-loss levels, emphasizing asymmetric reward-to-risk (large occasional gains, small frequent losses).
The model reflects the increasing alignment between crypto price behavior and traditional financial market cycles.
ZH-TW
本策略於每週一開盤時做空,基於假設加密資產在週末後具有風險釋放與補跌傾向。
系統會在台北時間早上 08:00 以全倉做空,目標捕捉因週末累積消息與傳統金融市場重新開盤所造成的下跌壓力。
風控採固定止盈、止損百分比,強調高報酬/低風險的不對稱結構(小虧多次、偶爾大賺)。
此模型反映加密貨幣市場行為與華爾街週期愈趨一致的市場現象。
RTH & Overnight ETH Levels (Configurable + Labels)Plots yesterday’s RTH high, low, close, today’s RTH open, and the latest overnight ETH high/low with fully customizable lines and floating labels.
Recent Swing High/Low Lines With Stats TableSwing-Based Volatility
This indicator measures volatility using the distance between recent swing highs and swing lows rather than fixed averages like ATR. Each swing captures a meaningful shift in market control, making this a structure-aware view of volatility.
The tool calculates and plots the average swing range over time, highlighting when the market is expanding (wide swings, high volatility) or contracting (tight swings, low volatility). These phases can help traders identify breakout potential, adjust stop-loss or profit targets, and align position sizing with current market conditions.
Always In by Swing BreakIndicator: Always-In by Swing Break
Purpose:
This indicator tracks when the market transitions from one directional phase to another — the moment when it stops doing what it was doing and starts doing something new. It follows an “Always-In” logic inspired by Al Brooks’ price-action framework.
Always-In by Swing Break
Tracks directional shifts based on confirmed swing-high and swing-low breaks using ATR buffers. Highlights trend flips with yellow borders, paints directional bias (green/red), plots a customizable dashed “must-hold” line, and marks breakout failures (FS/FL).
Includes RTH/ETH bar numbering with OB/OS awareness and a live stats panel showing ATR, bar range, and RSI.
How to Use:
Follow the colored borders to stay aligned with the Always-In direction — green for long bias, red for short. A yellow border marks a possible trend flip when price breaks a confirmed swing level by the ATR buffer. Use the dashed flip-line as the “must-hold” level: if price closes back beyond it within the failure window, it signals a potential reversal (Failed short (FS) / Failed long (FL) marker). Watch RTH bar numbers and the RSI panel for context — when bar counts and RSI show overbought or oversold conditions the bar numbers change color, tighten profit targets or wait for a new swing break setup.
Bring the indicator to the front-
On the chart, hover over the indicator’s name in the top-left.
Click the three dots (⋯) menu.
Choose visual order “Move to” → “Bring to front”
ALN Sessions Box Breakout — Auto- DSTDevoleper: Sheikh Rakib
What it does
This indicator draws session range boxes for Asia (Dhaka), London, and New York using each market’s own local time (DST-aware). After a session closes, it watches for the first close above the session high or below the session low and then marks that breakout once per session with clear chart markers and optional alerts.
Key features
Auto-DST, per-city timezones
London session uses Europe/London
New York session uses America/New_York
Asia session uses Asia/Dhaka
Your chart timezone doesn’t matter—the sessions track real local hours.
Clean range boxes with adjustable opacity and optional outlines.
Session labels that auto-center at the end of each session.
One-shot breakout signals per session:
Triangle up when price closes above the session high.
Triangle down when price closes below the session low.
Built-in alerts for: session starts and each breakout direction.
Inputs
London / New York / Asia (Dhaka)
Show Session: toggle each session on/off
Time Range: default London 08:00–17:00 (local), New York 08:00–17:00 (local), Asia 06:00–15:00 (Dhaka)
Colour: box color for each session
Settings
Show Session Labels
Show Range Outline
Opacity Preset: Dark / Medium / Light
(UTC Offset input is kept for display, not used in session detection.)
Visuals & alerts
Boxes extend from session open to close, continually updating the high/low.
When the session ends, the final high/low are locked in, the label is centered, and the indicator begins monitoring for a breakout.
Alerts
Session start: Asia/London/New York
Breakouts: “High Breakout” (close > high) and “Low Breakout” (close < low) for each session
Create alerts from the TradingView alert dialog and choose the desired alertcondition.
Logic notes (how signals fire)
While a session is open, its box grows to contain all highs/lows.
On the first bar after close, the script starts listening for a breakout:
Close > session high → one up signal (fires once)
Close < session low → one down signal (fires once)
When the next same session begins, internal flags reset and a new box starts—so signals are inherently scoped to the period between that session’s close and its next open.
Tips
Use on intraday timeframes (e.g., 1m–30m) for clearer box structure.
If you only want specific markets, toggle others off for a cleaner chart.
For systematic entries, combine with your trend/volatility filters and use the breakout alerts as triggers or confirmations—this script doesn’t place trades.
Disclaimer: Market timing and risk management are your responsibility. Past session behavior does not guarantee future performance.
ALN Sessions Box — Auto- DSTDevoleper: Sheikh Rakib
What it does
Draws candle-synced high/low range boxes for the three major sessions—Asia (Dhaka view), London, and New York—on any timeframe. London and New York are DST-aware (times auto-shift on DST changes). Boxes update live with session high/low and close exactly on the session’s final bar.
Key features
Auto-DST: Uses Europe/London and America/New_York time zones, so session windows auto-adjust when DST turns on/off.
Asia (BDT) window: Default 06:00–15:00 Asia/Dhaka (no DST).
Candle-linked boxes: Top/bottom track session High/Low; right edge finalizes on the session end bar—clean breakout zones.
Clean UI: Optional labels, outline toggle, and three opacity presets (Dark/Medium/Light).
Plug & play: Drop in, customize colors/times, done.
Inputs you can tweak
Time Range (LOCAL) for each session
Defaults: Asia 06:00–15:00 (Asia/Dhaka), London 08:00–17:00 (Europe/London), New York 08:00–17:00 (America/New_York)
For equities, switch New York to 09:30–16:00—DST handling remains automatic.
Colour per session, Show Session Labels, Show Range Outline, Opacity Preset.
UTC Offset input is retained for compatibility but not used for session detection.
Quick BDT reference (for the default 08:00–17:00 local windows)
London → DST ON (BST): 13:00–22:00 BDT · DST OFF (GMT): 14:00–23:00 BDT
New York → DST ON (EDT): 18:00–03:00 BDT (next day) · DST OFF (EST): 19:00–04:00 BDT (next day)
Asia (Dhaka) → 06:00–15:00 BDT (no DST)
Tips
If you see dotted vertical lines, that’s TradingView Session breaks (Chart Settings → Appearance). Turn off if you prefer a cleaner view.
Some symbols don’t trade during parts of a session—adjust Time Range as needed.
Labels are placed inside the box; adjust opacity/colors to suit your theme.
A sharp, professional session map for spotting breakouts, reversals, and volatility windows at a glance.
oppliger trendfollow📈 Strategy Overview: SMA25 vs SMA200 – Gap Momentum Trend Strategy
This strategy is a trend-following system designed to capture strong, accelerating uptrends while exiting early when momentum begins to fade.
It uses the relationship between two moving averages — the 25-period SMA and the 200-period SMA — and monitors the gap (distance) between them as a measure of trend strength.
🟢 Entry Conditions (Go Long)
A long position is opened only when all of the following conditions are true:
Uptrend confirmation:
The 25-period SMA is above the 200-period SMA
→ confirms a clear upward trend.
Price momentum:
The closing price is above the SMA25 line,
→ showing that the market currently trades with bullish momentum.
Trend acceleration:
The gap between SMA25 and SMA200 has been increasing for the last 5 consecutive bars.
→ mathematically:
gap_t > gap_(t-1) > gap_(t-2) > gap_(t-3) > gap_(t-4)
→ indicates that the short-term trend is pulling away from the long-term trend and accelerating upward.
✅ When all three conditions are met, the strategy enters a long trade at the close of the current candle.
🔴 Exit Conditions (Close Long)
The position is closed when the uptrend starts to lose strength:
Trend deceleration:
The gap between SMA25 and SMA200 has been shrinking for 3 consecutive bars.
→ mathematically:
gap_t < gap_(t-1) < gap_(t-2)
→ signals that the short-term moving average is converging toward the long-term average, showing weakening momentum.
🚪 When this condition is met, the strategy closes the position at market price.
⚙️ Summary of Logic
Phase Condition Meaning
Entry SMA25 > SMA200 Long-term trend is up
Entry Close > SMA25 Short-term momentum is bullish
Entry Gap rising 5 bars Trend is accelerating
Exit Gap falling 3 bars Trend is weakening
💡 Interpretation
This strategy aims to:
Enter only when a strong, accelerating uptrend is confirmed.
Stay in the trade as long as momentum remains intact.
Exit early when the market starts losing strength, before the trend fully reverses.
It works best in trending markets and helps avoid false entries during sideways or weak phases.
TopBot [CHE] TopBot — Structure pivots with buffered acceptance and gradient trend visualization
Summary
TopBot detects swing structure from confirmed pivot highs and lows, derives support and resistance levels, and switches trend only after a buffered and accepted break. It renders labels for recent structure points, maintains dynamic support and resistance lines that freeze on contact, and colors candles using a gradient that reflects consecutive trend persistence. The gradient communicates strength without extra panels, while the buffered acceptance reduces fragile flips around key levels. Everything runs in the main chart for immediate context.
Motivation: Why this design?
Classical swing tools often flip on single-bar spikes and produce lines that extend forever without acknowledging when price invalidates them. This script addresses that by requiring a user-controlled buffer and a run of consecutive closes before changing trend, while also freezing lines once price interacts with them. The gradient color layer communicates regime persistence so users can quickly judge whether a move is maturing or just starting.
What’s different vs. standard approaches?
Baseline reference: Simple pivot labeling and unbuffered break-of-structure tools.
Architecture differences:
Buffered level testing using ticks, percent, or ATR.
Acceptance logic that requires multiple consecutive closes.
Synchronized structure labeling with a single Top and Bottom within the active set.
Progressive support and resistance management that freezes lines on first contact.
Gradient candle and wick coloring driven by consecutive trend counts with windowed normalization and gamma control.
Practical effect: Fewer whipsaw flips, clearer status of active levels, and visual feedback about trend persistence without a secondary pane.
How it works (technical)
The script confirms swing points using left and right bar pivots, then forms a current structure window to classify each pivot as higher high, lower high, higher low, or lower low. Recent labels are trimmed to a user cap, and a postprocess step ensures one highest and one lowest label while preserving side information for the others. Support updates on higher low events, resistance on lower high events. Trend flips only after the close has moved beyond the active level by a chosen buffer and this condition holds for a chosen number of consecutive bars. Lines for new levels extend to the right and freeze once price touches them. A running count of consecutive trend bars produces a strength score, which is normalized over a rolling window, shaped by gamma, and mapped to user-defined dark and neon colors for both up and down regimes. Wick coloring uses `plotcandle`; fallback bar coloring uses `barcolor`. No higher-timeframe data is requested. Signals confirm only after the right-bar lookback of the pivot function.
Parameter Guide
Left Bars / Right Bars (default five each): Pivot sensitivity. Larger values confirm later and reduce noise; smaller values respond faster with more noise.
Draw S/R Lines (default true): Enables support and resistance line creation and updates.
Support / Resistance Colors (lime, red): Line colors for each side.
Line Style (Solid, Dashed, Dotted; default Dotted) and Width (default three): Visual style of S/R lines.
Max Labels & Lines (default ten): Cap for objects to control clutter and resource usage.
Change Bar Color (default true), Up/Down colors (blue, black): Fallback bar coloring when gradients or wick coloring are disabled.
Show Neutral Candles (default false): Optional coloring when no trend is active.
Enable Gradient Bar Colors (default true): Turns on gradient body coloring from the strength score.
Enable Wick Coloring (default true): Colors wicks and borders using `plotcandle`.
Collection Period (default one hundred): Rolling window used to scale the strength score. Shorter windows react faster but vary more.
Gamma Bars / Gamma Plots (defaults zero point seven and zero point eight): Shapes perceived contrast of bar and wick gradients. Lower values brighten early; higher values compress until stronger runs appear.
Gradient Transparency / Wick Transparency (default zero): Visual transparency for bodies and wicks.
Up/Down Trend Dark and Neon Colors: Endpoints for gradient mapping in each regime.
Acceptance closes (n) (default two): Number of consecutive closes beyond a level required before trend flips. Larger values reduce false breaks but react later.
Break buffer (None, Ticks, Percent, ATR; default ATR) and Value (default zero point five) and ATR Len (default fourteen): Defines the safety margin beyond the level. ATR mode adapts to volatility; Percent and Ticks are static.
Reading & Interpretation
Labels: “Top” and “Bottom” mark the most extreme points in the active set; “LT” and “HB” indicate side labels for lower top and higher bottom.
Lines: New support or resistance is drawn when structure confirms. A line freezes once price touches it, signaling that the dynamic phase ended.
Trend: Internal state switches to up or down only after buffered acceptance.
Colors: Brighter neon tones indicate stronger and more persistent runs; darker tones suggest early or weakening runs. When gradients are off, fallback bar colors indicate trend sign.
Practical Workflows & Combinations
Trend following: Wait for a buffered and accepted break through the most recent level, then use gradient intensity to stage entries or scale-ins.
Structure-first filtering: Trade only in the direction of the last accepted trend while price remains above support or below resistance.
Exits and stops: Consider exiting on loss of gradient intensity combined with a return through the most recent structure level.
Multi-asset / Multi-timeframe: Works on liquid symbols across common timeframes. Use larger pivot bars and higher acceptance on lower timeframes. No built-in higher-timeframe aggregation is used.
Behavior, Constraints & Performance
Repaint/confirmation: Pivot confirmation waits for the right bar window; trend acceptance is based on closes and can change during a live bar. Final signals stabilize on bar close.
security/HTF: Not used. No cross-timeframe data.
Resources: Arrays and loops are used for labels, lines, and structure search up to a capped historical span. Object counts are clamped by user input and platform limits.
Known limits: Delayed confirmation at sharp turns due to pivot windows; rapid gaps can jump over buffers; gradient scaling depends on the chosen collection period.
Sensible Defaults & Quick Tuning
Start with the defaults: pivot windows at five, ATR buffer with value near one half, acceptance at two, collection period near one hundred, gamma near zero point seven to zero point eight.
Too many flips: increase acceptance, increase buffer value, or increase pivot windows.
Too sluggish: reduce acceptance, reduce buffer value, or reduce pivot windows.
Colors too flat: lower gamma or shorten the collection period.
Visual clutter: reduce the max labels and lines cap or disable wicks.
What this indicator is—and isn’t
This is a visualization and signal layer that encodes swing structure, level state, and regime persistence. It is not a complete trading system, not predictive, and does not manage orders. Use it with broader context such as higher timeframe structure, session behavior, and defined risk controls.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Acknowledgment
Thanks to LonesomeTheBlue for the fantastic and inspiring "Higher High Lower Low Strategy" .
Original script:
Credit for the original concept and implementation goes to the author; any adaptations or errors here are mine.
BRS STC Schaff Trend CycleSTC with custom settings for 2min charts; Buy/Sell signals are close, but works very well with other indicators for validation; Borrowed from everget and another;






















