SPY SPX ES / QQQ NDX NQ Price Converter (auto-switch)SPY SPX ES / QQQ NDX NQ Price Converter (auto-switch)
Converts round-number price levels between SPY, SPX, ES futures, QQQ, NDX, NQ futures, and index CFDs — and switches between the S&P and Nasdaq sets automatically based on the chart you're on.
Credit where it's due: this is built on two open-source scripts by **PtGambler** — "SPY SPX ES Price Converter " and "QQQ NDX NQ Price Converter " — republished open-source under the Mozilla Public License 2.0, as the originals are. The conversion concept is his.
What this adds
The originals are two separate indicators, one per index complex. Switching from an S&P chart to a Nasdaq chart meant swapping indicators and re-entering settings. This version is one script that reads the chart symbol and loads the matching complex automatically:
- S&P — SPY, SPX, ES1!, and a configurable CFD (default SPX500USD)
- Nasdaq — QQQ, NDX, NQ1!, and a configurable CFD (default NAS100USD)
Detection covers the ETF, cash index, continuous futures (including micros), and common CFD tickers. A manual override forces either complex if you want the levels on an unrelated chart, and on an unrecognized symbol the indicator draws nothing rather than showing misleading levels.
Rebuilt around four generic rows instead of two hardcoded symbol sets, so a single code path drives whichever complex is active.
Other changes
- Quarter marks — optional .25 / .50 / .75 stubs between the whole-dollar ETF levels, drawn as short segments at the label column rather than lines across the chart
- Auto step sizing — leave a row's step at 0 and it picks 1 / 10 / 100 to match the active complex, instead of needing a manual edit on every switch
- Price label omits the chart's own symbol — on ES you see SPX and SPY, not ES, whose price is already on the axis. Cash index is listed first on futures and CFD charts
- Change % for all four rows , each from its own prior daily close; the originals showed it for futures and the CFD only
- Table rewritten — the originals addressed cells that the fill helper never wrote to, so the futures change % was colored in the wrong cell and then merged over. Fixed and restructured as symbol / price / change
- Level loop rewritten as a single pass over the range, replacing the two-loop version that computed the same levels twice
- Written in Pine v6
Settings
Each of the four rows has its own show toggle, color, step, label offset, and line style ("None" keeps labels without lines). General settings control the level count, label text size, the last-price label, and whether conversion updates every tick or on candle close. The price table is positionable with an optional change column.
Notes
SPX and NDX need index data on your TradingView plan. CFD symbols default to OANDA tickers — set the exchange prefix if your feed differs. Line count is capped at 500 per script, so enabling all four rows with a high level count plus quarter marks can hit the ceiling, at which point the oldest lines are dropped silently.
This is a price-conversion utility, not a signal or strategy. It shows where a round number on one instrument sits on another. インジケーター

I Built an Indicator for Breakouts Like WBT Move Above 70 USDWBT 4H Breakout Momentum is built to identify the transition from consolidation into strong bullish expansion. Instead of reacting to every move above resistance, it combines price structure, candle strength, volume, ATR, and EMA direction to focus on breakouts that actually have participation behind them.
⚡ The main BREAKOUT signal appears when price closes above the previous range high with an ATR buffer, the bullish candle is large enough relative to current volatility, volume is elevated, and EMA 9 is above EMA 21. The default setup uses a 24-candle lookback, 14 ATR, and volume above 1.5x its 20-period average.
📈 After the initial breakout, the script keeps tracking momentum. Continuation signals appear when price holds above the breakout structure, remains above the fast EMA, and pushes through the previous candle's high, while unusually large candles with strong volume are marked separately as impulses.
🔍 I mainly use this on the 4H chart as a filter rather than an automatic entry system. It helps me quickly see whether a breakout has real momentum behind it, but I still pay attention to higher-timeframe levels, how extended price already is, and where the trade would actually be invalidated.
The settings can be adjusted for other assets and timeframes. Alerts are included for breakouts, momentum continuation, and strong impulse moves.
Disclaimer: This indicator is for analysis and educational purposes only. Always manage position size and test the setup before using it with real funds. インジケーター

BarrettFVG HTF Pivot Reaction Model**BarrettFVG HTF Pivot Reaction Model**
Higher-timeframe swing levels that have to **earn** their place before they can produce a signal. Rather than plotting every pivot high and low from a higher timeframe and treating them all as equally valid, this indicator tracks how price has actually behaved at each level and only qualifies the ones price has demonstrably reacted to.
---
### The core idea
Most multi-timeframe S/R tools draw every HTF pivot as a level. The problem is that a swing high is just a price where the market happened to turn once — and one turn doesn't make an area meaningful. Some of those levels get respected repeatedly; most get cut straight through and never mattered.
This indicator separates the two by observation rather than assumption. Every 1H, 30m, and 15m pivot is tracked from the moment it forms, but it starts as a **Potential Level** — visible, monitored, and unable to produce any signal. It only becomes a qualified level once price has come back and genuinely reacted at it.
A **reaction** is defined mechanically:
1. Price enters the level's tolerance band
2. Price then moves away from it — in the direction the level should push it (down from a resistance, up from a support)
3. That move reaches a configurable distance, measured in multiples of the higher timeframe's ATR
Direction is enforced deliberately. A candle spiking straight through a level covers plenty of distance, but that's the opposite of respecting it, so only movement on the correct side counts. A sharp rejection and a slow stall-then-drift-away both qualify, as long as price eventually clears the required distance within the reaction window.
Each level displays its running reaction count, so you can see exactly how many times price has responded there.
---
### Levels
- **Three source timeframes**: 1H, 30m, and 15m by default, each individually toggleable and configurable
- **Automatic merging**: pivots from different timeframes landing within the same tolerance band become one level tagged with all of its sources (`15m+30m+1H`), keeping the accumulated reaction history rather than double-counting
- **Extended across the chart**: levels run in both directions, so a level formed days ago stays visible as a flat reference — a level is a price that stays relevant, not a segment tied to when it formed
- **Proximity display**: only the closest levels to current price are drawn, so the chart shows what's in play rather than every level in history
- **Two display modes**: a clean midpoint line, or the full tolerance band shown as a zone box so you can see exactly what the logic is using
**Timeframe consistency:** all sizing, ageing, and reaction timing is anchored to the higher timeframe's ATR and to real clock time rather than to chart bars. This means the same levels appear whether you're on a 1-minute chart or a 15-minute one. A bar-based implementation would silently produce different level sets on different chart timeframes from identical source data.
---
### Entry model
Two paths, both requiring a Break of Structure to fire:
**1 — TAP**
Price reaches a qualified level, taps it or slightly overshoots within a configurable tolerance, then breaks structure in the reversal direction. The overshoot allowance is what separates a tap from a break; beyond it, the level is treated as broken and only the reclaim path remains available.
**2 — RECLAIM (break and retest)**
Price breaks through the level, **builds structure on the far side**, then returns to the level and breaks structure back in the reversal direction.
The far-side structure requirement is the important part. A break only counts as significant once a confirmed swing forms beyond the level — for a broken resistance, that means a swing low printing above it, showing price pulled back up there and held. This is deliberately a *structural* test rather than a candle-size threshold: a single large wick through a level doesn't qualify, while a slow grind that builds a genuine swing does.
Both paths then wait for the same Break of Structure confirmation within a configurable bar window, using independent pivot tracking rather than the level's own geometry — so the confirmation is a real structural event, not a restatement of the level that armed it.
**Level flipping:** when a reclaim confirms, the level inverts its polarity. A resistance that price broke above and then held as support becomes a support level, marked with a flip indicator. This changes its behaviour, not just its appearance — future taps arm the correct direction from that point on.
---
### Signals and alerts
Entry markers plot as directional arrows on the confirming candle, with a dotted line showing the swing that broke to produce the BOS — anchored at the swing's actual formation bar so it points at the structure it's referencing.
Alerts carry the full context of what fired:
`MNQ1! — LONG RECLAIM | 1H+15m level @ 29,437.75 | 3 reactions`
Which entry path fired, which timeframes formed the level, the level's price, and how many times price has reacted there.
Signals are restricted to configurable trading session windows, with a cooldown preventing repeated same-direction entries off a single move.
**This indicator does not plot stop-loss or take-profit levels.** It identifies levels and signals entries; risk placement is left to the trader.
---
### Settings
Grouped by how often you'd change them:
1. **HTF Levels** — source timeframes, pivot length, band width, storage limits, level age
2. **Reaction Qualification** — minimum reactions, move-away distance, reaction window
3. **Entry Model** — path toggles, BOS pivot length and window, overshoot tolerance, cooldown
4. **Reclaim Structure** — far-side pivot length, retest window
5. **Sessions** — trading windows
6. **Display** — level visibility, colours, markers, labels
Every input has a tooltip explaining what it does and how it interacts with the rest.
---
### Notes on defaults
Defaults are **starting points, not optimised values.** They have not been backtested or tuned for any particular instrument or timeframe. The reaction distance, band width, and BOS window in particular will likely need adjusting for whatever you trade — start with Potential Levels visible so you can see what's being tracked and how quickly levels accumulate reactions before tightening anything.
Because reactions are earned through observed price behaviour rather than assumed from pivot geometry, levels start unqualified and accumulate history as the chart loads. Expect fewer qualified levels near the left edge of a freshly-loaded chart.
---
## Disclaimer
*This script is provided for educational and informational purposes only. It does not constitute financial, investment, or trading advice, nor a recommendation or solicitation to buy or sell any financial instrument.*
*Trading futures, forex, stocks, cryptocurrencies, and other leveraged instruments carries a substantial risk of loss and is not suitable for every investor. You may lose some or all of your invested capital, and with leveraged products you can lose more than your initial deposit. You should not trade with money you cannot afford to lose.*
*No indicator, system, or method can predict future price movement. The signals produced by this script are pattern-based observations derived from historical price data — they describe what has already happened, not what will happen next. Levels identified as "qualified" have met a mechanical definition of prior reaction; this does not imply price will react at them again.*
*Past performance, backtested results, hypothetical results, and historical signals are not indicative of future results. Backtested and hypothetical performance carries inherent limitations, including the benefit of hindsight and the absence of real execution factors such as slippage, spread, commissions, liquidity constraints, and the psychological pressures of live trading.*
*The default settings included with this script are unoptimised starting points. They have not been tuned or validated for any specific market, timeframe, account size, or risk tolerance. Test thoroughly on historical data and in simulation before considering any use with real capital.*
*This script does not plot or calculate stop-loss or take-profit levels. Position sizing, risk management, and trade management decisions are entirely the responsibility of the user.*
*You are solely responsible for your own trading decisions and for any outcomes resulting from them. The author makes no representations or warranties as to the accuracy, completeness, or suitability of this script for any purpose, and accepts no liability whatsoever for any losses, damages, or costs incurred through its use.*
インジケーター

Curved Market Structure & SMC Liquidity [ ICT ]================================================================================
CURVED MARKET STRUCTURE & SMC LIQUIDITY
================================================================================
Curved Market Structure and SMC Liquidity ICT is an all-in-one institutional trading suite designed for precision analysis across Crypto, Forex, Commodities, and Stocks. It merges smooth mathematical volatility curves with automated Smart Money Concepts (SMC) structure, body glow momentum candles, dynamic equilibrium range tracking, and a visible right-side volume profile.
--------------------------------------------------------------------------------
1. CORE FEATURES & MECHANICS
--------------------------------------------------------------------------------
• Dynamic Smooth Curve Bands
Uses double-exponential smoothing and standard deviation to generate adaptive high-probability trend curves. The lower curve marks an institutional demand/liquidity sweep zone, while the upper curve identifies overextended supply areas.
• Institutional Structure Mapping (BOS & CHoCH)
Automatically tracks key swing highs and lows. Upon structure breakout, it draws precise Break of Structure (BOS) or Change of Character (CHoCH) lines starting exactly from the broken swing level to the breakout candle.
• Filtered Sweep Signals & Cooldown Engine
Liquidity sweep signals require candle close confirmation and directional momentum alignment. An internal cooldown counter suppresses repetitive signals during tight consolidation phases.
• Body Glow Candle Dynamics
Recolors candle bodies based on directional strength and candle range. Active expansion bars highlight bright green or red, while low-volatility range candles render in neutral gray.
• Dynamic 0.5 Equilibrium & Confluence Zones
Continuously projects the 0.5 discount/premium equilibrium midpoint of the active swing range, alongside borderless demand and supply confluence zones.
• High Visibility Volume Profile
Renders a clean volume profile histogram on the right side of the chart to reveal High Volume Nodes (HVN) and Low Volume Nodes (LVN) over the selected lookback range.
--------------------------------------------------------------------------------
2. HOW TO USE FOR TRADING
--------------------------------------------------------------------------------
1. Determining Market Bias
Check whether current price action is trading above or below the 0.5 Equilibrium level and observe the direction of the latest BOS or CHoCH structural break.
2. Bullish Entry Rules
Wait for price to sweep or touch the lower green curve band. Enter long upon receiving a confirmed Buy Sweep signal accompanied by a green Body Glow candle near the demand zone.
3. Bearish Entry Rules
Wait for price to sweep or touch the upper red curve band. Enter short upon receiving a confirmed Sell Sweep signal accompanied by a red Body Glow candle near the supply zone.
4. Profit Targets & Risk Management
Set primary take-profit targets at the 0.5 Equilibrium line and secondary targets at the opposite curve band or major structural swing levels.
--------------------------------------------------------------------------------
3. SCALPING & TIMEFRAME GUIDANCE
--------------------------------------------------------------------------------
• Lower Timeframe Scalping (1m, 5m, 15m)
Lower the Swing Sensitivity setting to 3 or 5 for rapid structural tracking. Use right-side volume profile peaks to trade reversals back toward low-volume gaps.
• Higher Timeframe Bias (1H, 4H, Daily)
Use the 0.5 Equilibrium line to divide the market into Premium (favorable for shorts) and Discount (favorable for longs) zones before taking trades.
--------------------------------------------------------------------------------
4. SETTINGS BREAKDOWN
--------------------------------------------------------------------------------
• Curve Smoothing Factor: Controls band smoothness and responsiveness to price.
• Curve Multiplier: Adjusts upper/lower curve expansion based on market volatility.
• Signal Cooldown: Sets the required bar gap between signals to filter noise.
• Consolidation Threshold: Sets the body-to-range ratio for identifying neutral gray range candles.
• Swing Sensitivity: Sets pivot lookback length for validating swing highs and lows.
• Text Placement Settings: Customizes horizontal and vertical label alignments.
• Profile Lookback Range: Defines historical bar depth for the volume profile histogram.
--------------------------------------------------------------------------------
5. THINGS TO AVOID
--------------------------------------------------------------------------------
• Do not trade signals against the higher-timeframe trend direction.
• Avoid taking Buy signals during an active bearish BOS sequence without a fresh CHoCH confirmation.
• Avoid entering trades during major economic news releases or low-liquidity market sessions.
• Do not rely on printed shapes in isolation. Always combine signals with SMC structure, 0.5 Equilibrium levels, and volume confluences.
--------------------------------------------------------------------------------
DISCLAIMER
--------------------------------------------------------------------------------
This script is built exclusively for educational and chart visualization purposes. Past performance of visual signals does not guarantee future market results. Always manage risk responsibly. インジケーター

Double Tap Double Top/Bottom [Viprasol]Double Tap — Double Top / Double Bottom
═══════════════════════════════════════════════════════════
WHAT IT DOES
═══════════════════════════════════════════════════════════
Double Tap finds the two most reliable reversal patterns in classic technical analysis —
the Double Top (M) and Double Bottom (W) — draws them as they FORM, and on a confirmed
neckline break projects a complete trade map: Entry, Stop, and measured-move Target, then
tracks the outcome to ✓ or ✗. It keeps a history of recent patterns on the chart, not
just the latest one, so you can see how the tool reads structure over time.
═══════════════════════════════════════════════════════════
HOW THE PATTERN IS DETECTED
═══════════════════════════════════════════════════════════
1. Two confirmed swing highs (Double Top) or lows (Double Bottom) are found via a pivot
length you control.
2. The two extremes must match within a tolerance — a percentage of the pattern's height —
so the "double" is genuinely level, not a random pair of swings.
3. A valley (top) or peak (bottom) between them becomes the NECKLINE.
4. The pattern must span between your min and max width (bars) to filter noise.
5. While these conditions hold, the pattern is shown FORMING (a dotted preview). If price
breaks back past the twin extreme first, the setup is invalidated and the preview clears.
6. TRIGGER: a confirmed bar close through the neckline solidifies the pattern and prints
the trade levels.
Non-repainting: swings are confirmed pivots and the trigger evaluates on closed bars.
═══════════════════════════════════════════════════════════
THE TRADE MAP (drawn on every confirmed pattern)
═══════════════════════════════════════════════════════════
• ENTRY — the neckline-break close.
• STOP — beyond the higher top / lower bottom, padded by an ATR buffer.
• TARGET — the measured move: pattern height projected from the neckline (adjustable %).
On the chart: two peak markers with prices, a shaded pattern box, a dashed neckline, an
Entry line, and green/red TP/SL zones — all extending forward until price resolves them.
The pattern label then flips to ✓ (target hit) or ✗ (stop hit).
═══════════════════════════════════════════════════════════
FEATURES
═══════════════════════════════════════════════════════════
• Live "forming" preview so you see a pattern building before it triggers.
• Tracks multiple patterns across history (configurable how many to keep).
• Detect tops, bottoms, or both; full control of tolerance, pivot length, min/max width.
• Measured-move target (% of height) + ATR stop buffer.
• Dashboard: current status, active Entry / Target / Stop with % distance, and a running
hit rate (how often target was reached before stop, on the patterns shown).
• Alerts on Double Top / Double Bottom confirmation, plus a webhook-ready alert() message
(Text or JSON) carrying entry / stop / target.
═══════════════════════════════════════════════════════════
HOW TO USE
═══════════════════════════════════════════════════════════
1. Set Swing Length to the pattern size you want (larger = bigger, cleaner patterns).
2. Watch the dotted "forming" preview; act only on the confirmed neckline break.
3. Use the drawn Entry / Stop / Target as your plan; scale or exit at the target.
4. Tune Tolerance (how level the two extremes must be) to your market's character.
5. Set an alert on "Any alert() function call" for automation, or use the built-in
Double Top / Double Bottom conditions.
═══════════════════════════════════════════════════════════
HONEST LIMITATIONS
═══════════════════════════════════════════════════════════
• Pattern recognition is inherently subjective; this uses one consistent rule-based
definition — it won't catch every double a human would draw, and vice versa.
• The dashboard's hit rate is a simple tally of the patterns currently shown (target-before-
stop), not a full backtest — use it as a feel, not a performance guarantee.
• Swings confirm after the fact (pivot lookback), so patterns appear with a natural lag.
• This is a decision-support tool, not financial advice. Manage your own risk.
═══════════════════════════════════════════════════════════
CREDITS & ORIGINALITY
═══════════════════════════════════════════════════════════
The double top / double bottom is public, classic technical analysis; ATR is J. Welles
Wilder's public concept. Every line of Pine here — the pivot-pairing detection, the
tolerance/neckline/measured-move logic, the forming preview, the multi-pattern tracker,
and all visualization — is original Viprasol work written from scratch. No third-party
Pine code is reused.
インジケーター

Moving Average Liquidity Sweeps - Candle Iron CoreMoving Average Liquidity Sweeps - Candle Iron Core
OVERVIEW
Moving Average Liquidity Sweeps is a rule-based indicator designed to identify wick-based sweeps around a dynamically calculated moving average.
Unlike a fixed horizontal liquidity level, a moving average continuously changes with price. This indicator uses the selected EMA or SMA as a dynamic reference and evaluates how individual candles interact with it.
A candle is not classified as a sweep simply because its wick touches or crosses the moving average.
To qualify, the interaction must satisfy independent conditions involving:
The position of the candle body relative to the moving average.
The total length of the wick.
The actual depth of penetration beyond the moving average.
The purpose is to provide a configurable and repeatable method for distinguishing qualifying wick-based interactions from ordinary touches or shallow retests of a moving average.
CORE CONCEPT
The selected moving average acts as the dynamic reference level.
Users can choose:
EMA - Exponential Moving Average
SMA - Simple Moving Average
Moving Average Length
Moving Average Source
For example, the indicator can evaluate interactions with a 21 EMA, 89 SMA, 200 EMA, or any other user-defined combination.
The moving average itself does not determine whether an interaction qualifies as a sweep.
The candle must independently satisfy the sweep conditions described below.
MOVING AVERAGE CALCULATION
When EMA is selected, the script calculates an Exponential Moving Average using the selected source and length.
When SMA is selected, the script calculates a Simple Moving Average using the selected source and length.
The resulting value becomes the Liquidity Moving Average used as the reference for each candle.
Because the moving average is recalculated over time, the reference level evaluated by the script changes from bar to bar.
TWO INDEPENDENT PERCENTAGE FILTERS
The indicator separates two measurements:
Minimum Wick Length (%)
Minimum Sweep Depth Beyond MA (%)
These measurements serve different purposes.
A candle can have a large wick while only slightly crossing the moving average.
Conversely, crossing the moving average does not necessarily mean that the wick itself is significant.
Requiring both conditions provides additional control over what the user chooses to classify as a qualifying sweep.
1. MINIMUM WICK LENGTH
This parameter evaluates the complete wick responsible for the interaction.
For a sweep below the moving average:
Lower edge of candle body → Candle Low
For a sweep above the moving average:
Upper edge of candle body → Candle High
The lower edge of the candle body is defined as the lower value between Open and Close.
The upper edge of the candle body is defined as the higher value between Open and Close.
Therefore, the calculation works consistently for both bullish and bearish candles.
The percentage calculation used by the indicator is:
Lower Wick % = (Body Low - Low) / Body Low × 100
Upper Wick % = (High - Body High) / Body High × 100
The complete wick must meet or exceed the Minimum Wick Length selected by the user.
2. MINIMUM SWEEP DEPTH BEYOND MA
Sweep Depth measures a different distance.
Instead of measuring the complete wick, it measures only how far price extends beyond the moving average.
For a sweep below:
Moving Average → Candle Low
For a sweep above:
Moving Average → Candle High
The percentage calculation is:
Sweep Depth Below % = (Moving Average - Low) / Moving Average × 100
Sweep Depth Above % = (High - Moving Average) / Moving Average × 100
This condition helps distinguish a qualifying penetration from a candle that merely touches or moves slightly beyond the moving average.
SWEEP ABOVE MOVING AVERAGE
A candle qualifies as a Sweep Above when all of the following conditions are satisfied:
The entire candle body remains at or below the moving average.
The upper wick crosses above the moving average.
The complete upper wick meets or exceeds the selected Minimum Wick Length.
The distance from the moving average to the candle High meets or exceeds the Minimum Sweep Depth Beyond MA.
The selected direction settings allow sweeps above the moving average.
When all conditions are satisfied, a downward triangle is plotted above the candle.
SWEEP BELOW MOVING AVERAGE
A candle qualifies as a Sweep Below when all of the following conditions are satisfied:
The entire candle body remains at or above the moving average.
The lower wick crosses below the moving average.
The complete lower wick meets or exceeds the selected Minimum Wick Length.
The distance from the moving average to the candle Low meets or exceeds the Minimum Sweep Depth Beyond MA.
The selected direction settings allow sweeps below the moving average.
When all conditions are satisfied, an upward triangle is plotted below the candle.
WHY BODY POSITION MATTERS
The candle body is intentionally required to remain on the original side of the moving average.
A candle whose body crosses through the moving average represents a different type of interaction from a candle that penetrates the level only with its wick.
For this reason:
Sweep Above → Body remains below the MA.
Sweep Below → Body remains above the MA.
This allows the indicator to focus specifically on wick-based interactions rather than classifying every candle that crosses a moving average as a sweep.
WHY WICK LENGTH AND SWEEP DEPTH ARE SEPARATE
Consider a candle with a large lower wick.
The candle may satisfy the Minimum Wick Length requirement while extending only slightly below the moving average.
Without an additional depth requirement, a shallow interaction could qualify solely because the candle happened to have a long wick.
The Minimum Sweep Depth Beyond MA solves this by requiring price to travel a separately defined minimum distance beyond the moving average.
Therefore:
Wick Length measures the wick itself.
Sweep Depth measures the penetration beyond the moving average.
A qualifying signal must satisfy both.
SWEEP DIRECTION
The indicator allows users to select:
Both - Detect interactions above and below the moving average.
Above MA - Detect only sweeps above the moving average.
Below MA - Detect only sweeps below the moving average.
CANDLE CLOSE CONFIRMATION
The Confirm only after candle close option determines whether the script waits for the current candle to close before confirming a signal.
When enabled, a sweep is marked only after the bar is confirmed.
This is particularly relevant because the High, Low and Close of an active candle can continue changing before the candle closes.
VISUAL SETTINGS
Users can customize:
Whether the moving average is displayed.
Moving Average color.
Moving Average width.
Sweep marker color.
The plotted moving average corresponds directly to the dynamic reference used by the sweep calculations.
HOW TO USE
A basic workflow is:
Select EMA or SMA.
Choose the Moving Average Length.
Select the Moving Average Source.
Define the Minimum Wick Length.
Define the Minimum Sweep Depth Beyond MA.
Choose whether to detect sweeps above, below, or in both directions.
Optionally require candle-close confirmation.
Evaluate qualifying interactions within the context of the user's own trading methodology.
EXAMPLE
Suppose a trader selects a 200 EMA.
A candle trades below the EMA and its upper wick extends through it.
Crossing the EMA alone does not produce a signal.
For the candle to qualify as a Sweep Above:
Its complete body must remain at or below the EMA.
Its upper wick must cross the EMA.
Its complete upper wick must satisfy the Minimum Wick Length.
The portion extending beyond the EMA must satisfy the Minimum Sweep Depth Beyond MA.
Only when all conditions are satisfied does the indicator plot the sweep marker.
ORIGINALITY AND PURPOSE
This indicator is not intended to introduce another moving-average crossover system.
The moving average serves only as a dynamically changing reference level.
The script's primary functionality is the classification of candle interactions around that reference using three independent structural conditions:
Candle-body position relative to the moving average.
Minimum total wick length.
Minimum penetration depth beyond the moving average.
Separating total wick length from actual penetration depth is particularly important because the two measurements describe different characteristics of the candle.
This combination allows users to define a consistent threshold for wick-based interactions with dynamic EMA or SMA levels rather than treating every touch, crossover, or wick penetration as equivalent.
ALERTS
Alert conditions are included for:
Liquidity Sweep Above MA
Liquidity Sweep Below MA
The alerts use the same conditions as the corresponding visual markers.
IMPORTANT NOTES AND LIMITATIONS
The term "Liquidity Sweep" in this indicator describes a candle interaction that satisfies the quantitative rules defined above.
The indicator does not observe the exchange order book and therefore does not confirm the presence of resting orders, stop-loss concentrations, institutional orders, or actual available liquidity at the moving average.
Likewise, an EMA or SMA is not inherently a liquidity level.
The moving average is used by this script as a dynamic reference selected by the user for evaluating wick behavior.
A qualifying sweep does not predict that price will reverse, continue, or produce a profitable trading opportunity.
Moving averages, volatility and candle characteristics can behave differently across assets and timeframes. Parameters should therefore be evaluated specifically for the market, timeframe and methodology in which they are intended to be used.
This indicator does not provide Buy or Sell signals and does not guarantee future market behavior. インジケーター

Liquidity Sweep with Deviation - Candle Iron CoreLiquidity Sweep with Deviation - Candle Iron Core
OVERVIEW
Liquidity Sweep with Deviation is a rule-based tool designed to identify wick-based sweeps around a user-defined liquidity level.
Instead of classifying every touch or small penetration of a level as a liquidity sweep, the indicator applies objective conditions to distinguish a qualifying sweep from a simple retest or minor interaction with the level.
The user first defines a specific price as the Liquidity Level. This can represent any price level relevant to the user's analysis, such as a swing high, swing low, previous high/low, daily open, weekly open, monthly open, yearly open, support, resistance, or another manually selected reference.
The indicator then evaluates how each candle interacts with that level.
CORE CONCEPT
A liquidity sweep, for the purposes of this indicator, requires the wick to cross a defined liquidity level while the candle body remains on the original side of that level.
However, crossing the level alone is not enough.
The indicator uses two independent percentage filters:
Minimum Wick Length (%)
Minimum Sweep Depth (%)
This distinction is the main purpose of the script.
It allows users to separately control:
How significant the wick itself must be.
How far price must actually travel beyond the liquidity level.
1. MINIMUM WICK LENGTH
This parameter measures the complete wick responsible for the sweep.
For a sweep below the level:
Lower edge of candle body → Candle Low
For a sweep above the level:
Upper edge of candle body → Candle High
The percentage is calculated relative to the corresponding edge of the candle body.
This filter prevents candles with very small wicks from qualifying simply because they crossed the selected level.
2. MINIMUM SWEEP DEPTH
Sweep Depth measures only the portion of price movement that extends beyond the defined Liquidity Level.
For a sweep below:
Liquidity Level → Candle Low
For a sweep above:
Liquidity Level → Candle High
This is intentionally different from Wick Length.
A candle may have a large wick but penetrate the liquidity level by only a very small amount. Without a separate depth requirement, that interaction could be classified as a sweep even when it behaves more like a precise retest of the level.
Minimum Sweep Depth allows the user to determine how far price must move beyond the level before the interaction qualifies.
VALID SWEEP CONDITIONS
Sweep Below
A candle qualifies as a Sweep Below when all of the following conditions are satisfied:
The entire candle body remains at or above the Liquidity Level.
The lower wick crosses below the Liquidity Level.
The complete lower wick meets or exceeds the Minimum Wick Length.
Price penetrates below the Liquidity Level by at least the Minimum Sweep Depth.
When all conditions are satisfied, an upward triangle is plotted below the candle.
Sweep Above
A candle qualifies as a Sweep Above when all of the following conditions are satisfied:
The entire candle body remains at or below the Liquidity Level.
The upper wick crosses above the Liquidity Level.
The complete upper wick meets or exceeds the Minimum Wick Length.
Price penetrates above the Liquidity Level by at least the Minimum Sweep Depth.
When all conditions are satisfied, a downward triangle is plotted above the candle.
WHY TWO PERCENTAGE FILTERS?
Wick Length and Sweep Depth measure two different characteristics.
Consider a candle with a large lower wick that barely crosses a support level.
Its wick may satisfy the Minimum Wick Length requirement, but its penetration beyond the level may be extremely small.
With this indicator, the candle must satisfy both requirements.
This provides a configurable framework for separating:
A wick that merely interacts with a level
from
A wick that penetrates the level by a user-defined minimum amount.
LIQUIDITY ZONE
The indicator displays a visual zone around the selected Liquidity Level.
The upper and lower boundaries correspond to the Minimum Sweep Depth selected by the user.
Therefore, the zone is not only a visual reference.
For a qualifying Sweep Above, the wick must reach or exceed the upper depth threshold.
For a qualifying Sweep Below, the wick must reach or exceed the lower depth threshold.
The zone color and transparency can be customized.
LIQUIDITY LEVEL MODES
The indicator provides two methods for defining the reference level:
Manual Price — The user enters the exact price level to evaluate.
Current Asset Price — The indicator establishes the reference from the current/recent chart price according to the script's automatic-level logic.
Manual Price is particularly useful when evaluating predefined structural or liquidity references.
SWEEP DIRECTION
Users can choose which interactions should be detected:
Both
Above Level
Below Level
This allows the indicator to be adapted to the directional context being studied.
CANDLE CLOSE CONFIRMATION
The option Confirm only after candle close can be enabled to require the candle to be confirmed before a sweep signal is displayed.
When enabled, the final Open, High, Low and Close of the completed candle determine whether the conditions were satisfied.
VISUAL CUSTOMIZATION
Users can customize:
Liquidity Level color
Liquidity Zone color
Liquidity Zone transparency
Sweep arrow color
Visibility of the Liquidity Zone
Visibility of price labels
Price label text color
Price label horizontal offset
HOW TO USE
A basic workflow is:
Identify a price level that is relevant to your analysis.
Enter that price as the Manual Liquidity Level.
Define the Minimum Wick Length required for a candle to qualify.
Define the Minimum Sweep Depth required beyond the level.
Select whether sweeps should be detected above, below, or in both directions.
Evaluate qualifying signals within the context of your own trading methodology.
EXAMPLE
Suppose a trader defines 93,000 as a liquidity level.
For a Sweep Below, simply trading below 93,000 is not sufficient.
The candle body must remain at or above 93,000, while its lower wick crosses below it.
The complete lower wick must satisfy the selected Minimum Wick Length, and the portion extending below 93,000 must independently satisfy the selected Minimum Sweep Depth.
Only when all conditions are satisfied will the indicator mark the candle as a qualifying Sweep Below.
ORIGINALITY AND PURPOSE
The purpose of this script is not to automatically determine where liquidity exists or to label every wick through a price level as a liquidity sweep.
Its purpose is to provide an objective and configurable framework for testing user-defined liquidity levels.
The script separates two measurements that are often treated as a single condition:
The total length of the wick performing the interaction.
The actual depth of penetration beyond the liquidity level.
Combined with the requirement that the candle body remains on the original side of the level, these independent conditions allow users to define and consistently reproduce their own threshold for what constitutes a qualifying liquidity sweep.
ALERTS
Alert conditions are included for:
Liquidity Sweep Above
Liquidity Sweep Below
These alerts follow the same conditions used by the visual sweep markers.
IMPORTANT NOTES
This indicator does not automatically identify institutional liquidity, resting orders, stop-loss concentrations, or future price reactions.
A Liquidity Level is a price reference selected by the user. The script evaluates candle behavior around that reference according to the mathematical conditions described above.
A detected sweep is therefore a classification of price behavior according to the selected parameters, not a prediction that price will reverse or continue.
Different assets and timeframes have different volatility characteristics. Minimum Wick Length and Minimum Sweep Depth values should therefore be evaluated for the specific market, timeframe, and methodology in which they are used.
The indicator does not provide Buy or Sell signals and does not guarantee that a detected sweep will produce a favorable trading outcome. インジケーター

SMC Pro: Strategy & LiquiditySMC Pro: Strategy & Liquidity
OVERVIEW
SMC Pro: Strategy & Liquidity is a Smart Money Concepts toolkit built around one
idea: a price level only matters once the liquidity resting at it has been taken,
and a liquidity raid only matters once price confirms that delivery has changed
direction afterwards. Instead of plotting every pattern the market prints, the
script sequences six engines so that context, the raid, and the confirmation are
read in order on a single overlay.
The six engines are:
1. Higher timeframe and session reference levels
2. Confirmed liquidity sweeps
3. Fair Value Gaps and Inverse Fair Value Gaps
4. Order Blocks and Breaker Blocks
5. CISD - Change In State Of Delivery, with a dashboard and alerts
6. SMT divergence against a correlated symbol
Every engine evaluates on closed bars. Zones, sweeps, structure breaks and CISD
events are not created or removed based on the movement of the unclosed candle.
WHAT MAKES IT DIFFERENT
The individual concepts here are public knowledge in the Smart Money Concepts
community. What this script contributes is how they are filtered and joined
together:
- Reference levels carry an invalidation state. Once price has CLOSED through a
1H, 4H or session level, that level is permanently disqualified from producing
a sweep for the remainder of its cycle. A level that has already been accepted
by price is no longer liquidity, so it stops being tested as such. Most sweep
tools re-flag the same level repeatedly after it has been broken.
- Only the first sweep per side is drawn per reference cycle. The flags reset
when a new 1H, 4H or session level is confirmed. One raid produces one marker
rather than a cluster of near-duplicates.
- The CISD engine anchors to a swept series, not to a single candle. A candidate
is built from consecutive same-direction candles that swept a confirmed swing,
and the delivery level is taken from the opening price of the FIRST candle in
that series - the price at which the raid began. The confirmed zone then covers
the entire high-to-low range of the series rather than one candle's body.
- Opposing CISD setups cannot both survive. Confirming one direction cancels the
pending setup on the other side, and an optional conflict window removes a
preceding opposite CISD when a new one confirms immediately behind it. The
chart never shows two contradictory claims on the same move.
- FVGs and Order Blocks have a full lifecycle rather than a binary valid/invalid
state: mitigation, inversion or breaker conversion, then a second invalidation
that removes them. An inverted FVG restarts its mitigation clock from the
inversion bar so it can be re-tested in its new role.
HOW EACH ENGINE WORKS
Higher timeframe and session levels
The script requests the high and low of the previous COMPLETED 1H and 4H candle,
and tracks the high and low of each COMPLETED Asian, London and New York session.
Session windows and the session timezone are user-configurable; the timezone
defaults to the exchange timezone so levels stay correct across instruments.
These levels are the pools that the sweep engine tests against.
Liquidity sweeps
A sweep is marked only when a single candle wicks through a reference level and
closes back on its origin side:
Bearish - open below the level, high above it, close back below it
Bullish - open above the level, low below it, close back above it
The invalidation and first-sweep-only filters described above then decide whether
the event is drawn. Confirmed sweeps print a LIQ SWEEP marker at the level.
Fair Value Gaps and Inverse Fair Value Gaps
Three-candle imbalances are detected on confirmed bars: bullish when the current
low is above the high two bars back, bearish when the current high is below the
low two bars back. Trading back into a zone marks it mitigated, and the box stops
extending. A close through the far side inverts the zone: it flips polarity, is
relabelled IFVG, and its mitigation clock restarts from the inversion bar. An
inverted zone that is invalidated a second time is removed.
Order Blocks and Breaker Blocks
Order Blocks are structure-confirmed rather than pattern-guessed. The script
tracks confirmed swing pivots; when price closes through an active swing high,
the most recent down-close candle before that break is stored as a bullish Order
Block, and the mirror applies for bearish. Each swing can be used only once, and
the source candle must sit within a configurable lookback of the break, so a
stale candle cannot be retro-fitted onto a much later structural move. A failed
Order Block can be converted into a Breaker Block: the zone flips polarity, is
relabelled BB, and becomes a retest area in the opposite direction. With breaker
conversion disabled, failed Order Blocks are removed instead.
CISD - Change In State Of Delivery
Building the setup. A bullish candidate begins when a down-close candle sweeps
liquidity below. With the swing sweep filter enabled (default) that means trading
below the most recent CONFIRMED swing low; with it disabled, simply taking the
previous candle's low. Consecutive down-close candles extend the same series, and
the delivery level is anchored to the opening price of the first candle in the
series. Bearish candidates mirror this with up-close candles sweeping a high.
Confirmation. While pending, a dotted line projects forward from the delivery
level. The CISD confirms when a bar CLOSES through that line - above it for
bullish, below it for bearish - within the configured lifetime. If no close
reclaims the level in time the setup expires and its pending line is removed
rather than left on the chart.
On confirmation the script draws the delivery line in the directional colour, a
+CISD or -CISD label, a zone covering the full range of the setup series, and a
coloured halo marking the sequence.
Dashboard. An optional table reports running bullish and bearish CISD counts for
the chart timeframe, current pending state, the most recent event and its bar,
glow status, and how many drawings are retained against the cap. A compact mode
reduces it to counts, last event and sequence status.
SMT divergence
Confirmed pivots on the chart symbol are compared against a correlated symbol.
Bullish SMT is flagged when the chart makes a lower low while the correlated
symbol holds above its prior pivot low; bearish SMT when the chart makes a higher
high while the correlated symbol fails to. An alignment setting caps how far
apart the two pivots may be in bars, so unrelated pivots are never paired.
HOW TO USE IT
The engines are meant to be read in sequence:
1. Where is the liquidity? Read the higher timeframe and session levels.
2. Has it been taken? Wait for a LIQ SWEEP marker, or for a CISD setup series
to sweep a confirmed swing.
3. Has delivery changed? A confirmed +CISD or -CISD after that raid is the
signal that the sweep was a reversal rather than continuation. The CISD zone
marks the range of the candles that did the sweeping.
4. Where would you engage? Use the FVG, IFVG, Order Block and Breaker zones
left behind by the resulting displacement as the retracement areas.
5. Confluence. An SMT divergence aligned with the same raid, or a glow-marked
CISD sequence, adds weight to the read.
Suggested starting values for CISD Lifetime, the number of bars a pending setup
stays valid: 1m 10-20, 5m 12-24, 15m 8-16, 1H 4-8, 4H 3-6, Daily 3-5. Increase it
if setups expire just before they would have confirmed; decrease it if stale
pending lines linger.
Alerts are available for a confirmed bullish CISD, a confirmed bearish CISD,
either direction, and for the bullish and bearish glow sequences.
SETTINGS
HTF & Liquidity - toggles for HTF levels, session levels and sweeps; the three
session windows and their timezone; level projection length; maximum retained
sweep drawings.
FVG - display toggle, forward extension, maximum retained zones.
Order Blocks - display toggle, breaker conversion toggle, source-candle lookback,
forward extension, maximum retained zones.
CISD - display toggle, lifetime, forward extension, swing sweep filter and its
pivot length, conflict window, and full visual control over labels, pending
lines, zones, transparency, line width and style, colours, glow width, colour and
transparency, drawing cap, alert toggles, and dashboard position, text size and
compact mode.
SMT - correlated symbol, display toggle, pivot length, alignment tolerance,
maximum retained drawings.
LIMITATIONS AND DISCLAIMER
Higher timeframe levels are taken from the previous completed candle, so they are
stable on the chart timeframe. Session levels appear only after the session has
closed.
Swing pivots require bars on both sides before they confirm, so the features that
depend on structure - Order Blocks, the CISD swing sweep filter and SMT - confirm
with the natural lag of pivot detection. This is inherent to pivot logic.
SMT requires the correlated symbol to be genuinely correlated and available on
your data subscription. Pairing unrelated instruments produces meaningless
divergences.
Drawing counts are capped by the maximum settings in each group; the oldest
drawings are removed as new ones form. Very low caps on a busy chart will discard
history quickly.
This script is an analysis and visualisation tool. It is not a signal service and
it does not generate orders. It highlights context and confirmation; entry, stop,
target and position sizing decisions remain entirely with the trader. Nothing
here is financial advice, and the historical behaviour of any pattern does not
guarantee future results.
インジケーター

Premarket OTT TriggerPremarket OTT Trigger
Premarket OTT Trigger is a multi-timeframe indicator designed to identify important premarket price zones using a 15-period OTT and then use those zones for structured break-and-retest setups after the market opens.
The concept is simple:
Higher timeframe = Find the setup
Lower timeframe = Find the entry
During premarket, the indicator looks for the most recent candle that crosses or touches the OTT. That candle is automatically boxed from its high to low, with a 50% midline, and the box extends to the right throughout the trading session.
If another qualifying premarket candle appears later, the older box is removed and the newest candle becomes the active zone.
Why Look for an OTT Cross?
A symbol with a premarket candle crossing or interacting with the OTT may be showing increased price activity and the potential for meaningful movement during the session.
This does not guarantee a move, but it can help identify symbols worth adding to a watchlist.
The resulting box creates a clearly defined trading area with three important levels:
Box High
50% Midline
Box Low
Instead of entering randomly, traders can use these levels to wait for price to show direction.
Break & Retest Method
A simple approach is to use the 30-minute timeframe to identify the box and the 5-minute timeframe for entries.
Bullish Setup
Wait for price to break above the box high.
Do not chase the initial breakout.
Allow price to pull back and retest the top of the box.
If the old resistance level holds as support and the 5-minute chart shows bullish confirmation, this can provide a potential long setup.
Break Above → Retest → Hold → Long
Bearish Setup
Wait for price to break below the box low.
Allow price to retest the broken level from underneath.
If the old support level acts as resistance and the 5-minute chart shows bearish confirmation, this can provide a potential short setup.
Break Below → Retest → Reject → Short
If price remains inside the box, the idea is simply to wait for direction.
AAPL Example
In the AAPL example shown, the 30-minute timeframe was used to establish the premarket OTT box, while the 5-minute chart was used for trade execution.
The higher timeframe provided the important premarket structure, while the lower timeframe provided a more precise view for the breakout, retest, and entry.
This is the core idea behind the indicator:
OTT Interaction → Potential Movement → Defined Zone → Break → Retest → Entry
Features
Selectable indicator timeframe
15-period OTT
Adjustable OTT percentage
Adjustable premarket session
Wick Touch, Body Cross, or Close Cross detection
Automatic most-recent premarket box
Automatic daily reset
Box High, Low, and 50% Midline
Dynamic box colors
Solid, Dashed, or Dotted box borders
Customizable midline style
Optional candle-close confirmation
Box extends through the trading session
Important
The OTT cross is not intended to predict direction by itself.
Its purpose is to help identify symbols that may be showing meaningful premarket activity and create a defined trading zone where entries, invalidation, and risk can be planned more clearly.
The trader still waits for price to confirm direction through the break and retest.
30M for structure.
5M for execution.
Let price confirm the trade.
This indicator is intended as a structure and confirmation tool and should be combined with proper risk management, position sizing, and your own trading plan.
For educational purposes only. Not financial advice.
Credits: This indicator incorporates the Optimized Trend Tracker (OTT) concept originally developed by Anıl Özekşi. Credit is also given to Kıvanç Özbilgiç for bringing OTT implementations to the TradingView/Pine community. This script extends the concept into a multi-timeframe premarket zone and break-and-retest framework.
インジケーター

Outside and Inside Gaps - Candle Iron CoreOVERVIEW
Outside and Inside Gaps is an open-source indicator that identifies visible price gaps between consecutive candles on the active chart timeframe.
The script compares each candle with the immediately preceding candle. Therefore, it automatically adapts to the timeframe selected by the user:
On a 15-minute chart, it compares consecutive 15-minute candles.
On a 1-hour chart, it compares consecutive 1-hour candles.
On a 4-hour chart, it compares consecutive 4-hour candles.
On a daily chart, it compares consecutive daily candles.
The indicator distinguishes between Outside Gaps (OG) and Inside Gaps (IG) . A box is drawn only when a visible price space remains between the relevant levels of both candles.
GAP CLASSIFICATION
OUTSIDE GAP (OG)
An Outside Gap occurs when the current candle opens completely outside the previous candle’s high-low range and its complete price range leaves visible space beyond the previous candle.
Bullish Outside Gap:
The current open is above the previous candle’s high.
The current low remains above the previous candle’s high.
The gap zone is located between the previous high and the current low.
Bearish Outside Gap:
The current open is below the previous candle’s low.
The current high remains below the previous candle’s low.
The gap zone is located between the current high and the previous low.
If the current candle trades back into the previous candle’s range, no Outside Gap box is displayed.
INSIDE GAP (IG)
An Inside Gap occurs when the current candle opens inside the previous candle’s high-low range but away from the previous close.
A visible space must remain between the previous close and the current candle’s price range.
Bullish Inside Gap:
The current open is inside the previous candle’s range.
The current open is above the previous close.
The current low remains above the previous close.
The gap zone is located between the previous close and the current low.
Bearish Inside Gap:
The current open is inside the previous candle’s range.
The current open is below the previous close.
The current high remains below the previous close.
The gap zone is located between the current high and the previous close.
If the current candle trades through the previous close, no Inside Gap box is displayed.
OUTSIDE GAP PERCENTAGE FILTER
The Minimum Outside Gap Size (%) setting allows users to exclude small Outside Gaps.
The percentage is calculated using the height of the visible OG zone. It does not use the complete distance between the previous close and the current open.
Bullish Outside Gap calculation:
(Current Low - Previous High) / Previous High x 100
Bearish Outside Gap calculation:
(Previous Low - Current High) / Previous Low x 100
An Outside Gap is displayed only when its calculated percentage is equal to or greater than the user-defined minimum.
The default minimum is 0.50% .
For example:
A value of 1.00 displays only Outside Gaps measuring at least 1%.
A value of 0.25 displays Outside Gaps measuring at least 0.25%.
A value of 0 displays every qualifying Outside Gap.
This percentage filter applies exclusively to Outside Gaps. Inside Gaps are not filtered by percentage.
VISUAL DESIGN
The indicator uses separate visual elements to communicate gap classification and direction.
Gap classification:
Outside Gaps use a yellow fill by default.
Inside Gaps use a purple fill by default.
“OG” identifies an Outside Gap.
“IG” identifies an Inside Gap.
The text uses the same color as its corresponding gap category.
Gap direction:
A green border identifies a bullish gap.
A red border identifies a bearish gap.
Default colors:
Outside Gap fill and text: yellow (#FFD700).
Inside Gap fill and text: purple (#8A2BE2).
Bullish border: green (#00A651).
Bearish border: red (#E53935).
Default box transparency: 82%.
All category colors, border colors and box transparency can be customized from the indicator settings.
BOX POSITIONING
Each gap box begins at the previous candle. This allows the drawing to visually cover the transition from the previous candle to the candle where the gap forms.
The Length of Boxes setting determines how many bars the box covers horizontally.
The selected length is measured in bars of the active chart timeframe. For example, a length of 20 represents:
Twenty 15-minute bars on a 15-minute chart.
Twenty 1-hour bars on a 1-hour chart.
Twenty daily bars on a daily chart.
Changing the box length affects only the horizontal display. It does not modify the detection or classification of a gap.
SETTINGS
Length of Boxes
Controls the horizontal length of every gap box. The value is measured in bars of the active chart timeframe.
Max Bars Back to Find Gaps
Limits the historical search to the selected number of chart bars.
For example, a value of 500 instructs the indicator to search for qualifying gaps only within the most recent 500 candles of the active timeframe.
Minimum Outside Gap Size (%)
Defines the minimum visible percentage required for an Outside Gap to be displayed.
This input affects Outside Gaps only.
Show Outside Gaps (OG)
Enables or disables all qualifying Outside Gap boxes.
Show Inside Gaps (IG)
Enables or disables all qualifying Inside Gap boxes.
Outside Gap Color
Controls the fill and text color used for Outside Gaps.
Inside Gap Color
Controls the fill and text color used for Inside Gaps.
Bullish Border Color
Controls the border color used for bullish Outside and Inside Gaps.
Bearish Border Color
Controls the border color used for bearish Outside and Inside Gaps.
Box Transparency
Controls the transparency of the box fills. It does not change the opacity of the text or borders.
ALERTS
The indicator includes alert conditions for:
New Outside Gap.
New Inside Gap.
Outside Gap alerts respect the Minimum Outside Gap Size (%) filter. An Outside Gap that does not meet the selected minimum will not create a box or trigger the corresponding alert.
Inside Gap alerts follow the Inside Gap detection conditions and are not affected by the Outside Gap percentage filter.
HOW TO USE
Apply the indicator to a standard candlestick chart.
Select the timeframe you want to analyze.
Configure the minimum Outside Gap percentage.
Adjust the box length and historical search range.
Use the box fill to identify the gap category.
Use the border color to identify the gap direction.
Enable alerts if notifications for newly detected gaps are required.
The indicator adapts its calculations to the active timeframe. It does not import gaps from a different timeframe.
For example, when the chart is set to 1 hour, the indicator detects gaps between consecutive 1-hour candles. It does not display daily gaps unless the chart itself is changed to the daily timeframe.
PRACTICAL PURPOSE
Many basic gap indicators mark every difference between one closing price and the next opening price without considering whether a visible price space remains.
This implementation adds a more selective structure by combining:
Separate Outside and Inside Gap classifications.
Confirmation that a visible gap remains between the candles.
A configurable Outside Gap percentage filter.
Independent colors for gap classification and directional bias.
Adjustable box length.
Adjustable historical search depth.
Detection based on the active chart timeframe.
Alerts that follow the same detection and filtering rules.
The script is intended to organize visible price discontinuities without generating trading signals or making assumptions about how price must react to them.
REAL-TIME BEHAVIOR
Historical gaps are calculated using completed candles.
On the active candle, the high and low can continue changing until the candle closes. As a result:
A developing gap can become smaller.
A developing gap can disappear if price trades into the relevant reference level.
The final historical result is determined when the candle closes.
This behavior is necessary because the script requires visible price space to remain before confirming the gap.
The script does not use future data or request information from a higher timeframe.
LIMITATIONS
The indicator evaluates the active chart timeframe only.
Gap frequency can vary significantly between assets and timeframes.
Intraday gaps may be uncommon in highly liquid markets with continuous trading.
More gaps may appear around session openings, trading halts or periods of low liquidity.
The indicator should be used with standard candlesticks.
Heikin Ashi, Renko, Kagi, Line Break, Point and Figure and other non-standard charts use synthetic or transformed OHLC values. Gaps detected on those charts may not represent actual traded price discontinuities.
Session settings, extended-hours data and differences between data providers can affect which gaps appear.
Corporate actions such as dividends and stock splits can create gaps that are not caused by ordinary price discovery.
TradingView allows a maximum of 500 box objects per script. If this limit is reached, the indicator retains the most recent qualifying gap boxes.
The indicator does not track whether a previously drawn gap is filled after its formation.
A detected gap does not predict whether price will continue, reverse or return to the gap.
The script does not provide entries, exits, stop-loss levels, take-profit levels or performance statistics.
This indicator is a visual analysis tool. Its drawings should not be interpreted as financial advice or as a guarantee of future market behavior.
OPEN-SOURCE PUBLICATION
The complete Pine Script source code is publicly available so users can inspect the calculations, understand the detection rules and modify the implementation for their own research.
インジケーター

Luna ATM Approach 100pt Hard Switch ContinuationLuna ATM Approach — 100pt Hard Switch Continuation
This indicator is built around the ATM session model and is designed to identify both ATM reversal opportunities and strong continuation conditions during the Asia, AM, and PM trading sessions.
The model automatically builds the ATM High and ATM Low using fixed New York session times and then monitors price action during the corresponding execution window.
ATM SESSION WINDOWS — NEW YORK TIME
Asia ATM Range:
6:00 PM – 7:00 PM
Execution:
7:00 PM – 8:30 PM
AM ATM Range:
7:00 AM – 9:30 AM
Execution:
9:30 AM – 11:00 AM
PM ATM Range:
11:30 AM – 1:30 PM
Execution:
1:30 PM – 3:00 PM
ATM REVERSAL MODEL
The reversal model begins after price sweeps either the ATM High or ATM Low.
ATM High Sweep:
Looks for a SHORT reversal.
ATM Low Sweep:
Looks for a LONG reversal.
Rather than waiting for a limit entry or a retest of the gap, the indicator looks for the inversion of a Significant FVG.
Once a qualifying Significant FVG becomes an IFVG, the indicator enters immediately on the confirmed candle close.
Reversal sequence:
ATM Liquidity Sweep
→ Significant FVG
→ FVG Inversion / IFVG
→ Immediate Reversal Entry
There is no limit order and no additional FVG retest required.
The indicator also displays market structure shift information for additional context.
Reversal stops can be based on the sweep swing or IFVG invalidation.
The default reversal target is the opposing ATM liquidity, with an optional fixed-RR target available.
100-POINT HARD SWITCH
The most important feature of this version is the automatic reversal-to-continuation regime switch.
If price expands 100 points above the ATM High after an ATM High sweep:
ATM High + 100 Points
→ Reversal SHORT model is immediately disabled
→ Indicator permanently switches to CONTINUATION LONG mode for that ATM session.
If price expands 100 points below the ATM Low after an ATM Low sweep:
ATM Low - 100 Points
→ Reversal LONG model is immediately disabled
→ Indicator permanently switches to CONTINUATION SHORT mode for that ATM session.
Once the 100-point threshold has been reached, the indicator will no longer attempt to fade the move.
CONTINUATION MODEL
Continuation trades require evidence that the market is maintaining directional expansion.
CONTINUATION LONG:
ATM High +100 reached
→ Reversal shorts disabled
→ Wait for retracement into a bullish 1-minute OR 5-minute FVG
→ Identify the pullback swing low
→ Wait for bullish Break of Structure
→ Enter LONG immediately on the confirmed BOS close
→ Stop below the pullback swing low
→ Target 1:1 Risk-to-Reward
CONTINUATION SHORT:
ATM Low -100 reached
→ Reversal longs disabled
→ Wait for retracement into a bearish 1-minute OR 5-minute FVG
→ Identify the pullback swing high
→ Wait for bearish Break of Structure
→ Enter SHORT immediately on the confirmed BOS close
→ Stop above the pullback swing high
→ Target 1:1 Risk-to-Reward
MULTI-TIMEFRAME FVG CONTINUATION
The continuation engine can use either:
1-Minute FVG
OR
5-Minute FVG
A tap into either qualifying FVG can arm the BOS portion of the continuation model.
The indicator identifies which timeframe was used and displays the BOS level that must be broken before entry.
CHART DISPLAY
The indicator automatically displays:
ATM High / ATM Low
ATM range windows
Execution windows
Liquidity sweeps
MSS information
Significant IFVG used for reversal
100-point continuation regime switch
1m / 5m continuation FVG tap
Continuation BOS level
Entry
Stop Loss
Take Profit
Trade outcome labels
Entry, Stop Loss, and Take Profit are displayed as clean horizontal levels with compact labels to reduce chart clutter.
IMPORTANT
The 100-point threshold refers to actual index price points, not ticks.
For example:
ATM High = 20,000
Continuation Long Mode activates at 20,100.
ATM Low = 20,000
Continuation Short Mode activates at 19,900.
The continuation model is designed primarily around 1-minute execution while also scanning confirmed 5-minute FVG structure.
MODEL SUMMARY
REVERSAL:
ATM Sweep
→ Significant IFVG
→ Immediate Entry
→ Opposing ATM / Fixed RR Target
CONTINUATION:
ATM ±100 Points
→ Reversal Model OFF
→ 1m or 5m FVG Tap
→ BOS
→ Immediate Entry
→ Swing-Based Stop
→ 1:1 Target
This indicator is intended as a structured trading and educational tool. It does not guarantee profitable trades and should be used alongside proper risk management, testing, and trader discretion. インジケーター

Automatic Wedge & Channel Detector
Automatic Wedge & Channel Detector identifies developing price structures directly on the chart, helping traders recognize where price is compressing, expanding, or moving within established boundaries.
Instead of requiring trendlines to be drawn manually, the indicator analyzes confirmed pivot highs and lows, tests multiple boundary combinations, and selects the structure that best fits recent price action. It can detect parallel channels, converging wedges, symmetrical triangles, ascending or descending triangle-style formations, and expanding structures.
The goal is not simply to draw two lines. The indicator evaluates how well price respects both boundaries by considering touches, spacing, violations, structural width, balance between the upper and lower sides, and the age of the pattern. This helps reduce arbitrary trendlines and prioritize structures that are better supported by actual price behavior.
KEY FEATURES
Automatic Structure Detection
Auto Mode searches recent confirmed pivots and selects the highest-scoring upper and lower boundary combination.
Manual Structure Selection
Manual Mode allows advanced users to choose which historical pivots anchor each boundary.
Multiple Pattern Types
Recognizes parallel channels, converging wedges, symmetrical triangles, ascending and descending triangle/wedge structures, and expanding formations.
Dynamic Support and Resistance Zones
Optional shaded regions highlight the areas near each boundary where price may be more likely to react.
Middle No-Trade Zone
An optional neutral zone identifies the center of the structure, where entries may offer less favorable positioning compared with trades near the boundaries.
Centerline
The midpoint of the structure can be displayed as an additional reference for equilibrium, potential reactions, and profit management.
Confirmed Breakout Detection
A breakout is recognized only after price closes beyond the structure by a configurable ATR-based distance for the required number of confirmation bars. This helps filter minor boundary breaches and wick-only moves.
Breakout Alerts
Alerts are available for confirmed upside and downside structural breaks.
Breakout and Reclaim Logic
If price returns inside the structure for the required number of bars, the previous breakout is treated as reclaimed.
Structure Lifecycle Management
The indicator tracks whether a formation is active, approaching its apex, broken, reclaimed, or expired. Broken structures can remain visible temporarily so traders can review the breakout and watch for possible retests.
Late-Stage Recognition
Converging formations change color when price approaches the apex or when the remaining width becomes unusually narrow. This warns that the structure may be mature and increasingly vulnerable to a breakout.
Volatility-Adjusted Analysis
Touch tolerance, boundary violations, minimum width, breakout distance, and late-stage conditions are measured relative to ATR so the logic can adapt across markets and timeframes.
HOW TO USE IT
For range or mean-reversion setups, traders can watch for reactions near the lower support zone or upper resistance zone while the structure remains active. The center of the formation is marked as a potential no-trade area because entries taken there often have less room to the next boundary and weaker risk-to-reward characteristics.
For breakout setups, traders can wait for a confirmed close beyond a boundary rather than reacting to the first wick through the line. A broken boundary may later become an area of support or resistance during a retest.
Converging wedges and triangles can also be used to identify volatility compression. As the boundaries narrow and price approaches the apex, traders can prepare for expansion without assuming the breakout direction in advance.
AUTO MODE VS. MANUAL MODE
Auto Mode is designed for traders who want the indicator to continuously identify the strongest recent structure.
Manual Mode is intended for traders who prefer greater control over which pivots define the pattern. Pivot #0 represents the most recently confirmed pivot, Pivot #1 is the previous pivot, and so on.
CUSTOM SOURCE
By default, the upper boundary is calculated from pivot highs and the lower boundary from pivot lows. Enabling Use Custom Source applies the selected source to both pivot calculations. This can be useful for traders who prefer structures based on closing prices or another custom data series rather than candle extremes.
IMPORTANT NOTES
Pivot-based detection requires future bars to confirm a swing. Pivot markers are placed on the original pivot bars after confirmation, so structures are not identified at the exact moment the pivot first forms.
In Auto Mode, the selected structure may update when new pivots are confirmed or when a different combination earns a better score. This is expected behavior for a continuously adapting market-structure tool.
Wedges and channels provide context—not certainty. A boundary touch does not guarantee a reversal, and a confirmed break does not guarantee continuation. Traders should combine the indicator with their own trend analysis, price-action confirmation, volume analysis, risk management, and broader market context.
Automatic Wedge & Channel Detector is designed to make complex chart structure easier to see while preserving the discretion required to trade it intelligently.
インジケーター

Adaptive Liquidity Reclaim Map [PhenLabs]📊 Adaptive Liquidity Reclaim Map
Version: PineScript™ v6
📌 Description
Adaptive Liquidity Reclaim Map (ALRM) turns a common but noisy market event into a publication-ready visual decision: price sweeps a confirmed liquidity zone, decisively reclaims it, and aligns with higher-timeframe direction. The V2 layout is designed to make the active battlefield obvious at a glance—two slim zones, one focal reclaim, and one clean payoff block.
ALRM keeps only the newest buy-side and sell-side zones on the chart. When a reclaim qualifies, it prints a high-contrast score callout, tints the signal candle, and projects transparent risk/reward blocks from the actual sweep-bar invalidation to the runner objective.
🚀 Points of Innovation
Slim active liquidity zones: the latest confirmed swing pools become semi-transparent ATR-sized zones instead of bare horizontal lines.
Screenshot-first focal signal: a diamond marker and oversized BULL/BEAR RECLAIM callout concentrate attention on the qualified event.
Transparent quality score: a 0-100 confluence measure combines impulse quality, reclaim close location, HTF alignment, and volatility suitability. It is not a probability or AI prediction.
Payoff blocks, not just targets: translucent risk and reward rectangles show the geometry of the current setup from entry to runner.
One event per pool: each confirmed swing can create only one signal, keeping the chart clean during repeated retests.
🔧 Core Components
Active Liquidity Zones: pivot highs create the newest buy-side zone and pivot lows create the newest sell-side zone. Each zone has a subtle fill, colored border, and optional dashed center.
Adaptive Reclaim Filter: candle body is normalized by ATR and compared with a threshold that responds to current volatility.
Confluence Quality Score: impulse, close location, HTF context, and volatility regime are normalized and clamped to a 0-100 quality display.
Risk/Reward Block: the sweep extreme defines risk, while 1R and runner objectives create the latest payoff map.
🔥 Key Features
Neon emerald bullish and magenta bearish visuals remain clear on dark TradingView charts.
Large BULL/BEAR RECLAIM callout includes Quality score and runner framing for an immediate screenshot narrative.
Optional signal-candle tint makes the event visible even when zoomed out.
Amber primary objective, subtle runner line, and thin entry line sit inside transparent risk/reward blocks.
Branded 2-column dashboard shows mode, HTF bias, volatility regime, active pools, last event, and quality.
Separate bullish and bearish alerts are available for notification workflows.
🎨 Visualization
Magenta zone: newest buy-side liquidity around a confirmed swing high, where upside sweep attempts are evaluated.
Emerald zone: newest sell-side liquidity around a confirmed swing low, where downside sweep attempts are evaluated.
Diamond marker plus large label: a qualified reclaim; the label states direction, confluence quality, and runner R target.
Red risk block and emerald reward block: the latest payoff geometry from signal-bar entry through the runner objective.
Amber dotted line: primary target. Fainter amber dotted line: runner. Thin neutral line: entry.
Top-right ALRM V2 dashboard: compact context for publication screenshots and live decision support.
📖 Usage Guidelines
Pivot Left Bars — Default: 4 — Range: 2-20 — Controls how much left-side structure is required for a zone. Increase for more significant pools.
Pivot Right Bars — Default: 4 — Range: 2-20 — Sets confirmation delay and selectivity. Higher values reduce zone turnover.
ATR Length — Default: 14 — Range: 5-100 — Volatility unit used for impulse, quality, and zone sizing.
Volatility Lookback — Default: 50 — Range: 10-200 — ATR baseline used to identify the current volatility regime.
Base Impulse (ATR) — Default: 0.35 — Range: 0.10-2.00 — Minimum normalized candle body before adaptive scaling. Raise it for fewer, more forceful reclaims.
Liquidity Zone Width (ATR) — Default: 0.10 — Range: 0.02-1.00 — Half-width of the active zone. Keep it near 0.10 for a slim, screenshot-friendly band.
Require HTF Alignment — Default: On — Range: On/Off — Requires the reclaim to agree with higher-timeframe EMA direction.
Higher Timeframe — Default: 240 — Range: Any TradingView timeframe — Context timeframe for directional filtering; typically select one above the chart timeframe.
Primary Target (R) — Default: 1.0 — Range: 0.50-5.00 — Bright amber first objective measured from entry to sweep-bar extreme.
Runner Target (R) — Default: 2.0 — Range: 0.75-8.00 — Full reward-block objective shown in the signal callout.
Projection Length — Default: 30 — Range: 5-200 — Number of bars the active risk/reward block extends.
Show Score Callouts — Default: On — Range: On/Off — Shows the large directional quality label; ALRM retains only the latest callout per direction.
Tint Signal Candle — Default: On — Range: On/Off — Adds a high-contrast directional tint only to qualified signal candles.
✅ Best Use Cases
Dark-chart screenshot posts where the setup needs to be understood without a long explanation.
Intraday index, futures, FX, and crypto charts where stop runs and reclaims are common.
Liquidity-focused discretionary workflows that want a consistent visual invalidation and payoff reference.
Multi-timeframe execution plans using a higher-timeframe direction filter with lower-timeframe entries.
⚠️ Limitations
Pivot confirmation delays a new zone by the selected right-bar setting; ALRM does not predict unconfirmed swings.
The quality score is a normalized confluence display, not a forecast, probability, machine-learning output, or trade recommendation.
Risk/reward blocks use the signal-bar sweep extreme and cannot account for spread, slippage, gaps, event risk, or future liquidity changes.
Higher-timeframe alignment can filter valid countertrend reversals; disable it only with a separate reversal plan.
💡 What Makes This Unique
ALRM fuses a confirmed liquidity sweep, adaptive impulse logic, and HTF context into a single screenshot-first visual system.
It replaces stale-line clutter with two current zones, capped callouts, and one active payoff map.
The same sweep-bar event powers detection, quality framing, invalidation, and targets, so the visual story remains internally consistent.
🔬 How It Works
ALRM confirms the newest swing high and swing low, then renders each as a slim ATR-sized active liquidity zone.
When price trades beyond a zone center and closes back through it, ALRM measures reclaim impulse relative to current ATR.
The threshold adjusts with volatility, while the optional higher-timeframe EMA gate checks directional context without lookahead.
A qualifying reclaim receives a clamped confluence score, a directional callout, and one projected risk/reward block with primary and runner objectives.
💡 Note:
Use ALRM with market structure, session context, and a defined execution plan. Confirm alerts on bar close, account for instrument-specific costs, and test settings on the market and timeframe you trade. This tool is an analytical aid only and is not financial advice. インジケーター

Segmented Momentum PeakSegmented Momentum Peak (SMP) by Chao Ivans
This indicator builds an adaptive momentum threshold by collecting peak and trough readings from a series of past time segments and averaging them into a reference. A current move is treated as significant only when it matches or exceeds what the instrument has historically been capable of producing.
Calculation
The process runs in four stages.
First , Rate of Change is measured on closing prices over a defined period. This value feeds everything that follows.
Second , the chart is divided into segments of a set length. From each segment, one highest reading and one lowest reading is taken. This repeats across the chosen number of segments, gathering a collection of peak samples and trough samples spanning a substantial stretch of history.
Third , all peak samples are averaged into an upper reference and all trough samples into a lower reference. Both are then divided by the sensitivity parameter to produce the working thresholds drawn on the panel.
Fourth , the system counts how many times ROC has broken those thresholds within a recent window of bars. A signal appears only when the count meets the required quota and the current bar is breaking as well.
Logic Behind the Formula
The approach used here is known as block maxima, where extreme values are drawn from each block of data and their distribution is studied. Peaks are used rather than a plain average because averaging every reading would be dominated by the far more numerous quiet bars, dragging the threshold too low and flooding the chart with signals. Collecting only peaks produces a threshold that reflects how strong a move the market has genuinely been capable of delivering.
A useful consequence is that the threshold is self scaling across instruments. On a sluggish asset it settles low on its own. On a volatile asset it rises accordingly. No recalibration is needed when switching markets.
The cluster counting layer exists because a single threshold break is often nothing more than a momentary spike. When real pressure enters, breaks tend to arrive repeatedly within a short span. The quota requirement is what separates the two.
Function
The indicator identifies momentum that is statistically unusual relative to the instrument's own history, then filters it further through a repetition requirement. The output is a directional marker on the main chart whenever buying or selling pressure is confirmed as sustained.
How to Use
The lower panel shows three elements. Columns represent the ROC reading, turning green when breaking the upper threshold, red when breaking the lower threshold, and grey when sitting between them. Two thick lines represent the adaptive thresholds, which shift as volatility conditions change.
Pay attention to the threshold line colours. A blue upper line and a purple lower line indicate the thresholds sit at a meaningful level, so any break carries weight. A black line warns that the threshold has collapsed to a very low level, which typically happens in thin or dormant markets. Breaks come easily under those conditions but signify little, so signals should be ignored or treated with caution.
A green triangle below the bar marks a confirmed cluster of buying pressure. A red triangle above the bar marks selling pressure. These triangles are pressure markers, not entry commands. Use them to confirm a plan already built from price structure rather than as a standalone reason to open a position.
Tuning Guide
Start with sensitivity. If signals feel too scarce, raise it gradually. If the chart gets crowded, lower it.
Segment Length shapes the character of the threshold. Small values give a nimble threshold that tracks current conditions. Large values give one that only shifts when volatility changes on a broad scale.
Number of Segments Sampled controls stability. A large sample count makes the threshold resistant to one or two extreme events, but also slower to adapt when the market regime turns.
Cluster Window and Minimum Hits work as a pair. A narrow window with a high quota demands tightly packed pressure and produces the fewest but firmest signals. A wide window with a low quota is permissive and produces more. インジケーター

MSnR Classic StoryLine MTFMSnR Classic StoryLine MTF
A dashboard that reads the trend of five higher timeframes at once, and reports each one as
Bullish or Bearish.
What makes each reading is not an indicator applied to five timeframes. It is a two timeframe
process. The higher timeframe decides WHERE to look: it finds the support or resistance level
that price has just rejected. The lower timeframe then decides WHICH WAY: it waits for price to
break the last structural level standing in the way. Only when both halves complete does that
row change.
Nothing is calculated from the chart you are on, so the table reads the same on every timeframe.
You can sit on M5 and still read the Monthly trend.
THE FIVE PAIRS
Monthly decided on Daily
Weekly decided on H4
Daily decided on H1
H4 decided on M30
H1 decided on M15
Each row is completely independent. They share no state and can disagree with each other, which
is the point: agreement across rows is information, and so is conflict.
WHAT MAKES THIS DIFFERENT
1. Two timeframes decide one reading.
Most multi timeframe tools run the same calculation on several timeframes and stack the results.
Here the two timeframes have different jobs. The higher one supplies the context and never
decides direction on its own. The lower one supplies the proof and is never consulted without a
context. Neither half means anything alone.
2. Levels are tracked, not drawn.
A level is not a line that is placed once and left there. Every level created inside the window
is followed forward, candle by candle, and its state is updated: it can be rejected, it can be
broken, it can flip sides and come back to life. A rejection only counts when it happens on a
level that is still Fresh. This is what stops the same tired level from producing a signal over
and over.
3. Several setups wait at the same time.
Every rejection opens its own setup, and a newer one never cancels an older one. Two, five, a
dozen can be waiting together, each with its own level and its own breakout target. Whichever
one breaks out FIRST is the one that turns the trend. A tool that tracks only the latest
rejection is late whenever the older one was closer to completing.
4. Both directions are always watched.
A single higher timeframe candle can reject a resistance and a support at the same time. Both
open a setup. The one that completes first turns the trend, and the other stays alive and can
turn it back afterwards. Nothing is switched off because of what the trend already says.
5. It shows its own reasoning.
The dashboard alone would be a black box. So for one row of your choosing the script draws the
whole chain on the chart: the level that was rejected, the candle that rejected it, the lower
timeframe candle that touched it, the level that was locked, and the candle that broke it. You
can check every reading against the candles yourself.
THE LEVELS
Every pair of consecutive candles leaves a level behind, priced at the CLOSE of the first candle
of the pair. Closes are used rather than wicks because a close is where the market actually
agreed on a price.
A candle is Green when close is greater than open and Red when close is less than open. A Doji,
where close equals open, is neither and forms no level.
A Level Green then Red sits above as resistance
V Level Red then Green sits below as support
Bullish Gap Green then Green sits below as support
Bearish Gap Red then Red sits above as resistance
From there each level lives on one of two sides, and every close through it flips it:
RBS Resistance Become Support a resistance a candle CLOSED above
SBR Support Become Resistance a support a candle CLOSED below
A level can flip any number of times. Each flip also makes it Fresh again, because in its new
role it has never been tested.
Fresh and Unfresh
Fresh newly created, or just flipped. Untested on the side it now sits on.
Unfresh price has already come back, touched it, and been turned away.
Only a Fresh level can produce a rejection. Once it turns Unfresh it stays quiet until a
breakout flips it and makes it Fresh again.
HOW ONE ROW DECIDES ITS TREND
Step 1 - the higher timeframe rejection
A higher timeframe candle reaches a Fresh level and fails to close through it.
Support side the LOW touches the level and the CLOSE stays above it
Resistance side the HIGH touches the level and the CLOSE stays below it
The level turns Unfresh, and that is the event the row acts on.
A close THROUGH the level is not a rejection. It is a breakout, it flips the level, and it
produces nothing. Breakout is always checked before rejection.
If one candle rejects several Fresh levels at once, the LOWEST is taken on the support side and
the HIGHEST on the resistance side - the level price actually reached.
Step 2 - the reference line
The rejection candle's OPEN becomes the reference point. On the lower timeframe this lands on
the candle that opens at the same moment, and that candle is the first one examined. Nothing to
the left of it is ever looked at again.
Step 3 - the touch candle
Moving forward from the reference point, the first lower timeframe candle that reaches the
rejected level is the touch candle. Reaching it is enough; it does not matter whether price
bounces or cuts through.
The touch candle splits the chart in two: everything left of it is External, everything right of
it is Internal.
Step 4 - lock the level to be broken
On the External side, take the nearest level of the opposite kind:
Buy side context the nearest A Level to the left, for an upward break
Sell side context the nearest V Level to the left, for a downward break
It does not need to be Fresh. Any A or V will do. Only A and V are used here - Gap, RBS and SBR
are not.
Step 5 - the breakout
On the Internal side, wait for a lower timeframe candle to CLOSE through the locked level.
Close above the locked A Level the row turns Bullish
Close below the locked V Level the row turns Bearish
A wick through it is not enough, and the touch candle can never confirm itself - the earliest a
row can turn is the candle after the touch.
There is no time limit on the wait.
WHEN SEVERAL SETUPS ARE WAITING
Each open setup carries its own rejected level, its own reference line, its own touch candle and
its own locked level. They all run at the same time.
Setup A rejected 4050, waiting for a close below 4000
Setup B rejected 4040, waiting for a close below 4010
Price reaches 4010 first, so setup B turns the row Bearish. The instant that happens the row is
Bearish, and setup A never gets its turn.
A setup ends in one of three ways: it confirms, the higher timeframe closes through the level it
came from - which flips that level and makes the rejection meaningless - or it is pushed out by
the pending cap.
TREND PERSISTENCE
Once a row is Bullish it stays Bullish until a Bearish confirmation completes, and the other way
round. There is no sideways or neutral state in between, and no expiry.
Before the very first confirmation on a symbol a row reads No Trend. After that it is always one
or the other.
READING THE CHART
The dashboard
Five rows, each with a coloured dot, the timeframe name and its current trend. Hovering a row
name shows which lower timeframe confirms it. Rows can be hidden individually.
The setup visualiser
For the row you select, the chain that produced its current trend is drawn in the trend colour:
a horizontal line the higher timeframe level that was rejected, labelled with the timeframe,
the level type and its price, starting at the candle whose close created it.
a vertical line the higher timeframe rejection candle.
a vertical line the lower timeframe touch candle.
a horizontal line the locked A or V level, labelled with its timeframe and price.
a vertical line the lower timeframe candle that broke it.
If a setup is still waiting, it is drawn the same way in the opposite colour with dashed lines,
so you can see what the row is waiting for next. Everything can be switched off if you only want
the table.
SETTINGS
Dashboard Settings
- Table Position and Table Size.
Engine Settings
- Max Stored Levels (per HTF): how many levels each timeframe keeps in memory. Older ones are
forgotten, so a rejection from a very old level is only seen while it is still inside this
window.
- Max Pending Setups (per side): how many setups may wait at once. When full, the oldest is
dropped.
- History Depth (bars per timeframe): how far back each engine runs. Bars older than this are
skipped, because the levels they create would have been pushed out of the level window long
before reaching the present. Lower it if the script is slow on a heavy symbol.
Dashboard Rows
- An individual switch for each of the five rows.
Colors
- Bullish, Bearish and No Trend colours, used by both the table and the visualiser.
Setup Visualiser
- Show Active Setup On Chart, the row to draw, and whether to also draw the setup still waiting.
ALERTS
Ten alert conditions, one per row per direction:
Monthly Trend Bullish / Bearish, Weekly Trend Bullish / Bearish, Daily Trend Bullish / Bearish,
H4 Trend Bullish / Bearish, H1 Trend Bullish / Bearish.
Each fires only when a row actually FLIPS, not on every bar. Each message carries the row, the
direction, the symbol and the closing price. The same messages are sent through the alert
function, so the "Any alert() function call" alert type delivers every flip through one alert.
One thing worth knowing: an alert can only fire on a bar of the chart it was created on. If you
create it on a Weekly chart, a row that flips twice inside that week produces one alert, not two.
Create alerts on a chart timeframe at or below M15 and nothing is missed.
REPAINTING
The values do not repaint.
- Every engine reads confirmed candles only. It works on the previous, already closed candle of
its own timeframe, so the candle still forming can never enter the calculation and cannot
change what has already been decided.
- Each candle is processed exactly once. A timestamp guard makes a second pass over the same
candle impossible.
- No request uses lookahead, so no calculation can see data that had not happened yet.
- A row's value changes only when a candle of the timeframe that decides it closes. Once a row
has turned, that reading does not change afterwards.
- Because the calculation is independent of the chart, the table reads the same whichever
timeframe you are on.
When you create an alert, TradingView may show a caution banner saying the indicator can repaint.
That banner appears automatically for any script that requests data from other timeframes, no
matter how carefully it is done, because the platform cannot check the intent behind the request.
NOTES AND LIMITATIONS
- Intended for intraday charts, roughly M1 up to H4. On Daily and higher, the M15 and M30
requests have to cover a very long range and TradingView may refuse them with a memory
error on symbols with deep history. There is nothing to gain from a high chart timeframe
anyway, as the table reads the same everywhere.
- The far left of the chart reads No Trend. Each engine starts from a fixed depth, so it needs a
stretch of candles before the first confirmation completes. This never affects the current
reading.
- Levels older than the Max Stored Levels window are forgotten. A rejection from a very old
level will not be seen once it has aged out.
- Detection is purely structural. It reports which way a timeframe has turned and why. It does
not rank readings by quality, measure what happened afterwards, or produce entries, targets
or stops.
HOW TO USE IT
Read the rows as a stack. When the slow rows agree, the market has one direction and the faster
rows tend to give pullbacks inside it. When they disagree, the faster rows are usually working
against the slower ones, and that is normally where the choppy trading is.
The visualiser is there so you never have to take a reading on faith. Point it at the row you
care about and the whole chain is on the chart: which level was rejected, when, where price
touched it, and exactly which level had to break. If a reading looks wrong, the drawing shows you
why it is what it is.
These are structural readings, not entry signals. Use them as direction and context alongside
your own levels, your own entry method and proper risk management.
DISCLAIMER
This indicator is a market structure analysis tool. It is not financial advice and it makes no
claim about profitability. Trading involves risk. Always apply your own analysis and risk
management. インジケーター

FVG Handoff [scriptedge]Overview
FVG Handoff looks for a fair value gap on a higher timeframe, then waits to see whether price returns to that gap on the very next higher timeframe candle. Throughout this description the three candles that form the gap are called the context candles , and the one after them is the trading candle .
The indicator is designed so that the whole setup can be visualised from the lower timeframe you intend to trade. The higher timeframe is read in the background and its structure is drawn onto your chart, so there is no need to switch timeframes to see where the gap sits or how the trading candle is developing. Any confirmation the indicator marks is one that occurred on your own chart timeframe, within the span of the trading candle.
The tool draws structure and context. It does not generate buy or sell signals, and it does not manage entries, exits, stops, or position size. Those decisions are left to the trader.
The Higher Timeframe Pattern
A fair value gap is a three candle pattern where the first and third context candles do not overlap.
Bullish: the low of the third context candle is above the high of the first, and the middle one closes up.
Bearish: the high of the third context candle is below the low of the first, and the middle one closes down.
The gap between the first and third context candles is the zone. It is drawn on your chart as a shaded box.
The target is the furthest extreme of the second and third context candles — the highest high on a bullish pattern, the lowest low on a bearish one. The second is the impulse candle and often overshoots the third, which is why both are considered rather than the third alone.
Why Only The Next Candle
Most fair value gap tools keep a gap on the chart indefinitely and mark it whenever price eventually returns, which can be days later. This indicator only considers the immediately following higher timeframe candle — the trading candle.
Everything happens within it:
If price never trades into the zone during the trading candle, the setup is discarded and its drawings are removed from the chart.
If price reaches the target before it reaches the zone, the setup is discarded — there is nowhere left for it to go.
If price trades into the zone during the trading candle, the setup becomes active and the zone is shaded more strongly.
This is a deliberate narrowing, not an oversight. It selects for gaps that the market reacts to immediately rather than gaps that happen to be revisited much later.
Lower Timeframe Confirmations
Once the zone has been tapped, the indicator looks for a confirmation on your chart timeframe, within the trading candle. Each type fires at most once per setup, and each can be turned on or off independently.
FVG — a fair value gap in the same direction as the setup forming on the chart timeframe, in other words price leaving the higher timeframe zone with a gap of its own. Drawn as a box over the three candles that formed it.
IFVG — a gap in the opposite direction that price then closes back through, inverting it. A bullish setup looks for a bearish gap that price closes above; a bearish setup looks for a bullish gap that price closes below. The gap being inverted may have formed before the trading candle opened, so long as it is no older than the extreme that started the retracement. Drawn at its own original location, which can sit well to the left.
MSS — a market structure shift. The indicator tracks swing highs and lows on the chart timeframe. When the last three swings form a high, low, high sequence and price then closes below that low, a line is drawn from the broken swing to the candle that closed through it. On a bullish setup the mirror applies. If the third swing also exceeded the first, taking out its level beforehand, a second line marks that swept level. An MSS is only marked if the level being broken is still short of the target, and only once per setup.
What Is Drawn
Zone — a grey box spanning the HTF FVG. Lightly shaded while untouched, more strongly shaded once price has traded into it.
Target line — a dashed line from the bar that made the extreme, ending at the candle that reaches the target or at the end of the trading candle, whichever comes first.
Confirmation boxes — FVG in blue, IFVG in cyan, each labelled and extended until candles clear them.
MSS lines — a solid line for the broken swing and a dotted line for the swept level.
Higher timeframe panel — the three context candles and the trading candle redrawn to the right of the live chart, with the gap marked across them and the target line running through. The trading candle updates live. This lets you see the higher timeframe structure without switching timeframes.
Separators — a vertical line at the open of each higher timeframe candle.
EMA — drawn only across the span of a setup rather than continuously.
Stats Dashboard
The table counts how past setups on the selected higher timeframe resolved:
Tap to target — price traded into the zone during the trading candle, and later reached the target without a higher timeframe candle first closing through the far side of the gap.
Tap to fail — price traded into the zone during the trading candle, but a higher timeframe candle closed through the far side of the gap before the target was reached.
No setup — the zone was never tapped during the trading candle, or the target was taken before price returned.
Hit rate — the first figure as a percentage of the first two.
Please read this table for what it is. It is a count of what price did on the bars loaded in your chart. It is not a backtest and not a strategy report. No entry price, exit price, stop, commission, or slippage is assumed, because the indicator does not place trades. Outcomes still open — neither target reached nor gap invalidated — are excluded from all counts, so the figures move as those resolve. Past behaviour of a market does not indicate future behaviour.
Settings
Chart Theme — light or dark colour palette.
Stats Dashboard — show or hide the table.
Higher Timeframe — 15m, 1h, 4h, D, W or M.
HTF Candle Separators — vertical line at each higher timeframe open.
Show FVG / Show IFVG / Show MSS — confirmation types, independently toggled.
Show EMA / EMA Length — optional EMA across the setup.
Alerts
One alert fires when a zone is first tapped during the trading candle, with a message naming the timeframe and direction, for example 1h bullish FVG tapped. It fires at most once per setup. To use it, create an alert on the indicator and choose Any alert() function call as the condition.
Repainting
Historical bars are never restated. Specifically:
Higher timeframe candles are built by aggregating completed chart bars, so a pattern is only known once its third candle has closed. request.security() with lookahead is not used anywhere in the script.
All detection runs on confirmed bars. A condition that appears mid-bar and is gone by the close never registers.
Drawings are placed on the bar where the event actually occurred, even when the event only becomes knowable a bar or two later. Detection timing affects when a drawing appears, never where.
There is one deliberate removal, and it is worth stating plainly: a zone that price never trades into during the trading candle is deleted when that candle closes. This keeps the chart to setups that actually became live, but it does mean you will not see discarded gaps when scrolling back. The stats table counts them under "No setup".
The zone box, the target line and confirmation boxes extend to the right as the trading candle progresses. That is a drawing being lengthened, not a value being changed.
Limitations
Only the next candle is considered. A gap that price returns to two or more candles later is ignored by design. If you want every gap tracked indefinitely, this is not the tool for that.
On the higher timeframe itself, the trading candle is a single bar. Its open, high, low and close cannot say whether price tapped the zone before or after it reached the target. Lower timeframe confirmations, the target line and the stats table are therefore not shown when your chart timeframe equals the selected higher timeframe. Only the gap is drawn there.
Above the higher timeframe, nothing is drawn. Select a chart timeframe lower than the higher timeframe setting.
Swing detection for MSS uses a fixed strength of one bar either side. This is intentional, because the structure being measured sits inside a single higher timeframe candle, but it is sensitive and will pick up minor swings.
A pivot needs one bar to confirm, so an MSS occurring on the last bar of the trading candle is detected a bar late. The line is still drawn at the correct candle.
Drawing objects are capped by the platform. On very long histories the oldest drawings will drop off the chart.
The stats table depends on how much history your plan loads, so the counts will differ between account types on the same instrument.
This is an indicator, not a strategy. It offers no entries, exits, stop levels, position sizing, or risk management, and makes no claim about profitability.
Disclaimer
This script is for informational and educational purposes only. It is not financial advice and not a recommendation to buy or sell anything. Trading involves substantial risk of loss. Test any tool thoroughly and make your own decisions. インジケーター

ICT Market Structure [JPT] ICT Market Structure is an educational market structure indicator that automatically identifies Higher Highs, Higher Lows, Lower Highs, Lower Lows, Break of Structure (BOS), and Change of Character (CHOCH) using confirmed swing points. The indicator also highlights potential Demand and Supply Order Blocks to help traders analyze structural continuation and potential market reversals.
The indicator is designed to help traders visualize market structure and identify important price reaction zones. It does not predict future price movement or guarantee profitable trades.
🔷 FEATURES
Automatic market structure detection
Higher High (HH) and Higher Low (HL) identification
Lower High (LH) and Lower Low (LL) identification
Bullish and bearish Break of Structure (BOS)
Bullish and bearish Change of Character (CHOCH)
Automatic Demand Order Block detection
Automatic Supply Order Block detection
Confirmed swing-based structure
Optional Order Block retest analysis
Automatic broken/invalidated zone removal
Customizable swing and Order Block settings
Clean chart layout with minimal clutter
🔷 HOW IT WORKS
Detects confirmed swing highs and swing lows.
Classifies market structure into HH, HL, LH, and LL.
Monitors important swing levels for structural breaks.
Identifies potential BOS events when price breaks established structure.
Identifies potential CHOCH events when market structure shifts.
Searches for relevant bullish and bearish candles around structural breaks to create potential Order Blocks.
Displays Demand and Supply zones directly on the chart for market structure analysis.
🔷 HOW TO USE
Start by observing the current HH / HL / LH / LL structure.
Use BOS to identify potential continuation of the existing market structure.
Use CHOCH to monitor potential changes in market direction.
Watch how price reacts when returning to a Demand or Supply Order Block.
Use Order Blocks as areas of interest rather than automatic entry signals.
Combine the structure information with your own confirmation methods and risk management rules.
🔷 MARKET STRUCTURE GUIDE
Bullish Structure:
HH → HL → BOS → continuation
Bearish Structure:
LH → LL → BOS → continuation
Potential Structural Shift:
Existing Structure → CHOCH → New Direction → New BOS
🔷 NOTES
Structure is based on confirmed swing points.
Historical structure may appear only after the required swing confirmation period.
Order Blocks are analytical zones and should not be considered guaranteed reversal areas.
BOS and CHOCH are designed to help visualize structural changes, not predict future price movement.
The indicator is intended as an educational and analytical tool.
No indicator can guarantee successful trades, and this script should not be used as the sole basis for investment or trading decisions. インジケーター

Sattam | Smart Money ToolkitSattam Smart Money Toolkit
English
SATTAM Smart Money Toolkit is an open-source Smart Money Concepts toolkit designed to bring several market-structure and price-action components into one configurable TradingView indicator.
The goal of the toolkit is not to generate automatic buy or sell recommendations. Instead, it provides a structured visual framework for analyzing market structure, liquidity, order blocks, imbalances, and price location from multiple perspectives.
What the indicator includes
The toolkit combines the following components:
* Swing Market Structure
* Internal Market Structure
* Break of Structure (BoS)
* Change of Character (ChoCh)
* Enhanced Change of Character (ChoCh+)
* Internal and Swing Order Blocks
* Volumetric Order Block metrics
* Order Block mitigation
* Equal Highs (EQH)
* Equal Lows (EQL)
* Multi-timeframe Order Block Scanner
* Higher-timeframe Order Blocks
* Accumulation and Distribution ranges
* Premium, Equilibrium, and Discount zones
* Fair Value Gaps (FVG)
* Volume Imbalances (VI)
* Opening Gaps / One-bar gaps (OG)
* Inverted Fair Value Gaps (iFVG)
* Liquidity Sweeps
* Configurable alerts
The components can be enabled, disabled, filtered, and visually customized from the indicator settings.
Market Structure
The market-structure engine is divided into two layers:
1. Swing structure
2. Internal structure
Swing structure uses a larger adaptive pivot length, while internal structure uses a fixed shorter pivot length.
The Swing structure can operate in:
* Manual mode
* Dynamic mode
In Manual mode, the swing length is fixed at 50 bars.
In Dynamic mode, the swing length adapts to the current volatility regime using the relationship between ATR(14) and ATR(200), while remaining bounded between 20 and 100 bars.
A structure level is considered broken when the candle closes beyond the corresponding confirmed pivot level.
The indicator classifies structural breaks as:
* BoS: a break occurring in the current structural trend direction.
* ChoCh: a break against the current structural trend.
* ChoCh+: a counter-trend break associated with the preceding swing relationship.
Both swing and internal structure can independently display All, ChoCh, ChoCh+, BoS, or None.
Structure state changes are processed on confirmed bars, helping keep the structural state from changing intrabar.
Order Blocks
The Order Block engine identifies the most recent opposite-direction candle before a structural break and associates it with the impulse that produced the break.
Bullish Order Blocks are created from bullish structural breaks, while bearish Order Blocks are created from bearish structural breaks.
The toolkit supports two structural layers:
* Internal Order Blocks
* Swing Order Blocks
Order Blocks can be filtered by:
* None
* BoS
* ChoCh
* ChoCh+
Each Order Block can also be managed using a mitigation rule:
* Absolute: the zone is considered invalid when price closes beyond the opposite edge.
* Middle: the zone is considered invalid when price reaches the midpoint.
The indicator can keep a configurable number of recent Order Blocks and can manage overlapping zones using the selected overlap method.
Volumetric Order Block Metrics
The Order Block engine also calculates volume distribution across the impulse that produced the zone.
Volume is separated into bullish and bearish candle volume and displayed visually inside the Order Block.
The indicator can display:
* Total volume associated with the impulse
* Approximate bullish volume percentage
* Buy-side and sell-side volume proportions
* A midpoint line
* Bar coloring while price is inside an active Order Block
These values are descriptive volume metrics associated with the detected structure; they are not presented as institutional order-flow data or exchange-level bid/ask volume.
Equal Highs and Equal Lows
The toolkit detects Equal Highs and Equal Lows by comparing consecutive confirmed swing pivots.
Two swing highs or lows are considered equal when their price difference is within 0.1 ATR(14).
Detected levels are marked with:
* EQH for Equal High
* EQL for Equal Low
These levels can be used as visual references for potential liquidity areas.
Multi-Timeframe Order Block Scanner
The built-in scanner evaluates internal Order Block state across several predefined timeframes:
* 15 minutes
* 1 hour
* 4 hours
* 1 day
The scanner reports whether price is currently inside:
* A Buy Order Block
* A Sell Order Block
* Both
* No detected Order Block
Timeframes lower than the active chart timeframe are ignored by the scanner.
Higher-Timeframe Order Blocks
The toolkit can also project the latest unmitigated Order Blocks from a selected higher timeframe onto the current chart.
The selected timeframe is evaluated independently and its latest Buy and Sell Order Blocks are displayed on the lower-timeframe chart.
The higher-timeframe data is requested with lookahead disabled, and the feature only becomes active when the selected timeframe is actually higher than the chart timeframe.
Each projected zone is labeled with its source timeframe, such as:
* 4H Buy OB
* 4H Sell OB
Accumulation and Distribution
The optional Accumulation and Distribution module searches for compressed price ranges.
The detection window can be:
* Fast: 20 bars
* Slow: 40 bars
The range is compared with ATR(200) using a window-scaled compression threshold.
When price eventually breaks the detected range:
* An upside breakout classifies the range as Accumulation.
* A downside breakout classifies the range as Distribution.
This module is disabled by default and can be enabled independently.
Premium, Equilibrium and Discount
The High and Low module uses the current confirmed swing range to divide price into three visual areas:
* Premium
* Equilibrium
* Discount
Equilibrium is the midpoint between the active swing high and swing low.
The zones are intended as a price-location framework rather than standalone trading signals.
Fair Value Gaps and Imbalances
The toolkit supports three gap models:
FVG
A three-candle imbalance is detected when the current candle creates a gap relative to the candle two bars earlier, with an additional displacement condition from the middle candle.
VI
Volume Imbalance mode uses candle-body separation while allowing wick overlap.
OG
Opening Gap mode detects a direct gap between consecutive candles.
The FVG module can operate on:
* The current chart timeframe
* A selected timeframe
The number of displayed recent gaps and their extension length are configurable.
FVG Mitigation and iFVG
Detected gaps can be mitigated using:
* Close
* Wick
Close mitigation requires price to close through the relevant far side of the gap.
Wick mitigation uses a wick penetration of the relevant boundary.
The optional iFVG feature converts a gap into an inverted zone when price closes through it.
The inverted zone represents the directional role reversal of the original imbalance and remains visible until price closes back through its opposite boundary.
Liquidity Sweeps
The Sweep module identifies raids of internal pivot liquidity.
A bearish sweep occurs when price:
1. Trades above an active internal high.
2. Closes back below that high.
3. Has not already swept the same pivot.
4. Meets the configured cooldown requirement.
A bullish sweep follows the opposite logic:
1. Price trades below an active internal low.
2. Closes back above that low.
3. The same pivot has not already been swept.
4. The cooldown requirement is satisfied.
Sweeps are displayed with a horizontal level and an "x" marker.
The cooldown period is configurable.
Alerts
The toolkit provides alert conditions for major events, including:
* Swing Bullish BoS
* Swing Bearish BoS
* Swing Bullish ChoCh
* Swing Bearish ChoCh
* Swing Bullish ChoCh+
* Swing Bearish ChoCh+
* Internal Bullish BoS
* Internal Bearish BoS
* Internal Bullish ChoCh
* Internal Bearish ChoCh
* Internal Bullish ChoCh+
* Internal Bearish ChoCh+
* Buy Order Block Touched
* Sell Order Block Touched
* Bullish Gap Formed
* Bearish Gap Formed
* Bullish iFVG Formed
* Bearish iFVG Formed
* EQH Formed
* EQL Formed
* Bullish Sweep
* Bearish Sweep
These alerts are event-based and are intended to notify the user when the corresponding condition is detected.
Repainting and Data Handling
The structural state, Order Block mitigation, EQH/EQL detection, FVG mitigation, and sweep events are processed using confirmed bars where applicable.
Higher-timeframe requests use lookahead_off to avoid intentionally requesting future higher-timeframe data.
However, users should understand that pivot-based market-structure concepts inherently require bars to form before a pivot can be confirmed. A pivot is therefore identified only after the required confirmation window has elapsed.
The indicator is designed for analytical visualization and does not guarantee that every historical drawing represents a real-time signal that would have been known at the exact beginning of that historical bar.
Important Notes
SATTAM Smart Money Toolkit is an analytical tool, not an automated trading system.
It does not guarantee profitable trades, future price direction, or any specific win rate.
BoS, ChoCh, Order Blocks, FVGs, liquidity sweeps, Premium/Discount zones, and other Smart Money Concepts are interpretive market-analysis frameworks. Their usefulness depends on the market, timeframe, instrument, and the user's methodology.
Volume displayed inside Order Blocks represents aggregated candle volume classified by candle direction. It should not be interpreted as exchange-level bid/ask order-flow data.
The indicator is intended to be used as a decision-support and market-structure visualization tool. Users should combine its information with their own analysis and risk-management process.
Open Source
This script is published open-source so users can inspect and understand how the calculations are performed, and contribute improvements.
The source code is intentionally available for transparency and educational value.
Please review the source code and settings before relying on any component in live market analysis.
العربية
ما هو Sattam Smart Money Toolkit؟
SATTAM Smart Money Toolkit هو مؤشر مفتوح المصدر يجمع مجموعة من أدوات تحليل حركة السعر ومفاهيم Smart Money Concepts في مؤشر واحد قابل للتخصيص.
الهدف من المؤشر ليس إعطاء توصيات شراء وبيع آلية، وإنما توفير إطار بصري منظم يساعد المتداول على دراسة:
* هيكل السوق
* السيولة
* مناطق Order Blocks
* الاختلالات السعرية
* مناطق Premium وDiscount
* سلوك السعر على أكثر من إطار زمني
هيكل السوق
المؤشر يقسم Market Structure إلى مستويين:
* Swing Structure
* Internal Structure
الـ Swing Structure يستخدم نطاقًا أكبر لتحديد القمم والقيعان، بينما يستخدم الـ Internal Structure نطاقًا أصغر.
يوجد وضعان للـ Swing Structure:
* Manual
* Dynamic
في الوضع اليدوي يتم استخدام طول ثابت قدره 50 شمعة.
أما الوضع الديناميكي فيقوم بتعديل طول Swing بناءً على حالة التذبذب من خلال العلاقة بين ATR(14) وATR(200)، مع إبقاء الطول بين 20 و100 شمعة.
يتم اعتبار الكسر هيكليًا عندما يغلق السعر خلف مستوى Pivot مؤكد.
ويصنف المؤشر الكسر إلى:
* BoS: كسر في اتجاه الهيكل الحالي.
* ChoCh: كسر عكسي لاتجاه الهيكل الحالي.
* ChoCh+: كسر عكسي مرتبط بعلاقة القمم والقيعان السابقة.
ويمكن التحكم بشكل مستقل في عرض Swing وInternal Structure.
Order Blocks
يقوم المؤشر بتحديد آخر شمعة في الاتجاه المعاكس قبل حدوث الكسر الهيكلي وربطها بالحركة السعرية التي أدت إلى الكسر.
يدعم:
* Internal Order Blocks
* Swing Order Blocks
كما يمكن فلترة المناطق حسب:
* None
* BoS
* ChoCh
* ChoCh+
وبالنسبة لإلغاء أو Mitigation المنطقة يوجد خياران:
* Absolute: يتم إلغاء المنطقة عند إغلاق السعر خلف الحافة المقابلة.
* Middle: يتم اعتبار المنطقة متأثرة عند وصول السعر إلى منتصفها.
كما يمكن تحديد عدد المناطق الأخيرة التي تريد الاحتفاظ بها وإدارة المناطق المتداخلة حسب الإعداد المختار.
Volumetric Order Blocks
يحسب المؤشر توزيع حجم التداول المرتبط بالحركة التي نتج عنها الـ Order Block.
ويتم تقسيم الحجم إلى:
* حجم الشموع الصاعدة
* حجم الشموع الهابطة
ثم يتم تمثيل هذه النسب بصريًا داخل المنطقة.
ويمكن إظهار:
* إجمالي الحجم
* نسبة الحجم الصاعد
* نسبة الحجم الهابط
* خط المنتصف
* تلوين الشموع أثناء وجود السعر داخل المنطقة
مهم: هذه البيانات تمثل تجميعًا لحجم الشموع وتصنيفها حسب اتجاه الإغلاق، وليست بيانات Bid/Ask أو Order Flow حقيقية من دفتر أوامر البورصة.
EQH / EQL
يقوم المؤشر باكتشاف:
* EQH = Equal High
* EQL = Equal Low
ويتم اعتبار قمتين أو قاعين متساويين عندما يكون الفرق السعري بينهما ضمن 0.1 من ATR(14).
ويمكن استخدام هذه المستويات بصريًا لتحديد مناطق قد ترتبط بالسيولة.
Multi-Timeframe Order Block Scanner
يوجد داخل المؤشر Scanner لمناطق الـ Order Blocks على:
* 15 دقيقة
* ساعة
* 4 ساعات
* يوم
ويبين ما إذا كان السعر داخل:
* Buy OB
* Sell OB
* Buy + Sell
* لا توجد منطقة
ولا يعرض الـ Scanner الإطارات الزمنية الأقل من الإطار المستخدم على الشارت.
Higher-Timeframe Order Blocks
يمكن إسقاط آخر Order Blocks غير المتأثرة من إطار زمني أعلى على الشارت الحالي.
مثلًا يمكن عرض:
* 4H Buy OB
* 4H Sell OB
على شارت أقل زمنيًا.
ويتم استخدام lookahead_off في طلب بيانات الإطار الأعلى لتجنب طلب بيانات مستقبلية بشكل متعمد.
Accumulation / Distribution
هذه الخاصية اختيارية وتبحث عن مناطق يحدث فيها انكماش نسبي في نطاق السعر.
يوجد وضعان:
* Fast = 20 شمعة
* Slow = 40 شمعة
بعد اكتشاف نطاق مضغوط، إذا حدث كسر للأعلى يتم تصنيفه كـ Accumulation، وإذا حدث كسر للأسفل يتم تصنيفه كـ Distribution.
Premium / Equilibrium / Discount
يقسم المؤشر النطاق السعري الحالي بين Swing High وSwing Low إلى:
* Premium
* Equilibrium
* Discount
ويتم حساب Equilibrium باعتباره منتصف المسافة بين القمة والقاع.
هذه المناطق تستخدم لتحديد موقع السعر داخل النطاق وليست إشارة دخول مستقلة.
FVG / VI / OG
يدعم المؤشر ثلاثة أنواع من الاختلالات:
FVG
يبحث عن اختلال ثلاثي الشموع مع شرط إضافي يتعلق بحركة الشمعة الوسطى.
VI
يعتمد على انفصال أجسام الشموع مع السماح بوجود تداخل بين الـ Wicks.
OG
يبحث عن Gap مباشر بين شمعتين متتاليتين.
ويمكن تشغيل البحث على الإطار الحالي أو اختيار إطار زمني آخر.
iFVG
يمكن للمؤشر تحويل الـ FVG إلى Inverted FVG عندما يغلق السعر من خلال المنطقة.
أي أن المنطقة الأصلية يتم التعامل معها كمنطقة معكوسة في الاتجاه.
وتستمر منطقة iFVG حتى يغلق السعر من الجهة المقابلة.
Liquidity Sweeps
يقوم المؤشر برصد عمليات Sweep للقمم والقيعان الداخلية.
الـ Bearish Sweep يحدث عندما:
1. يخترق الـ Wick قمة داخلية.
2. يغلق السعر أسفل القمة.
3. لم يتم Sweep لنفس الـ Pivot سابقًا.
4. يتم احترام فترة الـ Cooldown المحددة.
والـ Bullish Sweep يعمل بالعكس.
ويظهر الـ Sweep بخط أفقي وعلامة x.
Alerts
المؤشر يحتوي على Alerts للأحداث الرئيسية مثل:
* Swing BoS
* Swing ChoCh
* Swing ChoCh+
* Internal BoS
* Internal ChoCh
* Internal ChoCh+
* دخول السعر إلى Buy/Sell OB
* تكوّن Bullish/Bearish FVG
* تكوّن iFVG
* EQH / EQL
* Bullish / Bearish Sweep
هل المؤشر يعيد الرسم؟
المؤشر يستخدم Pivot-based structure، ولذلك يجب أن تمر فترة التأكيد المطلوبة قبل معرفة أن Pivot معين أصبح مؤكدًا.
تغييرات حالة الهيكل، Mitigation الخاصة بالـ Order Blocks، اكتشاف EQH/EQL، معالجة FVG، وعمليات Sweep يتم التعامل معها باستخدام الشموع المؤكدة حيثما ينطبق ذلك.
كما أن طلبات بيانات الفريمات الأعلى تستخدم lookahead_off.
لذلك يجب التفريق بين تأخر تأكيد الـ Pivot وبين مفهوم repainting التقليدي. فالـ Pivot لا يمكن معرفته لحظة تكوّنه لأنه يحتاج شموعًا لاحقة لتأكيده.
تنبيه مهم
المؤشر أداة تحليلية وليس نظام تداول آليًا.
لا يضمن المؤشر اتجاه السعر المستقبلي أو الأرباح أو نسبة نجاح محددة.
مفاهيم مثل:
BoS، ChoCh، Order Blocks، FVG، Liquidity Sweeps، Premium وDiscount
هي أطر تحليلية وليست ضمانًا لحدوث حركة سعرية معينة.
كما أن Volume Metrics داخل الـ Order Blocks هي أحجام شموع مجمعة ومصنفة حسب اتجاه الشمعة، وليست قراءة مباشرة لـ Bid/Ask أو دفتر أوامر البورصة.
ينبغي استخدام المؤشر كأداة مساعدة في التحليل مع إدارة المخاطر ومنهجية المتداول الخاصة.
المصدر المفتوح
تم نشر المؤشر كمصدر مفتوح بهدف الشفافية وإتاحة الكود للمستخدمين والمطورين لفهم طريقة الحساب ومراجعة التنفيذ وتطويره.
يمكن للمستخدم مراجعة الكود والإعدادات لفهم كيفية عمل كل مكوّن قبل استخدامه في التحليل الفعلي.
インジケーター

Time-Based Range Sweep (DTR)SUGGESTED TITLE
Time-Based Range Sweep (TBRS)
SHORT TITLE
TBRS
---
OVERVIEW
Time-Based Range Sweep builds a price range from two user-defined intraday time windows, waits for price to sweep one side of that range after the window closes, and then looks for a specific reversal confirmation before marking an entry, a stop area, and a target area.
The idea behind it is simple: a fixed block of time produces a high and a low. Once that block is finished, those two levels sit on the chart as reference liquidity. Price often runs one side of them before moving in the opposite direction. This script automates the bookkeeping around that sequence — drawing the range, flagging which side was swept, waiting for a confirmation you select, and projecting the resulting levels forward so you are not measuring them by hand.
Each range is independent and each range produces at most one signal per day.
---
HOW IT WORKS
1. RANGE CONSTRUCTION
Two session windows can be enabled independently. Both are interpreted in a timezone you choose (default America/New_York), so the ranges stay anchored to the same clock time regardless of your chart's display timezone.
While a window is open, the script tracks the running highest high and lowest low of every bar inside it, drawing a live box and two solid boundary lines that expand as the window develops. When the window closes, the box is finalized, and dotted or dashed projection lines carry the high and the low forward for a configurable number of bars. Optional labels mark the range title, TBR RANGE HIGH, and TBR RANGE LOW.
Defaults are 01:12–02:12 and 08:12–09:12 New York time, but both windows are fully editable — any two intraday blocks can be used.
2. SWEEP DETECTION
Sweep logic only becomes active after the window has closed. The first bar that trades beyond either boundary is registered as the sweep for that range:
- A bar trading below the range low is a low sweep, which sets a long bias.
- A bar trading above the range high is a high sweep, which sets a short bias.
"Sweep must reclaim range" is on by default. With it enabled, a wick through the level is not enough — the bar must also close back inside the range for the sweep to count, which filters out bars that simply break the level and keep going. Turning it off accepts any penetration of the boundary.
Only the first sweep after each window is used. Once a side has been taken, the range stops looking for further sweeps until the next session.
3. CONFIRMATION MODELS
After a sweep is registered, the script waits for one of three confirmations. You pick which one is active, or choose Any Confirmation and take whichever appears first.
3 Candle Reversal — After the sweep, the script counts consecutive bars closing against the anticipated direction (down closes following a low sweep, up closes following a high sweep) and records the high and low of that sequence. The counter resets if the run is broken before it reaches three. Once at least three have accumulated, the signal fires on a close beyond the sequence extreme — above the sequence high for longs, below the sequence low for shorts.
CISD — A close through the three-bar structural extreme: above the highest high of the previous three bars for longs, below the lowest low of the previous three bars for shorts.
IFVG — A displacement gap in the direction of the bias. For longs, the current bar's low prints above the high from two bars back; for shorts, the current bar's high prints below the low from two bars back.
All confirmations are evaluated on confirmed bar closes, so signals do not appear and disappear intrabar.
4. STOP PLACEMENT
When a signal fires, the stop reference is the most recent confirmed swing pivot that formed at or after the sweep bar — a pivot low for longs, a pivot high for shorts. Pivot strictness is set by the left and right bar inputs.
Because a confirmed pivot requires a fixed number of bars on both sides, fast setups can trigger before one exists. In that case the script falls back to the lowest low or highest high over a configurable lookback. A tick buffer is then applied beyond whichever reference was used.
5. PROJECTION
Three objects are drawn forward from the confirmation bar for a set number of bars:
- Entry level — a horizontal line at the confirmation close, labeled with which confirmation produced it.
- Stop zone — a shaded area between the entry and the calculated stop.
- Target zone — a shaded area between the entry and the opposite side of the range. A long that came from a low sweep targets the range high; a short that came from a high sweep targets the range low.
The target zone is a reference for the measured objective of the setup, not a projection of where price will go.
---
SETTINGS
SESSIONS
- Show London range / Show New York range — enable each window independently.
- Range time — the time window for each range.
- Range label — text shown in the center of each finished box.
- Session timezone — IANA timezone used to interpret both windows.
- Projection bars — how far entry, stop, and target objects extend.
- Extended range line bars — how far the dotted or dashed boundary lines extend past the window.
SWEEP AND CONFIRMATION
- Confirmation mode — 3 Candle Reversal, IFVG, CISD, or Any Confirmation.
- Sweep must reclaim range — require a close back inside the range for a valid sweep.
- Pivot left bars / Pivot right bars — swing strictness for stop placement.
- Stop fallback lookback — used when no confirmed pivot exists between sweep and entry.
- Stop buffer ticks — additional distance beyond the stop reference.
VISUALS
- Entry markers with independent long and short colors and five size options.
- Toggles for target and stop zones, range labels, entry level, and entry type text.
- Label vertical offset and label size.
STYLE
- Colors for range fill, range border, target zone, stop zone, and entry level.
- Extended line style: dotted or dashed.
---
HOW TO USE IT
Set both windows to the time blocks you actually trade and confirm the session timezone matches how you think about those times. The defaults are New York time, so a window entered as 01:12–02:12 is 01:12 New York regardless of where your chart is set.
Intraday timeframes are required, and the timeframe should divide cleanly into the window length so the range is built from a sensible number of bars. A 60-minute window on a 1, 3, 5, or 15 minute chart works; the same window on a 4-hour chart does not.
Start with a single confirmation mode rather than Any Confirmation. The three models have different characteristics: 3 Candle Reversal is the slowest and requires a developed base, CISD is the most immediate, and IFVG requires visible displacement. Any Confirmation takes whichever fires first, which will usually be the fastest of the three.
Tune the pivot inputs to your timeframe. Wider pivot settings produce more meaningful swing stops but increase how often the fallback lookback is used instead.
---
ALERTS
Five alert conditions are available:
- London range confirmation long
- London range confirmation short
- New York range confirmation long
- New York range confirmation short
- Any range confirmation signal
Each fires on the close of the confirmation bar and includes ticker and interval placeholders.
---
NOTES AND LIMITATIONS
- One signal maximum per range per day. Once a range has produced a confirmation, it stops evaluating until the next session.
- Range boxes and boundary lines update live while a window is open. Signals, zones, and entry levels are drawn on confirmed closes only.
- Drawing objects are capped at 500 boxes, lines, and labels. On very long chart histories the oldest objects will be removed by TradingView automatically.
- Sessions are evaluated with the chart's own bars, so illiquid symbols with gaps inside a window may produce ranges built from very few bars.
- Stop and target areas are geometric references derived from the range and recent structure. They are not orders, not backtested results, and carry no assumption about outcome.
---
ORIGINALITY
This is an original implementation written from scratch in Pine Script v6. The individual concepts it draws on — session ranges, liquidity sweeps, change in state of delivery, and inverse fair value gaps — are widely discussed public trading concepts, and no claim of ownership is made over them. What this script contributes is the specific pipeline that links them: an arbitrary time-defined range, an optional reclaim-filtered first sweep, a selectable confirmation stage, a pivot-based stop with a lookback fallback, and a target anchored to the opposite range boundary — all handled per-session with independent state for two windows.
---
DISCLAIMER
This indicator is provided for educational and informational purposes. It does not produce financial advice, and nothing it draws should be treated as a recommendation to buy or sell. Signals are historical observations of price behavior and do not predict future movement. Test any tool thoroughly on your own instruments and timeframes before risking capital, and manage your own risk.
インジケーター

Red & Blue No Gap CandlesHey Y'all,
I made The Red & Blue No Gap Candles indicator, to help other traders that prefer Red & Blue No Gap Candles, to get their chart set up much faster.
I was inspired by the Original No Gap Candles, by Echepata, but I just wanted to make it a little easier for my Brother & Niece to get their chart set-up much faster with a few less steps.
I currently use the Red & Blue No Gap Candles everyday, to primarily trade Forex & Futures Currency markets, but the Red & Blue No Gap Candles works perfect on most charts like Bitcoin, Gold, NQ & many more.
I prefer using the Red & Blue No Gap Candles, because it's perfectly aligned with the previous candles's Open & Close, which is perfect & based on how most are taught in examples.
How To Use The Red & Blue No Gap Candles Indicator?
#1 - Right click any empty blank space on the Candlestick chart, then click Chart Settings.
#2 - Under Symbol Section, Un-check all the boxes, like "Color Bars Based On Previous Close, Body, Borders & Wick." - Then click "ok" to save.
#3 - Click Indicators button, then search for Red & Blue No Gap Candles, then click the star to save it under favorites, to make it easier for you to find it, then add it to your chart.
#4 - Enjoy using the Red & Blue No Gap Candles, to hopefully, make your trading experience a little bit easier.
Thanks! インジケーター

High Time Frame Candle OverlayOverlay higher-timeframe (HTF) candles on the same pane as the chart. Each HTF candle spans the lower-timeframe bars that belong to that period, using the same OHLC aggregation as a normal HTF candle: open of the first bar, high/low of the range, close of the last bar (updates while the HTF bar is still forming).
This is a visual overlay only . It does not generate buy or sell signals and is not a trading system.
Why use it
Read the higher-timeframe candle (body, wick, close relative to open) without leaving the working timeframe. Example: on a 15-minute chart, each 1-hour candle covers the four 15-minute bars that form that hour.
Auto HTF (on by default)
The overlay timeframe follows the chart:
1m → 5m
5m → 15m
15m → 1h
1h → 4h
4h → 1D
1D → 1W
1W → 1M
Turn Auto HTF from chart off to pick 1m, 5m, 15m, 1h, 4h, 1D, 1W, or 1M manually. The overlay must be higher than the chart timeframe.
Alignment
Period edges follow TradingView session/clock for that timeframe (same boundaries as the built-in HTF chart), not “every N bars from bar 0”.
The right edge stops on the last chart bar of the HTF period (its close) , not on the next HTF open. Example: 4h chart + 1D overlay — the daily candle runs from the 08:00 open through the 04:00–08:00 bar close, not through the next day’s 08:00 open.
X uses bar index (stays glued when you pan or the chart auto-fits). Y is price.
Candle styles
One candle — one body and a center wick (default).
Four sections — the same HTF OHLC split into four columns, with a wick band in each column so the wick is easier to see against the chart’s own wicks.
Colors and look
Same layout as TradingView candle style: Body, Border, and Wick, each with bull and bear colors (close ≥ open = bull). Color pickers include their own transparency. A separate Transparency input (0–100) sets body fill so the chart candles stay visible underneath.
Also adjustable: wick width, body border width, and how many HTF candles to keep (platform max 500 drawings; Four sections uses more drawings per candle, so the script caps that style at 62).
How to use
Add the script to a standard candlestick chart (not Heikin Ashi, Renko, or other non-standard types if you need real OHLC).
Leave Auto HTF on, or turn it off and choose Overlay timeframe.
Raise Transparency if the overlay hides the chart candles; lower it if the HTF body is too faint.
Switch to Four sections if the center wick is hard to read.
Notes
The first HTF candle at the left of loaded history may be a partial period if the first bar is not an HTF boundary.
Missing chart bars can make the overlay open differ slightly from the exchange HTF print.
Doji (open = close) uses bull colors, same as TradingView candles.
インジケーター

インジケーター

インジケーター
