RSI + S/R + FVG + BOS + CHoCH SetupRSI + Support/Resistance + FVG + BOS + CHoCH
This indicator combines five popular technical analysis concepts into one structured market setup: RSI, Support & Resistance, Fair Value Gaps (FVG), Break of Structure (BOS), and Change of Character (CHoCH).
The goal is to identify higher-quality potential long and short setups by requiring multiple confirmations instead of relying on a single indicator.
How the Indicator Works
🟢 Long / BUY Setup
A bullish setup is generated when the following conditions align:
Support: Price is trading near a recent swing-low support area.
BOS / CHoCH: The market confirms bullish structural strength by breaking a previous swing high.
Bullish FVG: A bullish Fair Value Gap is detected or price returns into the latest bullish FVG.
RSI: RSI is above the configured bullish level, confirming bullish momentum.
When the required conditions are satisfied, the indicator displays a BUY signal.
Basic flow:
Support → Bullish BOS/CHoCH → Bullish FVG → RSI Confirmation → BUY
🔴 Short / SELL Setup
A bearish setup is generated when:
Resistance: Price is trading near a recent swing-high resistance area.
BOS / CHoCH: The market confirms bearish structural weakness by breaking a previous swing low.
Bearish FVG: A bearish Fair Value Gap is detected or price returns into the latest bearish FVG.
RSI: RSI is below the configured bearish level, confirming bearish momentum.
When the required conditions are satisfied, the indicator displays a SELL signal.
Basic flow:
Resistance → Bearish BOS/CHoCH → Bearish FVG → RSI Confirmation → SELL
Main Features
RSI Confirmation
Uses RSI to help determine whether bullish or bearish momentum is present. The RSI levels can be customized according to your trading style.
Support & Resistance
Recent swing highs and swing lows are used to identify potential resistance and support areas.
BOS — Break of Structure
Detects when price breaks an important recent swing high or swing low, helping identify continuation or structural changes.
CHoCH — Change of Character
Helps identify potential changes in market direction when price breaks structure against the previously established trend.
FVG — Fair Value Gap
Identifies three-candle price imbalances and displays bullish and bearish FVG zones directly on the chart.
Signal Window
The structure confirmation can remain valid for a configurable number of bars, allowing price time to return toward an FVG or key level.
Alerts
BUY and SELL alert conditions are included so you can create TradingView alerts when a setup is confirmed.
Recommended Usage
The indicator is designed to be used as a confluence-based confirmation tool, rather than as a standalone automatic trading system.
For example, a trader could wait for:
1. Price to approach support.
2. A liquidity reaction or market-structure shift.
3. Bullish BOS/CHoCH confirmation.
4. A bullish FVG to form or become available for a retracement.
5. RSI to confirm bullish momentum.
6. BUY signal to appear.
7. Stop-loss to be placed below the relevant swing/support.
8. Take-profit to be based on a predefined risk/reward ratio or the next major resistance/liquidity area.
The opposite process can be used for short trades.
Important Note
This indicator does not guarantee profitable trades. Market conditions, volatility, timeframe, spread, liquidity and execution can significantly affect results.
BOS, CHoCH, FVG, support/resistance and RSI are interpreted using predefined mathematical rules in the script. These definitions may differ from how individual traders manually identify them.
Always test the indicator on your preferred market and timeframe before using it with real money, and use appropriate risk management.
Best practice: combine the signals with higher-timeframe market structure, liquidity levels and disciplined risk management rather than taking every BUY or SELL signal automatically. Indicateur

FVG Precision | Exact Labels | 2R | WebhookFVG Precision | Exact Labels | 2R | Webhook is a Fair Value Gap (FVG) trading indicator designed to identify structured bullish and bearish FVG setups, wait for price to return into the imbalance, confirm rejection, and then display a complete trade setup with entry, stop loss, take profit, and trade direction.
HOW THE INDICATOR WORKS
The indicator looks for bullish and bearish Fair Value Gaps created by strong price displacement.
A bullish FVG is detected when price creates an upside imbalance between candles.
A bearish FVG is detected when price creates a downside imbalance between candles.
The script uses ATR-based filters to reduce very small or weak gaps and also checks for displacement strength before accepting an FVG.
After an FVG is identified, the indicator waits for price to return and fully fill the qualifying area.
When rejection confirmation is enabled, a trade signal is not generated simply because price touches the FVG. Price must fill the zone and then show confirmation back in the expected direction.
For bullish setups, the script looks for bullish rejection and a close back through the required portion of the FVG.
For bearish setups, the script looks for bearish rejection and a close back through the required portion of the FVG.
This helps filter out many simple touches that do not produce a confirmed reaction.
ENTRY
Once all conditions are satisfied, the indicator creates either a BUY or SELL signal.
The official entry price is based on the closing price of the candle that confirms the setup.
The indicator displays:
• BUY or SELL direction
• Exact entry price
• Signal time in Eastern Time
• Active entry FVG
• Stop Loss
• Take Profit
• Current trade status
STOP LOSS
Stops are structure-based rather than using an arbitrary fixed distance.
For BUY setups, the stop is placed below the most recently confirmed swing low, including the selected stop buffer.
For SELL setups, the stop is placed above the most recently confirmed swing high.
This allows the risk level to adapt to the current market structure.
TAKE PROFIT
The default take-profit target uses a 1:2 risk-to-reward ratio.
This means:
Risk = 1R
Target = 2R
For example:
If the distance between entry and stop loss is 5 points, the take-profit target is positioned approximately 10 points from the entry in the profitable direction.
The 2R level is automatically calculated for every qualifying setup.
ONE ACTIVE TRADE AT A TIME
The indicator is intentionally designed to manage only one active signal at a time.
While a BUY or SELL setup is active, the indicator will not issue another new trade signal.
A new setup becomes eligible after the current trade ends through:
• Take Profit
• Stop Loss
• FVG invalidation
• Weekend reset
This design helps prevent conflicting BUY and SELL signals from being active simultaneously.
ACTIVE FVG INVALIDATION
The original FVG remains part of the trade-management logic.
If price closes through the active FVG in the invalid direction before the trade completes, the indicator can classify the setup as:
FVG BROKEN
The active setup is then cancelled.
TRADING SESSION
Signals are restricted to the futures trading window used by this indicator:
Sunday 6:00 PM ET
through
Friday 4:00 PM ET
Saturday is disabled.
A weekend reset occurs Friday at 4:00 PM Eastern Time.
SUPPORTED CHART TIMEFRAMES
The indicator can visually operate on:
• 1 Minute
• 5 Minute
• 15 Minute
• 30 Minute
RECOMMENDED / PRIMARY TIMEFRAME: 15 MINUTES
The 15-minute timeframe is the primary timeframe this version is designed to be used with.
Compared with the lower timeframes, the 15-minute chart generally provides a cleaner view of market structure and reduces the amount of short-term price noise seen on very small candles.
IMPORTANT WEBHOOK RULE:
Only signals generated on the 15-minute timeframe are permitted to send trade-copier webhook events.
1 Minute:
Indicator can display setups, but website webhook transmission is OFF.
5 Minute:
Indicator can display setups, but website webhook transmission is OFF.
15 Minute:
Indicator displays setups AND webhook transmission is ON.
30 Minute:
Indicator can display setups, but website webhook transmission is OFF.
This restriction was intentionally added so an external trade copier or automation system receives only the selected 15-minute signals rather than signals from multiple chart timeframes.
WEBHOOK / AUTOMATION SUPPORT
The indicator contains machine-readable webhook functionality for integration with an external trade-management or trade-copying application.
Supported webhook lifecycle events include:
• ENTRY
• TP_HIT
• SL_HIT
• FVG_BROKEN
• WEEKEND_RESET
Every new trade receives a unique signal ID.
That same signal ID follows the trade throughout its lifecycle so an external application can associate subsequent events with the correct original signal.
ENTRY webhook data can include:
• Unique Signal ID
• Symbol
• TradingView Symbol
• BUY / SELL direction
• Timeframe
• Signal timestamp
• Entry price
• Stop Loss
• Take Profit
• Risk/Reward
This provides a structured foundation for webhook-based alerts and external automation.
BENEFITS
The purpose of FVG Precision is to make Fair Value Gap trading more structured and easier to interpret.
Key benefits include:
• Automatically identifies qualifying bullish and bearish FVGs
• Uses displacement and ATR filters to reduce weak setups
• Waits for FVG interaction instead of signaling immediately
• Optional rejection confirmation helps filter simple touches
• Automatically identifies BUY and SELL opportunities
• Displays exact entry prices
• Automatically calculates structure-based stop losses
• Automatically calculates a 2R profit target
• Displays the active FVG visually
• Prevents multiple active signals at the same time
• Provides FVG invalidation logic
• Restricts signals to the selected trading session
• Provides BUY, SELL, TP, SL and FVG Broken alerts
• Supports structured webhook integration
• Restricts automated webhook transmission to the preferred 15-minute timeframe
IMPORTANT
This indicator is a decision-support and automation tool. Signals are based on predefined technical conditions and do not guarantee profitable trades.
Historical or visually successful setups do not guarantee future results. Slippage, liquidity, market volatility, news events, execution quality, commissions, and other market conditions can materially affect actual results.
Users should test the indicator thoroughly and use appropriate risk management before using any signal for live trading. Indicateur

Previous Day Levels & BOS (v4.0.0)Indicator Overview
This custom Pine Script v6 trading indicator combines Previous Day High/Low (PDH/PDL) boundary tracking, multi-trigger Break Signals, and Break of Structure (BOS) logic into a unified, clean charting tool. Designed for precision execution, the script tracks session boundaries strictly using calendar days to prevent Sunday and Monday session combining, while enforcing structural constraints on market structure breaks.
Core Functional Components
Previous Day Levels: Plots dynamic lines representing the high and low of the previous calendar day, adapting automatically as sessions roll over.
Break Signals: Evaluates multi-trigger crosses against PDH and PDL bounds, printing designated arrows whenever price breaks these key liquidity thresholds.
Structure Breaks (BOS): Identifies swing highs and lows post-PD break, restricting BOS prints strictly within the boundaries of the Previous Day High and Low levels.
Alert System: Fully equipped with built-in native alerts for bullish, bearish, and any combined BOS events.
Complete Revision History
v1.0.0: Established initial session logic and PDH/PDL level plotting.
v1.1.0: Transitioned to strict calendar day tracking to fix Sunday and Monday session combining issues.
v1.2.0: Introduced built-in alert conditions for Bullish, Bearish, and Any BOS configurations.
v1.3.0: Enforced sequence rules requiring a PD break before evaluating BOS structures.
v1.4.0: Removed price boundary filters on post-PD break swings to capture broader structural setups.
v1.5.0: Explicitly anchored version 6 header at line 1 to resolve compiler issues.
v1.6.0: Upgraded the BOS engine to utilize array tracking, preventing swing point overwriting.
v1.7.0: Added automated removal for BOS lines and labels upon level mitigation.
v1.8.0: Resolved loop execution errors by computing crossover logic outside array loops.
v1.9.0: Reverted mitigation deletion rules so BOS elements remain visible post-PD break.
v2.0.0: Overhauled the BOS engine to active single-level tracking to minimize chart clutter.
v2.1.0: Enforced strict boundary filtering to ensure BOS markers print exclusively inside PDH and PDL channels.
v2.2.0: Enabled multi-trigger tracking so every unique cross above PDH or below PDL prints an arrow signal.
v3.1.0 - v3.2.0: Experimental Fair Value Gap (FVG) and mitigation engines introduced and tested.
v4.0.0: Cleaned and streamlined the script by completely removing experimental FVG features, finalizing the layout down to core PD levels, break arrows, and precision BOS tracking. Indicateur

ZoneKitLibrary "ZoneKit"
Generic 3-candle price-gap zone detection and drawing utilities.
Detects a gap between two candle extremes separated by one middle
candle, with an optional stricter mode requiring displacement on
both sides of the gap. Builds a box (and optional midline) to
represent the zone once detected.
scanZone(mode, h0, h2, l0, l2, c0, c1, c2, o0, o1, o2, minGap)
Scans three consecutive candles for a price-gap zone in either
direction.
Parameters:
mode (string) : "Standard" for a plain 3-candle gap; "Confirmed" for a gap
that also requires displacement (an "outside print") on both
sides of the gap, a stricter variant.
h0 (float) : Current candle's high.
h2 (float) : Two candles back's high.
l0 (float) : Current candle's low.
l2 (float) : Two candles back's low.
c0 (float) : Current candle's close.
c1 (float) : One candle back's close.
c2 (float) : Two candles back's close.
o0 (float) : Current candle's open.
o1 (float) : One candle back's open.
o2 (float) : Two candles back's open.
minGap (float) : Minimum required gap size, in price units.
Returns:
buildZone(top, bot, formTime, confTime, hourEnd, isUp, isLast, zoneColor, showMid, midColor, midStyle)
Draws a zone box (and optional midline) and returns the
populated Zone object.
Parameters:
top (float) : The zone's upper boundary.
bot (float) : The zone's lower boundary.
formTime (int) : Bar time the zone formed.
confTime (int) : Bar time the zone was confirmed.
hourEnd (int) : Caller-defined expiry time for the zone.
isUp (bool) : True if this is an upward (bullish) zone.
isLast (bool) : Caller-defined flag, passed straight through to the Zone.
zoneColor (color) : The resolved color for the box (and border).
showMid (bool) : Whether to also draw a midline through the zone's center.
midColor (color) : Color for the midline, if drawn.
midStyle (string) : Line style for the midline: "Solid", "Dotted", or "Dashed".
Returns: The newly created Zone.
Zone
Represents a detected price-gap zone and its drawn chart objects.
Fields:
mainBox (series box) : The zone's drawn box.
midLine (series line) : Optional midline through the zone's center.
boxLabel (series label) : Optional label attached to the zone.
overlayBox (series box) : Optional secondary box (e.g. for partial-fill shading).
top (series float) : The zone's upper boundary.
bot (series float) : The zone's lower boundary.
formationTime (series int) : The bar time the zone formed.
confirmTime (series int) : The bar time the zone was confirmed.
hourEnd (series int) : A caller-defined expiry time for the zone.
isFilled (series bool) : Whether the zone has been fully filled/mitigated.
wasHit (series bool) : Whether price has touched the zone at all.
isProcessed (series bool) : Internal bookkeeping flag for caller use.
isLast (series bool) : Caller-defined flag (e.g. "most recent of its kind").
isBull (series bool) : True if the zone is an upward (bullish) gap.
isFlipped (series bool) : Whether the zone has flipped direction (price closed
fillProgress (series float) : Tracks how far into the zone price has intruded. Bibliothèque

OTT Rejection ZoneOTT Rejection Zone is a chart overlay for decision-making. Its purpose is to help you answer three questions before you take a trade:
Where are the orders? (Zones)
How proven is each level? (Touch count)
Which side is advancing right now? (Pressure lines)
What you see on the chart
1) The Boxes = "Buyer / Seller Zones"
Red zones form where sellers have repeatedly rejected price from above. Green zones form where buyers have repeatedly defended from below. A zone is only drawn after a level has been defended at least twice one-off swings don't qualify. Zone width scales with ATR, so the zones mean the same thing on any symbol and any timeframe.
How to use it
- Price approaching a red zone → expect supply; watch how price reacts, not just that it arrived.
- Price approaching a green zone → expect demand; same rule.
- A zone disappearing → price closed decisively through it; the defenders are gone. Don't expect a level to matter after it's been broken.
Simple mental model
- Zone = where orders have proven themselves
- No zone = price is in open water
2) The Number on Each Zone = "Touch Count"
Every zone shows how many separate times it has been defended for example, SELLERS x4. Touches include wick-tests: any candle that pushes into the zone and closes rejected adds to the count (with a small cooldown so one cluster of candles isn't over-counted).
How to use it
- x2 → a young level, lightly proven.
- x3–x4 → a real shelf; both sides know it's there.
- A count that keeps climbing while the zone holds → active defense, orders still there.
One caution: a heavily tested level is well-proven but also well-worn levels don't hold forever, and the break of a many-touch zone tends to travel.
3) Solid vs Faded Zones = "Hot / Cold"
Zones defended within the last 30 candles render solid that's live inventory. Zones that haven't been tested recently fade but remain valid.
How to use it
- Solid zone → participants are actively engaged there right now.
- Faded zone → still a reference level, but treat it as memory rather than presence.
4) The Dotted Lines = "Pressure Lines"
When three or more minor swing highs step down in a row, a dotted red line is drawn through them and extended forward: sellers accepting worse prices to get filled — which only happens when they're eager. The mirror in green: rising lows = buyers pressing. The line invalidates the moment price closes through it.
How to use it
- Falling red line into a red zone above → sellers are both positioned and advancing. The strongest bearish picture this tool draws.
- A pressure line breaking → the advance has paused; the side that was pressing just lost initiative.
Simple mental model
- Zone = where they sit
- Pressure line = they're walking toward you
How a beginner can use this (step-by-step)
Step 1 — Find the nearest zones. Above and below current price. That's your map.
Step 2 — Read the counts and shading. Solid, high-count zones deserve the most respect.
Step 3 — Check for a pressure line. If one side is pressing toward a zone, plan around that side keeping the initiative until the line breaks.
Step 4 — Let the reaction be your trigger. This tool tells you where the decision areas are you enter only on your own trigger at those areas (rejection candle, structure reclaim, session timing). The zones are the location, not the signal.
Settings
Swing strength (5) controls zone granularity higher gives fewer, more major levels. Minor swing strength (2) sets pressure-line sensitivity. Zone half-width (0.25 ATR) and break-through distance (0.5 ATR) are ATR-based so behavior is consistent across markets. Touches to draw (2) hides unproven swings; the 30-candle activity window separates hot from cold; the 3-bar cooldown prevents over-counting. Enable "Keep broken zones" to study break-and-retest behavior on faded boxes.
Limitations
Zones and lines appear only after a swing confirms (swing strength × bars later). This delay is deliberate nothing repaints retroactively but it means levels form with a lag rather than at the exact turn. Pressure lines are deleted and redrawn as new swings confirm. Everything here is inferred from price behavior: it shows where orders were defended, not a live order book, and a level having held before is never a guarantee it holds again.
OTT Rejection Zone is a chart overlay for decision-making. Its purpose is to help you answer three questions before you take a trade:
Where are the orders? (Zones)
How proven is each level? (Touch count)
Which side is advancing right now? (Pressure lines)
What you see on the chart
1) The Boxes = "Buyer / Seller Zones"
Red zones form where sellers have repeatedly rejected price from above. Green zones form where buyers have repeatedly defended from below. A zone is only drawn after a level has been defended at least twice one-off swings don't qualify. Zone width scales with ATR, so the zones mean the same thing on any symbol and any timeframe.
How to use it
- Price approaching a red zone → expect supply; watch how price reacts, not just that it arrived.
- Price approaching a green zone → expect demand; same rule.
- A zone disappearing → price closed decisively through it; the defenders are gone. Don't expect a level to matter after it's been broken.
Simple mental model
- Zone = where orders have proven themselves
- No zone = price is in open water
2) The Number on Each Zone = "Touch Count"
Every zone shows how many separate times it has been defended for example, SELLERS x4. Touches include wick-tests: any candle that pushes into the zone and closes rejected adds to the count (with a small cooldown so one cluster of candles isn't over-counted).
How to use it
- x2 → a young level, lightly proven.
- x3–x4 → a real shelf; both sides know it's there.
- A count that keeps climbing while the zone holds → active defense, orders still there.
One caution: a heavily tested level is well-proven but also well-worn levels don't hold forever, and the break of a many-touch zone tends to travel.
3) Solid vs Faded Zones = "Hot / Cold"
Zones defended within the last 30 candles render solid that's live inventory. Zones that haven't been tested recently fade but remain valid.
How to use it
- Solid zone → participants are actively engaged there right now.
- Faded zone → still a reference level, but treat it as memory rather than presence. Indicateur

Sweep & Reverse | Liquidity Sweep Reversal StrategyThis strategy trades the liquidity-sweep reversal pattern: price wicks through a prior swing high or low — clearing out the stops resting there — then closes back inside the range, suggesting the move beyond that level was a stop-hunt rather than a genuine breakout.
How it works:
Confirmed swing highs and lows (via pivot detection) are stored as watched levels.
A sweep triggers when a bar wicks past a level but closes back on the other side.
Longs enter on swept lows, shorts on swept highs. The stop sits just beyond the sweeping wick (with an ATR buffer); the target is set from your chosen reward:risk ratio.
Levels expire if left untouched for too long, and new levels too close to an existing one (relative to ATR) are skipped to keep zones from cluttering.
Features:
Optional volume-spike filter — only counts sweeps backed by above-average volume
Optional rejection-wick filter — requires the sweeping wick to be meaningfully larger than the bar's body, filtering out weak/low-conviction sweeps
Optional next-bar confirmation — waits one bar past the sweep and only enters if price actually continues in the reversal direction, reducing whipsaw entries
Optional session window filter (defaults to the London/NY overlap, the highest-liquidity window)
Adjustable stop distance, minimum stop size, and reward:risk ratio
Breakeven stop management once a trade moves partway to target
Long/short can be toggled independently
Every trade's entry/SL/TP lines persist on the chart after the trade closes (auto-expiring after a configurable number of bars), so past trades stay visible for review
Styled performance dashboard: trade count, win rate, net profit, live position state
Warnings:
This is fundamentally a mean-reversion pattern. In strongly trending markets, sweeps frequently continue rather than reverse — no combination of filters here eliminates that risk.
Backtest results are sensitive to pivot length, stop distance, and which filters are enabled. A high win rate on a small number of trades is not statistically meaningful — test across multiple instruments and timeframes, and evaluate profit factor and max drawdown alongside net profit, not net profit alone.
Past performance in a backtest, including this one, does not guarantee future results. This is not financial advice. Stratégie

Frostman04 DOLThis is my indicator to Mark out Potential Draws on Liquidity.
When you add this indicator, it marks out several lines on the chart. Each one is a potential type of draw on liquidity.
Price likes to move towards unmitigated gaps.
Price like to take out session highs and lows.
Price likes to take out Equal Highs and Equal Lows.
Price likes to take out News Highs and News Lows.
Price likes to take out the current Daily High and Daily Low.
It is meant to be watched on the one-minute time frame.
First, it borrows the Equal Highs and Equal Lows by OutOfOptions.
Marking out any EXACT equal Highs and Lows.
If the line is swept by another candle, it is removed.
Next, it draws a horizontal line marking the Current Daily High and Current Daily Low with a label.
If a candle touches or goes beyond the line, it moves the line with the highest/lowest candle of the day.
Then, it marks out in yellow any unmitigated Fair Value Gaps on the 15m, 1hr, 4hr, and daily charts. But it has a max lookback period, so keep this in mind. If it's really far back, you may have to mark some yourself.
If an unmitigated gap line is touched, the line is removed.
Next, It marks the Session Highs and Lows for the current trading day: Asia High/Low, London High/Low, NY AM High/Low. I didn't include NY PM at this time.
If still in the session time the high and low are moved up or down.
If outside the session time, the candle that takes out the high/low is anochored to the line, otherwise, the session high/low lines are extended for the day until it is swept or a new trading day begins.
Finally, It marks out any News candles based on:
8:15, 8:30, 10am, 2pm and 2:30pm NY time. Also watching for ATR and volume spike on those times.
If a news candle line is swept, it is removed.
This has two variables of note: The first lookback is the number of days.
The second lookback is the number of candles back to check when averaging volume to check for volume spikes.
Thank you,
Frostman04 Indicateur

Risk Dispersion Regime IndicatorIts primary objective is to measure the real-time correlation level (the lockstep movement) of a basket of assets to generate a dynamic multiplier. This multiplier adjusts your position sizing based on the current market risk regime.
⚙️ Configuration and Inputs
Customizable Basket: The script analyzes a basket of 3 to 20 assets (the slots). By default, it is preconfigured with major US sector and index ETFs (SPY, QQQ, XLK, etc.).
Analysis Windows: The user defines the lookback period for the correlation calculation (default 120 sessions) and the historical depth to establish the ranking (default 750 sessions).
Position Sizing Governor: Allows you to configure the amplitude of the position adjustments via a minimum multiplier (0.3x), a maximum multiplier (1.7x), and a global strength modifier.
🧮 Mathematical Mechanics and Logic
Standardization (Z-Score): The indicator converts the return of each asset in the basket into a Z-score (return standardized relative to its mean and standard deviation) to put all symbols on the exact same scale.
Group Correlation (Rho): Instead of calculating asset pairs one by one (which is computationally heavy), the code uses an optimized mathematical identity: it derives the average correlation of the basket directly from the variance of the assets' average.
Walk-Forward Ranking: The script calculates the percentile of the current correlation strictly against previously observed historical values. This method guarantees zero lookahead bias, making the indicator perfectly safe and robust for algorithmic backtesting.
🖥️ Visual Outputs and Interface
Main Plots: The indicator draws three lines on a separate lower pane: the correlation rank (percentile), the raw correlation, and the resulting position size multiplier.
Color-Coded Regimes: The chart background changes color dynamically. It turns red when the market moves as a monolith (rank > 0.90, signaling high systemic risk) and green when the market is highly dispersed (rank < 0.25, a favorable environment for stock-picking).
Diagnostic Dashboard: A table is displayed in the top right corner. It indicates the real-time market state (Very Tight, Loose, etc.), the recommended multiplier, and includes built-in safeguards (e.g., warning the user if the timeframe is not daily or if specific assets lack historical quote data).
Built-in Alerts: Alert conditions (alertcondition) are programmed to notify the user whenever the market crosses extreme correlation thresholds (90th and 25th percentiles). Indicateur

Bollinger Bands Asymmetry AttributionBollinger Bands Asymmetry Attribution
Overview
Bollinger Bands Asymmetry Attribution is an open-source volatility-analysis overlay that studies how price dispersion is distributed above and below a selectable moving basis.
A conventional Bollinger Bands calculation uses one standard deviation to place symmetric upper and lower bands around a moving average. This script takes a different approach. It separates basis-relative squared deviations into upper-side and lower-side components, attributes the resulting directional dispersion to observation frequency and conditional excursion severity, and then constructs independently stabilized upper and lower wings.
The indicator is designed to answer questions such as:
- Is current dispersion concentrated above or below the basis?
- Is that asymmetry caused by price spending more observations on one side?
- Is it caused by fewer but larger excursions on one side?
- Are frequency and severity reinforcing each other or opposing each other?
- Is directional dispersion currently shifting, and which component is producing that shift?
- How stretched is the current source relative to the matching asymmetric wing?
This is a descriptive market-structure and volatility tool. It is not a trading strategy, directional forecast, reversal model, or buy/sell signal generator.
Core calculation
For each bar, the script evaluates the selected Source over the Attribution Length around the current selected basis.
For every observation in the rolling window:
Deviation = Observation - Current basis
Observations above the basis contribute to the upper squared-deviation mass.
Observations below the basis contribute to the lower squared-deviation mass.
Upper squared mass:
Sum of squared deviations where Deviation > 0
Lower squared mass:
Sum of squared deviations where Deviation < 0
The directional semivariances are then calculated across the entire observation window:
Upper semivariance = Upper squared mass / N
Lower semivariance = Lower squared mass / N
where N is the total number of valid observations in the window.
Frequency and severity attribution
Each directional semivariance can be factored exactly into two components.
For the upper side:
Upper occupancy = Upper observation count / N
Upper conditional severity =
Upper squared mass / Upper observation count
Upper semivariance =
Upper occupancy x Upper conditional severity
The same identity applies to the lower side.
In the readout:
F means observation frequency or occupancy.
S means conditional squared-excursion severity.
Frequency describes how often observations occurred on one side of the basis.
Severity describes how large the squared excursions were when observations occurred on that side.
This distinction allows two windows with similar directional semivariance to be interpreted differently.
For example:
- Frequent but relatively small upper deviations can produce upper-side dispersion.
- A small number of very large upper deviations can produce a similar amount of upper-side dispersion.
- Frequency and severity can both favor the same side.
- Frequency can favor one side while severity favors the other.
The raw mathematical identity is exact. For visual stability, the MASS, frequency, and severity diagnostics shown in the panel are smoothed independently. Therefore, the displayed smoothed values should be interpreted as stable diagnostics rather than as an algebraic identity between the visible numbers.
What makes this script different
The original contribution is not simply the use of different upper and lower band widths. Asymmetric volatility bands and directional semivariance concepts already exist.
This script extends the analysis by connecting four related layers in one coherent framework:
1. Directional dispersion mass
It measures how total basis-relative squared dispersion is divided between the upper and lower sides.
2. Level attribution
It separates each side's directional semivariance into:
- Observation frequency or occupancy
- Conditional squared-excursion severity
3. Mass Shift Attribution
It decomposes the one-bar change in directional semivariance into:
- A frequency-change contribution
- A severity-change contribution
4. Trader-facing geometry
It connects those attribution measurements to independently stabilized asymmetric wings, side-normalized stretch, wing motion, transition markers, and alerts.
The script does not combine unrelated oscillators, volume filters, trend scores, or multi-timeframe indicators. All principal outputs derive from the same basis-relative directional-dispersion framework.
Asymmetric wing construction
The primary upper and lower wings are not conventional symmetric Bollinger Bands.
The script first calculates the conditional variance for each side. When one side contains only a small number of observations, its conditional variance can become unstable or overly dependent on one data point.
To reduce this problem, the displayed geometry uses Sparse-Side Stabilization.
A side with fewer observations is partially shrunk toward the pooled variance of the full rolling window. A side with more observations retains more of its own conditional variance.
Conceptually:
Stabilized side variance =
Side weight x Side conditional variance
+
(1 - Side weight) x Pooled variance
The side weight increases with the number of observations on that side.
The stabilized upper and lower variances are converted into wing distances using their square roots, the Wing Multiplier, and optional RMA smoothing.
Upper wing = Basis + Stabilized upper distance
Lower wing = Basis - Stabilized lower distance
This stabilization affects the displayed wing geometry only. The underlying MASS, Frequency, Severity, and identity diagnostics remain based on the unshrunk directional statistics.
The optional Classic Symmetric Reference displays a conventional SMA-centered standard-deviation envelope for comparison. It is disabled by default to keep the publication chart clear.
Visual readout
The compact panel is organized into seven rows.
Header
The header shows:
- The script name
- LIVE or CLOSE execution status
- The current upper/lower dispersion-mass state
Examples:
UPPER MASS 60.2%
LOWER MASS 58.7%
MASS 51.0%/49.0%
The percentages are smoothed directional semivariance shares. They are not probabilities, expected returns, price targets, or forecasts.
MASS
MASS shows how directional semivariance is divided between the upper and lower sides.
The cyan value represents the upper share.
The magenta value represents the lower share.
The two displayed shares sum to 100%.
A larger upper share means that observations above the basis currently account for more of the smoothed basis-relative squared dispersion. A larger lower share means that observations below the basis account for more.
ATTRIB
ATTRIB describes the composition of the current asymmetry.
F = Observation frequency or occupancy
S = Conditional squared-excursion severity
The symbols have the following meanings:
F▲ = Frequency favors the upper side
F▼ = Frequency favors the lower side
F· = No material frequency bias
S▲ = Conditional severity favors the upper side
S▼ = Conditional severity favors the lower side
S· = No material severity bias
S? = Severity cannot be compared because one side has too few observations
The ATTRIB states are:
Balanced
Neither frequency nor severity exceeds the selected significance threshold.
Frequency
Observation frequency favors one side, while conditional severity is approximately balanced.
Severity
Conditional severity favors one side, while observation frequency is approximately balanced.
Reinforced
Frequency and severity favor the same side.
Offset
Frequency and severity favor opposite sides. One side may occur more often while the other side contains larger conditional excursions.
Sparse
One side does not contain enough observations for a reliable two-sided severity comparison.
No dispersion
The rolling window contains no meaningful basis-relative dispersion.
Warming
The required rolling history is not yet available.
SHIFT
SHIFT analyzes how directional dispersion changed from the previous bar to the current bar.
For either side:
Semivariance = Occupancy x Conditional severity
The one-bar product change is decomposed as:
Delta semivariance =
Delta occupancy x Average conditional severity
+
Delta conditional severity x Average occupancy
This midpoint formulation allocates the interaction between occupancy and severity equally, avoiding dependence on whether frequency or severity is applied first.
The script calculates this decomposition separately for the upper and lower sides, then evaluates the change in the upper-minus-lower directional semivariance difference.
In the SHIFT row:
F↑ means the frequency component is moving directional dispersion toward the upper side.
F↓ means the frequency component is moving directional dispersion toward the lower side.
S↑ means the severity component is moving directional dispersion toward the upper side.
S↓ means the severity component is moving directional dispersion toward the lower side.
A centered dot means the component is below the configured significance threshold.
Possible SHIFT states include:
Frequency upper or Frequency lower
The occupancy-change component is dominant.
Severity upper or Severity lower
The conditional-severity-change component is dominant.
Reinforced upper or Reinforced lower
Frequency and severity changes are both moving directional dispersion toward the same side.
Shared upper or Shared lower
Both components contribute in the same net direction without one meeting the configured dominance ratio.
Offset
Frequency and severity changes oppose each other.
Stable
The net normalized directional mass shift is below the selected threshold.
The displayed Delta value is normalized by the average total semivariance of the two compared windows. It is not a price percentage, return estimate, or directional probability.
STRETCH
STRETCH measures the current Source distance from the basis using the wing on the same side.
When Source is above the basis:
Stretch =
(Source - Basis) / Upper wing distance
When Source is below the basis:
Stretch =
-(Basis - Source) / Lower wing distance
Interpretation:
+1.00x = Source is at the upper wing
-1.00x = Source is at the lower wing
+0.50x = Source is halfway from the basis to the upper wing
-0.50x = Source is halfway from the basis to the lower wing
A value above +1.00x or below -1.00x means the selected Source is outside the corresponding asymmetric wing.
Stretch does not predict continuation or reversal. It only reports the current location relative to the side-specific dispersion geometry.
WINGS
WINGS shows the one-bar movement of the stabilized upper and lower wing distances.
U refers to the upper wing.
D refers to the lower wing.
Arrow meanings:
↗ = Expanding beyond the selected Wing Motion Threshold
↘ = Contracting beyond the selected Wing Motion Threshold
→ = Approximately stable
The ratio on the right is:
Upper wing distance / Lower wing distance
A ratio above 1.00 means the upper wing is wider.
A ratio below 1.00 means the lower wing is wider.
The ratio describes asymmetric geometry, not directional probability.
NOW
NOW reports the current side-normalized location or the most recent live transition preview.
Possible location states include:
- Upper outside
- Upper edge
- Upper half
- On basis
- Lower half
- Lower edge
- Lower outside
The C value is the realized rolling containment percentage.
Containment measures how often the selected Source was inside the displayed asymmetric wings over the configured Containment Lookback.
This is a backward-looking realized statistic. It is not a guaranteed future coverage probability.
How to use the indicator
A practical reading sequence is:
1. Read MASS
Determine whether basis-relative squared dispersion is currently concentrated more heavily above or below the basis.
2. Read ATTRIB
Determine whether the current asymmetry is associated primarily with:
- More observations on one side
- Larger excursions on one side
- Both factors reinforcing each other
- Opposing frequency and severity effects
- An insufficient side sample
3. Read SHIFT
Determine whether the directional dispersion difference is currently changing and whether frequency or severity is producing that change.
4. Read STRETCH
Locate the current Source relative to the corresponding asymmetric wing.
5. Read WINGS
Check whether the upper and lower dispersion envelopes are expanding, contracting, or remaining stable.
6. Read NOW and containment
Confirm the current location or transition and review how frequently the Source has historically remained inside the displayed wings.
Example interpretations:
UPPER MASS with Frequency attribution
Observations have occurred above the basis more often, but upper-side conditional excursion severity is not materially larger.
UPPER MASS with Severity attribution
Upper-side observations may not be more frequent, but their conditional squared excursions are larger.
UPPER MASS with Reinforced attribution
Both observation frequency and conditional severity favor the upper side.
UPPER MASS with Offset attribution
One component favors the upper side while the other favors the lower side. The total upper mass reflects the net result.
Upper mass with SHIFT moving lower
The current level remains upper-dominant, but the latest window change is moving directional dispersion back toward the lower side.
Balanced MASS with active SHIFT
The current upper/lower mass level is near balance, but the most recent change is moving that balance toward one side.
These readings provide context. They do not prescribe an entry, exit, stop, position size, or trade direction.
Markers
The script uses sparse transition markers rather than marking every bar outside a wing.
Triangle above a bar
The selected Source has moved from inside to outside the upper wing.
Triangle below a bar
The selected Source has moved from inside to outside the lower wing.
Circle on an upper or lower wing
The selected Source has returned inside after being outside that wing.
Diamond on the basis
The selected Source moved directly from outside one wing to outside the opposite wing. This is consolidated into one Cross-Wing Jump event so the same bar does not receive duplicate excursion and re-entry markers.
Optional dominance markers
These identify a confirmed transition into upper-mass or lower-mass dominance.
Markers describe transitions across the calculated geometry. They are not buy or sell signals and do not imply that price will reverse, continue, or reach a target.
Alerts
Alert conditions are available for:
- Upper asymmetric excursion started
- Lower asymmetric excursion started
- Upper asymmetric re-entry
- Lower asymmetric re-entry
- Direct cross-wing jump to the upper side
- Direct cross-wing jump to the lower side
- Upper semivariance-mass dominance started
- Lower semivariance-mass dominance started
Confirmed Events Only is enabled by default.
With this setting enabled, markers and alerts wait for the bar to close. The asymmetric wings and visual readout continue to update during the forming bar.
Main settings
Source
Selects the price or indicator series analyzed by the script.
Attribution Length
Sets the rolling observation window.
Basis Type
SMA is the conventional statistical-center setting.
EMA, RMA, and WMA are provided as basis-relative research alternatives. When one of these alternatives is selected, the directional partial moments are measured around that selected moving basis rather than around the arithmetic sample mean.
Wing Multiplier
Scales the upper and lower stabilized wing distances.
The multiplier is not a confidence level.
Sparse-Side Stabilization
Controls how strongly a side with few observations is shrunk toward pooled dispersion.
A value of zero disables shrinkage when that side contains observations.
Wing Smoothing
Applies RMA smoothing to the displayed wing distances.
Attribution Smoothing
Smooths MASS, Frequency, and Severity diagnostics to reduce one-bar flicker.
Dominance Entry and Release Thresholds
Create hysteresis around the upper-mass, balanced, and lower-mass states.
Minimum Observations Per Side
Sets the minimum sample required on both sides before Severity is compared.
Mass Shift Smoothing
Smooths the Frequency and Severity components of the one-bar SHIFT calculation.
Mass Shift Significance Threshold
Controls when a SHIFT component is displayed as materially active.
Mass Shift Driver Dominance Ratio
Controls how much larger one component must be before it is classified as the dominant SHIFT driver.
Edge Zone Starts At
Defines when STRETCH is considered near an upper or lower wing.
Containment Lookback
Sets the rolling window for realized containment.
Visual settings
Allow the user to control wing visibility, split fills, the optional state rail, dominant-wing glow, classic symmetric reference, line widths, transparency, colors, readout position, text size, and price-axis clearance.
Live-bar behavior
The script does not request higher-timeframe data, use lookahead logic, or intentionally access future bars.
Historical calculations use the chart's available data and the selected settings.
During the current forming bar:
- Wings can change
- MASS can change
- ATTRIB can change
- SHIFT can change
- STRETCH can change
- WINGS can change
- NOW can change
This is normal real-time indicator behavior.
When Confirmed Events Only is enabled, transition markers and alerts are recorded only after bar close. Disabling that setting allows intrabar events, which can appear and disappear before the bar closes.
Data Window outputs
The script provides research values in the Data Window, including:
- Semivariance Mass Bias
- Observation Frequency Bias
- Conditional Severity Bias
- Upper Semivariance Share
- Lower Semivariance Share
- Asymmetric Side-Normalized Stretch
- Upper Stabilized Wing Distance
- Lower Stabilized Wing Distance
- Realized Envelope Containment
- Side Sample Adequacy
- Smoothed Directional Mass Shift
- Flow Bridge Identity Residual
The Flow Bridge Identity Residual allows users to inspect the numerical consistency of the raw one-bar frequency/severity decomposition. Small non-zero values can occur because of floating-point arithmetic.
Limitations
This indicator is backward-looking and descriptive. It does not estimate the probability of future price direction, reversals, breakouts, continuation, or profitability.
The primary wings are not conventional Bollinger Bands and are not confidence intervals.
The Wing Multiplier does not imply a 68%, 95%, or 99% probability range.
Realized containment is calculated from past rolling observations and does not guarantee future containment.
The rolling statistics compare historical observations with the current selected basis for each calculation window. They do not compare every historical observation with the basis value that existed on that historical bar.
SMA provides the conventional arithmetic-center interpretation. EMA, RMA, and WMA create basis-relative research variants whose partial moments should not be interpreted as conventional sample semivariance around the arithmetic mean.
Conditional Severity requires observations on both sides. When one side does not meet the configured minimum sample, the script displays Sparse and S? instead of treating the missing comparison as neutral evidence.
Sparse-Side Stabilization intentionally modifies displayed wing geometry when a side has few observations. It does not modify the raw attribution statistics.
Smoothing reduces visual noise but introduces lag.
Results depend on the selected Source, length, basis, multiplier, thresholds, market, timeframe, and available data.
For conventional interpretation, use standard time-based charts. Synthetic chart types can change the input price series and therefore change calculations and alerts.
A movement outside a wing does not necessarily indicate overbought, oversold, exhaustion, breakout confirmation, reversal, or continuation.
This indicator should be used as an analytical context tool alongside the user's own market structure, execution, and risk-management process.
Open-source transparency
The script is published open-source so users can inspect the calculations, verify the attribution identities, review the stabilization logic, study the Data Window outputs, and modify the available research settings.
The indicator provides measurements and alerts only. It does not place orders, simulate performance, report a win rate, or guarantee trading results. Indicateur

TIS_SwingOVERVIEW
TIS_Swing detects swing highs and swing lows and, unlike most pivot tools, publishes the last confirmed level as a continuous value that other scripts can read.
Standard pivot indicators return a number only on the bar where the pivot is confirmed and nothing on every other bar. That is fine for drawing a dot on the chart, but it makes the level unusable for comparison: on any given bar you cannot ask whether the current price is above the last confirmed swing high, because on that bar the pivot series holds no value. TIS_Swing keeps the level alive between pivots, so that question can be answered on every bar, by you visually or by another script through the source dropdown.
HOW IT WORKS
A bar qualifies as a swing high when its high is greater than or equal to the highs of the bars that follow it, and strictly greater than the highs of the bars that precede it. The number of bars checked on each side is set by Strength Left and Strength Right. Swing lows use the mirrored rule. The comparison on the right side is inclusive, so a candidate that ties with a later bar still qualifies; this produces slightly more pivots than a strictly greater definition, and is intentional.
A pivot can only be confirmed once the bars to its right exist, so a pivot is always confirmed Strength Right bars after it forms. It is never confirmed earlier and it is never revised afterwards, so nothing repaints.
Once a pivot is confirmed, its price becomes the current level for that side and stays there until the next pivot on the same side replaces it. When the series trades through the level, the level is marked as broken. What happens next depends on Remove Broken Pivot Lines:
- ON, the default: the visible level is dropped and no level is shown until a new pivot forms. This is the familiar behaviour of most pivot tools.
- OFF: the visible level stays where it was until a new pivot replaces it, so a broken level remains on screen as a reference.
Either way, a second pair of values keeps the last level regardless of the setting. Those are the plots marked (persistent), and they exist so that comparisons are always possible.
WHAT YOU CAN DO WITH IT
Market structure on price. With the level available on every bar, a higher high is simply the current price trading above the last confirmed swing high, and a lower low is the mirror. You can read it off the chart or compute it in your own script by selecting Last Swing High (persistent) as a source and comparing it against the close.
Divergence on an oscillator. Turn on Use Other Source, point it at a stochastic, an RSI or any other plotted series, and move the script to its own pane. The pivots are then detected on the oscillator instead of on price. A higher swing low on the oscillator while price is still making lower lows is a classic divergence, and here it is visible as a stepped level moving up while price moves down.
Breakout timing. With Remove Broken Pivot Lines on, the moment the level disappears is the moment the last swing was taken out. That transition is also available as an alert.
PARAMETERS
Parameters
- Strength Left: bars to the left of the candidate that must be lower for a high, or higher for a low. Default 5.
- Strength Right: bars to the right required to confirm the pivot. Also the confirmation delay, in bars. Default 2.
- Remove Broken Pivot Lines: drop the visible level once it is broken. Default on. Does not affect the (persistent) plots.
- Use Other Source: detect pivots on another plotted series instead of the bar highs and lows. Both sides then use the selected series.
- Source: the series used when Use Other Source is on.
Visual Settings
- Show Levels: opacity of the stepped level lines.
- Show Persistent Levels: opacity of the thin lines that always keep the last level. Off by default to keep the chart clean.
- Show Pivot Markers: diamonds drawn on the confirmed pivot bars.
- Extend to the Right: horizontal line projected forward from the last pivot on each side.
- Swing High Color, Swing Low Color, Line Width, Extension Line Style.
The Show options change opacity only. The four series are always published, so another script can read them even when they are not visible on the chart.
OUTPUTS
Four values are available in the source dropdown of any other indicator or strategy:
- Last Swing High and Last Swing Low: the level as shown, honouring Remove Broken Pivot Lines.
- Last Swing High (persistent) and Last Swing Low (persistent): the last confirmed level, kept regardless of that setting.
Four alerts are available: New Swing High, New Swing Low, Swing High Broken, Swing Low Broken.
LIMITATIONS
- A pivot is confirmed Strength Right bars after the bar that forms it. On the chart this looks like a delay, and it is one. It is inherent to any pivot definition that requires confirmation from the right, and it is the price of not repainting.
- These levels are reference points, not entry signals. Nothing here tells you which way to trade.
- With Remove Broken Pivot Lines on, the level is dropped on the same bar as the break. A comparison such as close above Last Swing High will therefore never be true, because the value is already gone by the time it would be. Use the (persistent) plots for that comparison, or detect the break as the transition of the visible plot to no value.
- Before the first pivot on a side is confirmed, that side publishes no value.
- Pine fixes the pane at compile time, so with a non-price source the script has to be moved to its own pane manually.
- Larger Strength values give fewer and more significant levels but a longer confirmation delay. There is no setting that avoids that trade-off. Indicateur

SW_WickSize═════════════════════════════════════════════════════════════
// SW_UPPER/LOWER WICKSIZE — USER GUIDE
// ═════════════════════════════════════════════════════════════
//
// WHAT IT DOES
// Draws ONE box per bar, colored to match that bar's own candle color
// (green candle -> green box, red candle -> red box). Each box crosses
// a zero baseline: the part above zero is the rolling average of that
// color's upper wick, the part below is the rolling average of that
// color's lower wick.
//
// A bar where close == open (neither green nor red) draws no box.
//
// WICK DEFINITIONS
// Green upper wick = high - close Green lower wick = open - low
// Red upper wick = high - open Red lower wick = close - low
//
// AVERAGING
// Both colors' wick values are computed on every bar (0 on bars that
// don't match that color), then smoothed with a simple moving average
// over the last `x` bars. This means the average reflects both how
// large the wicks are AND how often that color occurs in the lookback
// window — fewer bars of a color in the window pulls its average down
// even if the bars that did occur had large wicks.
//
// BOX SIZE — REAL PRICE UNITS, NOT A PERCENTAGE
// Box height is the actual averaged wick length on the same price
// scale as the candles above, not a percentage or fraction of the bar.
//
// HOW THE BOX IS DRAWN (plotcandle, not box.new)
// The box is drawn using plotcandle() — Pine's native candle-shape
// plot — rather than box.new(). plotcandle(open, high, low, close)
// normally draws OHLC; here open=high=top value and close=low=bottom
// value, which collapses the "wick" to nothing and makes the "body"
// span exactly , giving a solid rectangle crossing zero.
// Using plotcandle guarantees the box aligns exactly under its own
// candle at every zoom level, since it shares the same native
// rendering pipeline as real candles (manual box.new() coordinates,
// whether time-based or index-based, cannot achieve this reliably).
//
// PLOTCANDLE STYLE-TAB NOTE
// plotcandle always exposes Body/Wick/Border as separate color pairs
// in the Style tab — this is a fixed platform behavior. We only use the
// Body color setting. Wick and Border color settings can be ignored.
//
// DOJI MARKER
// A yellow diamond is drawn exactly on the zero line whenever a
// candle's body is small relative to its full high-low range (default
// 5%). This is a visual flag only — it never affects bar
// classification or the wick averages. Drawn last so it renders above
// both the boxes and the zero line.
//
// LAYERING
// Draw order is: plotcandle (boxes) -> hline (zero line) -> plotshape
// (doji marker). Pine renders later plot-family calls on top of
// earlier ones, so the zero line sits above the boxes, and the doji
// diamond sits above everything.
//
// INPUTS
// x — lookback length for the averages (default 5)
// showGreenBox/showRedBox — per-color visibility toggle
// greenColor/redColor — box colors
// scaleHeadroomPts — additive invisible scale padding: adds a fixed
// number of points above the tallest recent bar
// to push the zero line further down in the
// pane. 0 = off.
// dojiBodyPct — doji threshold, as % of that bar's high-low
// range (default 5%)
// ════════════════════════════════════════════════════════════ Indicateur

STRYK: MOMENTUMSTRYK: MOMENTUM: puts context on price in one overlay: a rolling volume-weighted average price with deviation bands, a long exponential moving average with an optional smoothing overlay, candles coloured by a selectable read (order-flow delta, participation fuel, or three price-only modes), a volume-participation background shade, and the session level map — previous Day / Week / Month highs and lows with an optional internal quartile grid, plus the overnight Asian range. Every block has a master switch and its own settings, including quick switches for the quartile lines, the zones and the paint mode; run all of it or one piece.
## Rolling VWAP
Volume-weighted average price over the last N candles of a chosen delta timeframe — with the defaults, 60-minute candles × 20, a 20-hour VWAP that slides forward as each candle completes rather than anchoring to a session. Volume-weighted standard-deviation bands at ±1σ, ±2σ and ±3σ with individual multipliers, colours and an optional ±1σ fill. The window is computed from chart bars on a ring buffer with running sums, so it loads cleanly in bar replay. A visual smoothing pass (adjustable, 1 = off) rounds the small steps that occur as the oldest candle leaves the window; the underlying values are exact.
If the chart timeframe is raised above the delta timeframe, the delta timeframe is lifted to match for that session with the same lookback (switchable to a strict error instead).
## EMA
TradingView's standard exponential moving average — length (default 233), source and offset — with its standard smoothing-MA option (SMA, EMA, SMMA/RMA, WMA, VWMA, or SMA with Bollinger Bands, default length 233) and an additional visual smoothing pass on the plotted line (1 = the stock EMA exactly).
## Candle paint — sixteen modes
Every candle (body, wick, border) is coloured by the selected mode, fading between a bear colour, a neutral colour and a bull colour through an adjustable response curve. Hide the chart's own candles so only the painted set shows. Most modes self-calibrate against their own recent history (percentile rank rather than fixed thresholds) and brighten when the bar's delta agrees with the read, dimming when it disagrees. Several modes share one visual language: a reference box (a bar's or period's value area, the previous day's range, the overnight range) — blue inside it, deepest at the centre and fading toward the edges; green above, red below, ramping with distance beyond.
Volume-profile modes — every profile is built from intrabar volume at price: **Delta size** (each bar against the prior bar's own point of control and value area), **Delta size HTF** (each bar against the last completed delta-timeframe candle's point of control and value area, alignment checked against the live higher-timeframe delta), **POC trend** (which way the live delta-timeframe candle's point of control has migrated against the completed candles before it — acceptance moving up or down — halved inside that candle's value area, boosted outside it on the migration's side; switchable to the full-session profile), and **Value area** (the session's value area as the box, brightest at the session point of control).
Order-flow modes: **Delta %** (delta as a share of volume, self-calibrated, size-gated, weighted toward how the bar closed, compounding across consecutive same-direction bars), **Fuel × Δ** (sign from the bar's delta, intensity from fuel — spike-aware participation shaped by a bell that stays full above its peak, delta agreement against the bar's own direction, and the side of the EMA), and **Participation band** (crowd presence only, no direction — a smooth gradient across the full participation rank; the background tint switches itself off while this mode is active).
Structure and level modes: **Pivot structure** (above the last confirmed pivot high bull, below the last pivot low bear, between neutral; pivots confirm after the pivot length and do not repaint), **Pivot structure HTF** (the same pivots computed on the delta timeframe's own bars), **Market structure** (a latched trend state that flips only on a close through the opposite pivot; the flip flashes at an intensity set by its quality — break distance and delta agreement — then settles to a baseline that keeps that quality), **Day range position** (the previous day's high and low as the box), and **Asian range position** (the overnight range as the box; breaks from a tight overnight range weigh more).
Trend and momentum modes: **EMA trend** (side of the script's EMA, distance self-calibrated, multiplied by the EMA's own slope and — when a smoothing line is enabled — by the EMA's position against it, with a brief flash on the bar price first crosses), **VWAP σ-distance** (stretch from the rolling VWAP in standard deviations, with a distinct exhaustion colour when price is beyond the chosen σ and delta disagrees), **Candle conviction** (pure price action — body dominance self-calibrated, gated by bar range, compounding across consecutive bars), and **RSI momentum** (gradient around 50, self-calibrated, weighted by RSI velocity and fast/slow agreement, overridden by a distinct colour on confirmed pivot divergence).
## Volume participation background
A volume EMA is normalised 0–100 against its own recent range. At the extremes the chart background tints — one colour when participation is unusually high, another when the tape is unusually quiet. Thresholds, transparency and colours are inputs.
## Session levels
**Previous Day / Week / Month high and low.** Each level comes from the completed period and is drawn from the new period's open — non-repainting. Per-timeframe toggles, colours, widths and how many past levels to keep; optional fade on older levels, name labels with position and per-timeframe text settings, extend-to-chart and project-forward options. Week start (Sunday futures / Monday cash) and the daily session-open hour are inputs. An optional **quartile grid** adds dashed lines at the 25 / 50 / 75% marks inside each shown range, and optional **zones** shade a band around each high and low line — an eighth of the range above and below it.
**Asian range.** High and low of the overnight Asian session (window set in HHMM, exchange time). The range draws dotted while the session builds, confirms solid at the session end, and can extend across the trading day or to the end of the chart. A configurable number of past sessions stays on the chart.
## Delta source — read this
Where TradingView provides volume footprint data for the bar, delta comes from `request.footprint()` bid/ask buy and sell volume. Footprint availability depends on your plan and the symbol; where it is not available the script falls back to an **estimate** of delta derived from lower-timeframe bar polarity, with the intrabar resolution chosen automatically against your plan's data budget. Estimated delta is not order-flow data and can differ materially from true delta. The footprint is built from TradingView's own tick feed: a broker data subscription does not make it real-time, and a "Delayed" chip on the chart means the colours are delayed by the same amount.
## Why these parts are together
Each block answers one part of the same question — is the current move worth trusting, and against which levels: the VWAP and bands give the fair-value anchor and stretch, the EMA gives the higher-order trend, the paint says whether the bar is being paid for (or, in the price-only modes, where it stands in structure), the background says whether anyone is participating at all, and the session levels supply the locations where those answers matter. The components are original implementations built for this combination: the rolling VWAP is window-based rather than session-anchored, the fuel paint is this script's own participation model, and the level engine draws only completed, non-repainting periods.
## Repainting
The live delta-timeframe candle's colour updates on every tick by design; completed candles do not change. Pivots (and the divergence and structure reads built on them) confirm after the pivot length. Streak counters advance only on bar close. Session levels come only from completed periods. The VWAP, bands, EMA, RSI and ATR are standard rolling calculations.
## What it is not
It draws context. It makes no prediction and contains no trade logic. Indicateur

Indicateur

Signal Expectancy Analyzer [SpokoStocks]Signal Expectancy Analyzer answers one question: on this chart, what has actually happened after a signal in the past? It covers majority of indicator in TradingView's Technicals panel as an event, lets you connect any other indicator, and ranks all of them against each other on the symbol and timeframe you trade.
WHAT IT SHOWS
• A statistics table for the selected signal at four horizons (5, 10, 20 and 40 bars by default): number of signals, win rate, average and median forward return, the baseline return of any bar over the same horizon, the edge over that baseline, a t-statistic, and the average maximum favourable and adverse excursion.
• A leaderboard that ranks all 43 built-in signals by their edge at the primary horizon, so you can see which standard indicators have historically worked on this chart and which have not.
• A projected cone from the most recent signal: the average historical path and a one-standard-deviation band, drawn forward on the price chart.
• Signal markers coloured by outcome at the primary horizon: won, lost, or still pending.
• A compact return distribution in the table.
SIGNALS INCLUDED
Every indicator from the Technicals panel, each as a bullish and a bearish event: RSI(14) oversold and overbought, Stochastic(14,3) crosses in the extreme zones, CCI(20) crossing ±100, ADX(14) directional crosses, Awesome Oscillator zero cross, Momentum(10) zero cross, MACD(12,26,9) signal cross, Stochastic RSI crosses in the extreme zones, Williams %R(14) crossing −80 and −20, Bull Bear Power(13) zero cross, Ultimate Oscillator crossing 30 and 70, close crossing EMA(20), SMA(50) and SMA(200), golden and death cross, close crossing the Ichimoku cloud, Hull MA(9) turns, close crossing VWMA(20). Also Bollinger Band touches, N-bar low and high closes, gaps, and an external source that takes any plot from any other indicator on your chart.
Every signal is an event, the first bar its condition becomes true, never a state, and a cooldown prevents clustered signals from being counted several times. Each signal has a natural direction, so a bearish signal counts a falling market as a win.
HOW IT WORKS
The script cannot look into the future, so it works backwards: on every bar it checks which signals fired h bars ago and records the return from that bar's close to the current close, together with the highest and lowest price reached in between. Baseline is the average h-bar return of every bar on the chart, which is what a random entry would have earned; edge is the signal's average minus that baseline. The t-statistic is the average divided by its standard error; values beyond ±2 suggest the result is unlikely to be noise. The cone is the bar-by-bar average path after all past occurrences of the selected signal, with one standard deviation either side, anchored to the latest signal's close.
HOW TO USE IT
1. Apply the indicator to the chart and timeframe you actually trade.
2. Read the leaderboard first. Signals near the top with a t-statistic beyond 2 and at least 30 occurrences deserve attention; the rest is noise on this chart.
3. Select any signal to study it in depth, or connect your own indicator through the external source.
4. Compare edge with baseline. A high win rate with no edge simply means the market was trending.
5. Use average MFE and MAE to set targets and stops that match how the signal has behaved.
6. Use the cone as a visual expectation for an open signal, not as a prediction.
LIMITATIONS
• Results depend on the history loaded on the chart and change as bars are added.
• Testing 43 signals at once invites false positives: with that many comparisons, a few will look good by chance. Treat the leaderboard as a screening step and confirm on other timeframes and symbols.
• Overlapping signals share bars, so returns are not fully independent and the t-statistic is indicative rather than exact.
• The cone assumes the future distribution resembles the past and ignores regime changes.
• The external source only triggers on the transition above zero.
Indicateur

Indicateur

MA Trend Ribbon# MA Trend Ribbon
## Overview
MA Trend Ribbon is a trend-following overlay that sits directly on the price chart. It draws a band made of six moving-average lines stacked from fastest to slowest. The band fills with color to show whether the market is leaning up or down, and it prints clear BUY and SELL labels at the moments the trend flips. It can also read the entire ribbon from a higher timeframe, so a lower-timeframe chart can be traded in line with the broader trend. The goal is a single, easy-to-read picture of trend direction and the points where that direction changes.
## What It Shows
- **The ribbon** — six moving averages of increasing length, drawn together as a colored band. When the band tilts and expands upward the trend is up; when it rolls over and expands downward the trend is down. A band that pinches flat signals a market with little direction.
- **The color** — the entire ribbon turns one color for an up-trend and another for a down-trend, so direction reads at a glance without studying the individual lines.
- **The labels** — a BUY label marks the bar where the trend turns up, and a SELL label marks the bar where the trend turns down. By default the labels ride the ribbon itself, sitting just outside the band; they can instead be pinned to the price candles. A label always appears on the same bar the ribbon changes color, so the two never disagree.
- **Optional bar coloring** — price bars can be tinted to match the trend for an even faster read.
- **Alerts** — built-in alerts announce each new BUY and SELL so the chart does not have to be watched constantly.
## The Structure Timeframe
The ribbon can be calculated on a timeframe other than the one being viewed. Left blank, it simply uses the chart's own timeframe. Set to a higher timeframe, the whole ribbon — its lines, its color, and its signals — is drawn from that broader view and displayed on the current chart. This makes it possible to watch a fast chart while keeping every reading aligned to a slower, more meaningful trend.
Two things are worth knowing when a higher timeframe is selected. The ribbon will look stepped, because each higher-timeframe value holds flat across the smaller bars until the larger bar completes. And the most recent portion can shift while the current higher-timeframe bar is still forming, settling once that bar closes; the confirm-on-close option keeps alerts from acting before it settles.
## How Direction Is Decided
The ribbon offers two ways to define the trend, chosen from a single setting:
- **Ribbon Flip** — the trend is up while the fastest line sits above the slowest line, and down when it drops below. This waits for the whole ribbon to turn over, giving steadier, less frequent signals.
- **Fastest MA Slope** — the trend is up the moment the fastest line starts rising and down the moment it starts falling. This reacts earlier and produces more signals.
Whichever method is selected controls both the ribbon color and the labels, keeping the visual and the signals in step.
## Choice of Averages
The ribbon is not limited to one style of average. A dropdown selects the type used for all six lines, ranging from smooth-and-steady to fast-and-reactive. Smoother types change direction later but hold trends more calmly. Faster types change direction sooner but shift more often. Because every line uses the same base length regardless of the type chosen, the base length usually deserves a fresh look after switching types, since the same number behaves differently from one average to the next.
The default type is volume-weighted, which leans on the bars that trade the most. On symbols whose data feed does not carry real volume, a volume-weighted average may behave unpredictably; on those markets one of the price-only types is the better choice.
## Optional Polish
Two extra touches can be switched on to make trends easier to judge, and both are off by default so the standard look stays clean:
- **Momentum-scaled ribbon** — the fill grows more solid as the band expands during a strong trend and fades as it compresses in a quiet market, so strong moves stand out and flat stretches recede.
- **Price-to-ribbon fill** — a soft shade fills the gap between price and the ribbon, making pullbacks toward the band easy to spot.
---
## User Inputs
### Structure
- **Structure Timeframe** — the timeframe the entire ribbon is calculated on. Blank uses the chart's own timeframe. A higher selection draws that higher timeframe's ribbon and signals on the current chart. Default is blank.
### Moving Average
- **Source** — the price used for the calculation. Default is the closing price. Other choices include the open, high, low, or an average of these.
- **MA Type** — the style of average used for every line in the ribbon. Ten options are available, from the smoothest and steadiest to the fastest and most reactive: Simple, Exponential, Weighted, Hull, Wilder's, Volume-Weighted, Double Exponential, Triple Exponential, Arnaud Legoux, and Least Squares. Default is Volume-Weighted.
- **Base MA Length** — the length of the fastest line in the ribbon. Smaller values make the whole ribbon quicker to react; larger values make it slower and smoother. Default is 40.
- **Ribbon Spacing** — the amount added to each line's length as the ribbon steps from fastest to slowest. Smaller values pack the six lines into a tight band; larger values spread them apart so the band widens and narrows more dramatically. Default is 8.
### Advanced MA Inputs
These settings apply only to specific average types and are ignored by the rest.
- **ALMA Offset** — applies only when the Arnaud Legoux type is selected. Higher values make that average track price more closely; lower values make it smoother. Default is 0.85.
- **ALMA Sigma** — applies only when the Arnaud Legoux type is selected. Larger values produce a smoother line; smaller values follow price more closely. Default is 6.
- **LSMA Offset** — applies only when the Least Squares type is selected. Shifts that line forward or backward by a set number of bars. Default is 0.
### Signals
- **Signal Trigger** — chooses how the trend is defined, either Ribbon Flip (steadier, later) or Fastest MA Slope (earlier, more frequent). Default is Ribbon Flip.
- **Show Buy/Sell Labels** — turns the BUY and SELL labels on or off. Default is on.
- **Label Position** — chooses where labels sit. Ribbon attaches them to the band, just below the lowest line for a buy and just above the highest for a sell, so they travel with the ribbon. Bar pins them to the candles instead, below the low for a buy and above the high for a sell. Default is Ribbon.
- **Label ATR Offset** — sets how far a label sits from the ribbon in Ribbon mode, scaled to recent price movement so the gap stays consistent in calm and volatile markets. A value of zero places the label right on the band; larger values push it further away. Has no effect in Bar mode. Default is 0.5.
- **Color Bars By Trend** — tints the price bars to match the current trend color. Default is off.
- **Confirm Signals On Bar Close** — when on, alerts wait until a bar has fully closed before firing, so a signal cannot appear and then disappear before the bar finishes. Labels still show while the bar is forming. Default is on.
### Style
- **Bullish Color** — the color of the ribbon and labels during an up-trend.
- **Bearish Color** — the color of the ribbon and labels during a down-trend.
- **Ribbon Fill Transparency** — how see-through the shaded band is, from solid to invisible. Default is 78.
- **Ribbon Line Width** — the thickness of each ribbon line. Default is 1.
- **Label Size** — the text size of the BUY and SELL labels, from tiny to large. Default is Normal.
### Visual Polish
- **Momentum-Scaled Ribbon** — when on, the fill grows more solid as the ribbon expands and fades as it compresses, so trend strength is reflected in the shading. Default is off.
- **Strong-Trend Fill Transparency** — the solidity of the fill at full ribbon expansion when the scaling above is on. Lower is more solid. Default is 38.
- **Momentum Normalization Length** — how many bars are used to judge how wide the ribbon is now compared with its recent range. Shorter values react faster to changes in strength; longer values give a steadier scale. Default is 100.
- **Fill Price To Ribbon** — shades the gap between price and the ribbon to highlight pullbacks. Default is off.
- **Price Fill Transparency** — how subtle that price-to-ribbon shading is. Higher is fainter. Default is 88.
---
## Best Use
The ribbon works best as a trend filter rather than a stand-alone entry system. Trends are followed most cleanly when trades lean in the direction of the ribbon color, using the labels to mark the turning points. Reading the ribbon from a higher Structure Timeframe while entering on a faster chart is a natural way to keep trades aligned with the larger trend. In quiet, sideways markets the ribbon will change color back and forth and produce more frequent, less reliable signals; the Ribbon Flip setting and a wider spacing reduce this, at the cost of later entries. Faster average types and tighter spacing suit active, short-term charts, while smoother types and wider spacing suit calmer, longer-term views. Indicateur

B8 UltimateB8 Ultimate
An Open Price Range indicator that automatically identifies the High/Low of a reference hour and extends this range over a configurable duration.
Features:
Up to 5 configurable symbols.
Zones are displayed only on their corresponding symbol.
Independent reference time for each symbol, in 30-minute increments.
Independent time zone for each symbol, with automatic Daylight Saving Time (DST) handling.
Rectangle duration and color configurable for each symbol.
Optional first-hour marker.
Configurable number of historical zones.
IG DAX and CAC preconfigured, with 3 additional free slots.
Behatsla’ha
Notes:
Uses 1H data for XX:00 reference times and aggregates 2 × 30-minute candles for XX:30.
Rectangle border width and transparency are configurable globally.
Rectangle fill can be enabled or disabled.
The optional first-hour marker automatically adapts to the chart timeframe.
The first-hour marker is displayed only on timeframes below 1H.
For XX:30 reference times on a 1H chart, the rectangle starts at the opening of the 1H candle containing XX:30. Example: 14:30 → displayed from 14:00.
The rectangle end is recalculated from this visual starting point. With a 24-hour duration: 14:00 → 14:00 the following day, preventing overlapping zones.
The High/Low is always calculated from the actual reference hour.
Short legend name: B8.
==========================================================================
Français :
B8 Ultimate
Indicateur de type "open price range" permettant de matérialiser automatiquement le High/Low d’une heure de référence et de prolonger cette zone sur une durée configurable.
Fonctionnalités :
Jusqu’à 5 actifs configurables.
Affichage uniquement sur l’actif correspondant.
Heure de référence configurable par actif, par pas de 30 minutes.
Fuseau horaire indépendant par actif, avec gestion automatique des changements d’heure.
Durée et couleur du rectangle configurables par actif.
Marqueur optionnel de la première heure
Nombre de zones historiques configurable.
DAX et CAC IG préconfigurés, avec 3 emplacements supplémentaires libres.
Behatsla’ha
Notes :
Calcul en 1H pour XX:00 et agrégation de 2 × 30 min pour XX:30.
Épaisseur et transparence du rectangle configurables globalement.
Option pour afficher ou masquer le remplissage du rectangle.
Marqueur optionnel de la première heure, adapté automatiquement à l’unité de temps affichée.
Le marqueur est affiché uniquement sur les timeframes inférieurs à 1H.
Pour XX:30 sur un graphique 1H, le rectangle commence à l’ouverture de la bougie 1H contenant XX:30. Exemple : 14:30 → affichage à partir de 14:00.
La fin est recalculée depuis ce début visuel. Avec une durée de 24 h : 14:00 → 14:00 le lendemain, afin d’éviter le chevauchement des rectangles.
Le High/Low est calculé sur l’heure réelle de référence.
Nom court dans la légende : B8. Indicateur

Market Maker BoxMarket Maker Box draws the last completed candle’s high and low as a live trading box, then colors that box for the candle that is forming now.
The idea is simple: market structure from the previous candle becomes the range you scalp this candle. Green means the forming candle is leaning up. Purple means it is leaning down. No color means chop — stand down.
Built for 5m and 15m charts so price prints inside the box, not beside it.
The boxes
Turn on the timeframes you want. They all run the same engine.
4H — on by default. Prior 4-hour high/low over the current 4-hour window.
Daily — prior day high/low over today.
9-day — prior 9-day high/low over the current 9-day window.
When a window closes, that box dies and a new one starts from the candle that just completed. The box grows with printed bars and stops a few candles past price so the live bar is readable.
How to read it
Color Meaning Destination
Neon green
Forming candle leaning bullish
Upper half — median to high
Neon purple
Forming candle leaning bearish
Lower half — low to median
Orange / TF tint
Chop. No call.
No shade
The shaded half is where price is predicted to go on that candle, not where you blindly click.
Labels show the level and how far price is from it, in percent.
Optional fibs (0.236 / 0.382 / 0.618 / 0.786) draw on every box you have turned on.
The lean
Trend first. A dip does not flip a green box purple.
EMA stack and slope on that box timeframe
The two candles before the box
A higher-timeframe completed body (daily helps 4H, 9-day helps daily)
Live candle can confirm the trend
Live candle cannot reverse the color unless a sweep-and-reclaim prints late in the window
ADX chop gate — no color in a dead tape
Color must hold a few chart bars before it paints
Stack the boxes. A green 4H inside a green daily is the clean scalp. Mixed colors means wait.
How to use it
Green box, price in the lower quarter → look long toward the median, then the high
Purple box, price in the upper quarter → look short toward the median, then the low
Price already in the destination half → you are late; wait for a pullback or the next box
Narrow grey box → range is too thin; fees eat the trade
Box-timeframe closes outside the range → the box is dead. That is continuation, not a fade
The box is the map. Your entry is still a reclaim, a rejection, or a limit at the level.
Defaults that stay clean
4H box on. Daily and 9-day off. Median on. Extra fibs off. Destination shade on. Break stamps off.
Add daily and 9-day when you want higher-timeframe context. Leave them off when you only want the session range.
Alerts
Off by default. Optional:
Price taps the box high or low
Confirmed 4H lean flips to bull or bear
What this is not
Not a signal bot. Not a guarantee the forming candle closes that color. Not financial advice.
The box tells you where you are and which way this window is leaning. You still pick the trigger and the size.
Pine v6 · © SRUS · Education and research only. Indicateur

Indicateur

Indicateur

Key Levels by fehzyKey Levels draws the price levels intraday traders usually mark by hand, as dotted lines that start at the candle where each level formed and extend past current price, with labels.
LEVELS
- Day High/Low (live) and Previous Day High/Low (PDH/PDL)
- Week High/Low (live) and Previous Week High/Low (PWH/PWL)
- Asia, London and New York session High/Low
- Daily Open, Weekly Open, and Market Open price (default 09:30 New York) with an optional vertical line
HOW IT WORKS
- Session presets: Full sessions (Tokyo 09:00-18:00 Tokyo time, London 08:00-17:00 London time, New York 08:00-17:00 NY time), ICT killzones (Asia 20:00-00:00, London 02:00-05:00, NY 07:00-10:00, all NY time), or Custom times with a separate timezone per session. Each session runs on its own clock, so levels stay correct during the weeks when US and UK daylight saving dates differ.
- Session highs/lows update live while a session is open and freeze when it closes.
- Day/week boundary option: chart daily candle, NY 17:00, NY midnight, or UTC 00:00, so PDH/PDL can match the daily candles of the broker you actually trade on.
- Swept levels option: once price trades through a completed level (PDH/PDL, PWH/PWL, session H/L), the line can keep extending, stop at the sweep candle, or be hidden.
- Session resets also work on charts without overnight data (a long data gap starts a new session).
HOW TO USE
Apply on a 15m or lower chart. Choose the session preset and day boundary that match your market and broker. Use the levels as reference zones for liquidity and reactions. The script does not generate buy or sell signals.
LIMITATIONS
- Sessions are designed for 15m and lower. On 1H, a 09:30 start falls inside the 09:00 candle.
- Only the most recent instance of each level is drawn, not past days.
- Day and session levels show on intraday charts only. Weekly levels show on intraday and daily.
- Labels can overlap when two levels share the same price. Indicateur

LDO-Swing v1.0LDO-Swing v1.0 — Simple Guide
## Purpose
LDO-Swing identifies directional swing highs and swing lows, marks their price levels, and tracks each level until price invalidates it.
## Swing logic
### Swing low (SL)
A swing low forms when price moves into a pivot with bearish candles and then moves away with two bullish candles.
### Swing high (SH)
A swing high is the converse: price moves into a pivot with bullish candles and then moves away with two bearish candles.
The signal is confirmed only when the second moving-away candle closes. The SH or SL box is then drawn on the earlier pivot candle. This confirmation prevents temporary intrabar signals from appearing and disappearing.
## Pattern layouts
- **5-bar (separate pivot):** two incoming candles, one separate pivot candle, then two moving-away candles. This is the default.
- **4-bar:** the second incoming candle is also the pivot, followed by two moving-away candles.
## Structure lookback
The default structure lookback is **10 bars**.
When **Apply structure-lookback filter** is enabled:
- An SH must be higher than the highs of the selected number of bars before its pivot.
- An SL must be lower than the lows of the selected number of bars before its pivot.
- The two moving-away candles must also remain below the SH or above the SL.
A larger lookback produces fewer, more selective swings. A smaller lookback produces more signals.
The lookback qualifies the swing; it does not give a level an expiry date. Once printed, a virgin level remains active until price actually breaks it.
## Levels and invalidation
- Swing-high levels are red by default.
- Swing-low levels are green by default.
- Levels are solid rather than dashed.
- Each swing has its own independently tracked level.
- **Extend virgin levels right** displays an unbroken level as a ray into future chart space.
- When price breaks a level, the ray becomes a finite line ending on the break candle.
Under **Level invalidation**, select:
- **Wick:** any wick beyond the level invalidates it. This is the default.
- **Close:** the candle must close beyond the level.
An exact touch does not count as a break; price must move beyond the level.
## Display settings
- **Show SH text boxes:** shows or hides swing-high labels.
- **Show SL text boxes:** shows or hides swing-low labels.
- **Show swing levels:** shows or hides the horizontal levels.
- **Swing-high colour / Swing-low colour:** changes the level and label colours.
- **Treat doji candles as invalid:** prevents a doji from satisfying a bullish or bearish candle requirement.
The BOS and CHoCH annotations sometimes visible on the same chart are not created by LDO-Swing. They come from another indicator, such as LDO-Vex.
## Alerts
LDO-Swing includes five alert conditions:
1. **New SH printed** — fires when a new swing high is confirmed.
2. **New SL printed** — fires when a new swing low is confirmed.
3. **New SH or SL printed** — one combined alert for either new swing type.
4. **Swing high broken** — fires when price invalidates an active SH level.
5. **Swing low broken** — fires when price invalidates an active SL level.
### Creating an alert in TradingView
1. Add **LDO-Swing v1.0** to the chart.
2. Select **Create Alert** in TradingView.
3. Under **Condition**, select **LDO-Swing v1.0**.
4. Select the required alert condition from the second menu.
5. For new SH/SL alerts, use **Once Per Bar Close**.
6. Choose the desired notification method and select **Create**.
The SH or SL marker is positioned on the pivot candle, but its alert fires two candles later—when the second moving-away candle closes and confirms the swing.
## Suggested starting settings
- Pattern layout: **5-bar (separate pivot)**
- Apply structure-lookback filter: **On**
- Structure lookback: **10**
- Treat doji candles as invalid: **On**
- Extend virgin levels right: **On**
- Level invalidation: **Wick**
Indicateur

FVG AtlasFVG Atlas — Multi-Timeframe Gap Mapping
FVG Atlas maps Fair Value Gaps across up to four timeframe layers, helping you see nearby zones, overlapping imbalances, and how price interacts with them.
Designed around a clean 1-minute NQ workflow, its timeframes, filters, and display settings are adjustable for other charts.
Features
Multi-timeframe FVGs: Track bullish and bearish gaps with independent colors and invalidation rules for each layer.
Focus mode: Display nearby zones while hidden records continue tracking fills, reactions, and statistics.
50% midpoint: Show consequent encroachment and emphasize it once reached.
Origin markers: Retain a small outline where an invalidated FVG originally formed.
BPR and confluence: Highlight opposing-gap overlaps within a layer and overlapping FVGs across distinct timeframes.
Session labels: Identify gaps formed during your configured regular-session window or outside it.
Nearest-gap panel: Show the distance in points to the closest active bullish and bearish FVG.
Third-candle classification: Describe confirmed FVG formation as Expansion, Inside, Opposing, or Neutral.
First-touch reactions: Mark confirmed rejections and provide hover details identifying the contributing zones.
Optional tools: Volume Imbalances, Opening Gaps, inverse FVGs, formation grading, and configurable lifecycle alerts.
How gaps are tracked
A bullish FVG forms when candle 3’s low is above candle 1’s high. A bearish FVG uses the opposite relationship.
Choose when a zone retires: first touch, midpoint reached, full wick penetration, or a confirmed chart close at or beyond its far edge. Invalidation and complete filling are tracked separately.
Live mode displays developing gaps that can change or disappear. Confirmation is processed when the next candle of that timeframe begins, so session breaks can delay confirmation. Higher-timeframe candles are assembled from chart data.
Reading the signals
Third-candle classifications describe formation behavior; they do not predict continuation or a fill.
Rejection triangles mark price touching a confirmed zone and subsequently closing back outside its near edge within the configured window. They represent observed reactions, not buy/sell instructions.
The dashboard reports detected zones, active records, invalidation statistics, and completed first-touch reactions. These are descriptive statistics—not strategy win rates.
Customization
Adjust minimum gap size, timeframe layers, drawing lookback, Focus limits, session hours, labels, colors, and alerts. Drawing and record limits keep the display manageable. Session labels use a configurable clock window rather than an exchange holiday calendar.
For alerts, enable the desired events in settings and create a TradingView alert using “Any alert() function call.” Indicateur
