[SkuldX] Market Structure BOS & CHoCHSkuldX Market Structure — BOS & CHoCH
by SkuldX Trading Systems
What is it?
SkuldX Market Structure automatically maps the structural flow of price action by detecting Break of Structure and Change of Character events in real time. Instead of manually identifying swing highs and lows and drawing trend lines, the indicator does it for you — classifying every significant price move as either a trend continuation or a reversal signal, and labeling the market's structural state at every step.
Core concepts
Market structure is the sequence of swing highs and swing lows that defines whether price is trending up, trending down, or transitioning between the two. Reading structure correctly is the foundation of ICT, Smart Money, and most institutional trading methodologies.
HH / HL / LH / LL — the four structural labels that appear at every confirmed swing point:
HH Higher High — price makes a new high above the previous swing high. Bullish continuation.
HL Higher Low — price makes a higher low before pushing up again. Confirms bullish structure.
LH Lower High — price fails to reach the previous high. First sign of bearish pressure.
LL Lower Low — price breaks below the previous swing low. Bearish continuation.
BOS — Break of Structure
A BOS confirms that the existing trend is continuing. It fires when price breaks through the most recent swing extreme in the direction of the current trend.
BOS ▲ — price closes above the last swing high in an already bullish market. Institutions are adding to longs. The trend is intact and likely to continue.
BOS ▼ — price closes below the last swing low in an already bearish market. Sellers remain in control. The trend is intact.
BOS signals are ideal for trend-following entries — entering after a confirmed pullback when the BOS confirms trend resumption.
CHoCH — Change of Character
A CHoCH signals a potential trend reversal. It fires when price breaks through the swing extreme in the opposite direction of the current trend — the first structural evidence that the dominant side is losing control.
CHoCH ▲ — price breaks above a swing high while the market was in a bearish structure. Buyers have stepped in with enough force to break the bearish sequence. A new bullish trend may be beginning.
CHoCH ▼ — price breaks below a swing low while the market was in a bullish structure. Sellers have overwhelmed the existing uptrend. A new bearish trend may be starting.
CHoCH is not a guarantee of reversal — it is the first structural signal that conditions are changing. It becomes high probability when combined with additional confluence such as a key S&R level, an SFP, or an OI signal.
Two detection modes
Close mode — signals fire as soon as price closes beyond the structural level. Faster, more responsive, better for intraday trading on 15m and lower. May produce slightly more signals.
Pivot mode — signals fire only when a confirmed pivot point (N bars on each side) breaks the previous pivot extreme. Slower but structurally cleaner. Better for higher timeframes where false breaks are filtered naturally by requiring full confirmation.
Both modes can be used simultaneously on different chart instances for a multi-perspective view.
What you see on the chart
HH / HL / LH / LL labels — appear at every confirmed pivot point showing whether each swing is making higher or lower extremes. Reading the sequence of these labels from left to right tells the full structural story of price action.
BOS / CHoCH labels — appear at the bar where the structural break occurs. Color-coded by direction and type — green for bullish BOS, red for bearish BOS, aqua for bullish CHoCH, orange for bearish CHoCH.
Dashed line — extends from the broken structural level to the right, marking the exact price that was breached. This level often acts as support or resistance on subsequent retests.
Zone box — shaded area between the broken level and the current close. Shows the range of the structural break — wider boxes indicate more decisive moves, tighter boxes indicate marginal breaks that deserve extra scrutiny.
Structure background — a very subtle background tint showing the current structural state across the chart. Green tint for bullish structure, red tint for bearish. Immediately visible even when zoomed out.
Settings reference
Pivot Lookback — how many bars on each side a swing point must be the extreme to qualify as a pivot. Default 5. Lower values find more frequent swings, higher values require more significant structure. On 15m charts, 5 bars covers approximately 1.25 hours.
Detection Mode — Close for faster signals, Pivot for confirmed structure only
Show BOS — toggle Break of Structure signals
Bullish / Bearish BOS Color — independent color control
Show CHoCH — toggle Change of Character signals
Bullish / Bearish CHoCH Color — independent color control
Show Zone Box — toggle the shaded zone between level and close
Show Labels — toggle BOS/CHoCH text labels
Show HH/HL/LH/LL — toggle structural pivot labels
Show Structure Background — toggle the subtle trend tint
Box Transparency — opacity of the zone fill
Line Width — thickness of the broken level line
Label Size — tiny, small, or normal
Zone Extend — how many bars right the zone and line extend
How to use it in practice
Reading the sequence — scan the HH/HL/LH/LL labels from left to right before looking at any signals. A clear sequence of HH → HL → HH → HL tells you the market is in a clean bullish structure. Any interruption of that sequence is a warning.
BOS as entry confirmation — after a pullback in a trending market, wait for a BOS in the direction of the trend. This confirms the pullback is over and the original direction is resuming. Enter at the close of the BOS candle with a stop below the previous HL for longs.
CHoCH as reversal alert — when a CHoCH appears, switch your bias. Do not immediately enter against the trend — wait for the new structure to develop. Ideally wait for the first BOS in the new direction after the CHoCH to confirm the reversal is gaining momentum.
Combining BOS and CHoCH — the most powerful setups occur when a CHoCH is followed by a BOS in the same new direction. CHoCH establishes the reversal intent. The subsequent BOS confirms it. Enter on the BOS, stop below the CHoCH swing low for longs.
Timeframe selection — on 15m and 1h the indicator works well for intraday structure. On 4h and daily it maps the larger swing structure that defines the week's directional bias. Running both simultaneously — 4h for bias, 15m for entry — is a common and effective approach.
Part of the SkuldX Suite
SkuldX Market Structure integrates naturally with the full SkuldX indicator suite:
A bullish CHoCH that coincides with a bullish SFP at a key S&R level from SkuldX SFP + Auto S&R is one of the strongest reversal confluences available — structure is changing and institutional players have swept liquidity at the same time
A BOS that fires while price is between the VAL and POC zone confirms trend resumption from a high-value area
A bearish CHoCH during the London+NY Overlap session with Bearish Trend OI Delta from SkuldX OI Delta signals institutional repositioning with full structural and flow confirmation
The Structure Background tint aligns with the London Bias logic in SkuldX session strategies — bullish structure during London session = continuation long bias, bearish structure = short bias
インジケーター

Gaussian Filter Trend [QuantAlgo]🟢 Overview
The Gaussian Filter Trend passes price through a multi-pole Gaussian filter and holds the result inside an adaptive volatility deadband, producing a stepped trend path that advances only once a move has cleared the band. That band is sized by an Efficiency Ratio, tightening when price travels directionally and widening through chop, so the line tracks sustained moves and sits still through noise. Around that path, a star field orbits at two volatility-scaled radii that fade with distance, echoing the decay of the filter's own weighting and making the current trend distinctly recognizable at a glance on any instrument or timeframe.
🟢 How It Works
The indicator's core methodology combines two mechanisms: a cascaded Gaussian filter that smooths the source series, and an efficiency-driven deadband that governs when that smoothed value is permitted to move the trend line.
First, the selected source is passed through one to four cascaded single-pole stages. A beta term derived from the filter length and the pole count sets the smoothing coefficient. Because pole count enters that calculation directly, adding poles rescales the filter response rather than layering more averaging onto the same curve:
beta = (1 - math.cos(2 * math.pi / length)) / (math.pow(1.414, 2.0 / poleCount) - 1)
alpha = -beta + math.sqrt(beta * beta + 2 * beta)
Next, efficiency is measured by comparing net directional movement against the total distance traveled over the efficiency window. The ratio moves toward one when travel is more directional and toward zero when price covers ground without net progress. It is then smoothed, so the deadband width is less likely to shift sharply from one bar to the next:
efficiency_ratio = path_length == 0 ? 0.0 : net_move / path_length
smoothed_efficiency = ta.ema(efficiency_ratio, efficiency_smooth)
The smoothed reading blends between a wider chop multiplier and a tighter trend multiplier, and that result scales Average True Range into the deadband width. Higher readings pull the envelope in, so the line can follow a move more closely. Lower readings push it out, which is intended to reduce flips in conditions where they are more likely. Disabling Adaptive Width bypasses the blend and applies a single fixed multiplier:
width_multiplier = adaptive_width ? chop_multiplier + (trend_multiplier - chop_multiplier) * smoothed_efficiency : fixed_multiplier
trend_width = ta.atr(atr_length) * width_multiplier
Finally, the trend line carries its previous value forward and steps only when the envelope has moved past it. It drops when the upper band falls below the current level and rises when the lower band climbs above it, producing a stepped path rather than a continuous curve:
if upper_band < trend_line
trend_line := upper_band
if lower_band > trend_line
trend_line := lower_band
A persistent direction state records the last step and carries it through flat segments, so the line color, star field, bar coloring and alerts all read from the same value rather than diverging while the line is stationary. The star field orbits that path at a distance scaled to recent average bar range, spreading as ranges expand and drawing in as they compress, so the trend and the volatility it is being measured against are visible in one read.
🟢 Signal Interpretation
▶ Bullish Trend (Long/Buy): When the lower band climbs above the trend line, the line steps higher and the indicator enters bullish state. The trend line and star field switch to the bullish color. This condition identifies potential long or buy opportunities and remains active until the upper band falls below the line and confirms a bearish step.
▶ Bearish Trend (Short/Sell): When the upper band falls below the trend line, the line steps lower and the indicator enters bearish state. The visual elements switch to the bearish color. This condition identifies potential short or sell opportunities and holds until the lower band climbs above the line and confirms a bullish step.
▶ Flat Path (Hold): When price stays inside the deadband, neither band displaces the line and it holds level. Color does not change, so the prior state is carried rather than reconfirmed. Extended flat runs indicate the efficiency reading has widened the band against choppier conditions, and the state resolves only when one side of the envelope clears the line.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover a range of trading styles and timeframes. "Default" uses four poles over a fourteen bar window for a balanced configuration aimed at swing trading on 1-hour and daily charts. "Fast Response" shortens the filter length and drops to two poles for a tighter path on 5-minute to 1-hour charts, which may suit intraday work at the cost of more frequent steps in choppier conditions. "Smooth Trend" lengthens the filter and widens the chop multiplier for a steadier baseline on daily and weekly charts, aimed at position trading. Selecting any preset other than Default overrides every Gaussian Filter and Trend Width input beneath it.
▶ Built-in Alerts: Three alert conditions support automated monitoring of trend transitions. "Bullish Trend Signal" fires on the bar the direction state flips to bullish. "Bearish Trend Signal" fires on the bar it flips to bearish. "Any Trend Change" triggers on either transition for traders who want a single unified alert regardless of direction. All alerts include the exchange, ticker, and timeframe in the message for immediate context.
▶ Visual Customization: Six color presets, Custom, Classic, Aqua, Cosmic, Cyber, and Neon, provide coordinated bullish and bearish color pairings suited to different chart themes and personal preferences. Selecting Custom exposes independent color pickers for both states, alongside an adjustable neutral color used during the initial warmup before the first directional step. Line width is configurable from one for a minimal look up to eight for a heavier path, and the star field toggles separately from the line so either element can be displayed on its own. Optional bar coloring and background shading tint the candles and chart field with the active trend color at configurable transparency levels, reflecting the current state without reading the line directly.
インジケーター

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.
インジケーター

Dual TEWMA Ribbon - [JTCAPITAL]' Dual TEWMA Ribbon - ' is a modified way to use multiple Triple Exponential Moving Average calculations, Weighted Moving Average smoothing, proportional length scaling, and multi-timeframe-style trend confirmation for Trend-Following.
Instead of relying on a single Moving Average, this indicator calculates six separate TEWMA-based trend lines . Each line operates at a progressively longer calculation length, allowing the ribbon to represent different levels of market responsiveness. The shorter calculations react more quickly to changes in price, while the longer calculations respond more slowly and can help represent the broader underlying trend.
The core idea behind the indicator is that a trend can be evaluated across multiple smoothing speeds at the same time. When the faster and slower TEWMA calculations begin pointing in the same direction, the ribbon can provide a broader view of directional momentum. When the individual lines disagree, this can visually represent a market where shorter-term and longer-term trend calculations are not aligned.
The indicator also calculates an overall score based on the directional state of all six TEWMA lines. This score is then used to determine the script's overall bullish or bearish signal state. BUY and SELL labels are only plotted when the overall state transitions from bearish to bullish or from bullish to bearish according to the specific thresholds defined in the code.
The indicator works by calculating in the following steps:
Selecting the Price Source
The first step is selecting the price source used for all calculations. The default source is the closing price, but TradingView allows the source to be changed to other available price series.
Every subsequent calculation in the indicator begins with this selected source. This means that changing the source changes the underlying data used by all six TEWMA calculations.
Defining the Base Length and Multiplier
The script uses two primary parameters:
-The base length, which defaults to 36.
-The multiplier, which defaults to 1.4.
The multiplier is applied to the base length to create a second adjusted calculation length.
The first adjusted length is calculated as:
Adjusted Length = Base Length × Multiplier
The result is rounded to the nearest whole number because Moving Average lengths must be used as integer values.
With the default settings:
36 × 1.4 = 50.4
After rounding, the second length becomes approximately 50.
Creating Progressively Longer Ribbon Lengths
The script does not only use the original base length. It progressively scales the base length from one times the base value to six times the base value.
The six primary lengths are:
-1 × Base Length
-2 × Base Length
-3 × Base Length
-4 × Base Length
-5 × Base Length
-6 × Base Length
Each of these lengths is then multiplied by the selected multiplier to create a corresponding second calculation length.
This creates six pairs of Moving Average calculations.
The first pair represents the fastest portion of the ribbon, while the sixth pair represents the slowest portion.
Weighted Moving Average Smoothing
For every individual calculation length, the selected source is first processed using a Weighted Moving Average, or WMA.
The WMA gives greater weight to more recent price data and less weight to older observations.
This creates an initial layer of smoothing while still allowing newer price information to have a stronger influence on the result.
Applying the Triple Exponential Moving Average
After the WMA is calculated, the result is passed into TradingView's Triple Exponential Moving Average function.
This creates the TEWMA structure used throughout the indicator:
TEWMA = TEMA(WMA(Source, Length), Length)
The same length is used for both the initial WMA and the following TEMA calculation.
Each individual TEWMA therefore applies two stages of smoothing:
-First, the source is smoothed with a WMA.
-Second, the WMA output is processed through a TEMA.
The combination is designed to create a smoothed trend-following calculation while using TEMA as the final smoothing stage.
Calculating Two TEWMAs for Each Ribbon Level
Each of the six ribbon levels contains two separate TEWMA calculations.
The first uses the primary length.
The second uses the same primary length multiplied by the selected multiplier.
For example, the first ribbon level calculates:
-TEWMA using the base length.
-TEWMA using the base length multiplied by the multiplier.
These two TEWMA values are then averaged together.
The calculation is:
Final TEWMA = Average(TEWMA Primary Length, TEWMA Adjusted Length)
This same process is repeated for all six progressively longer ribbon levels.
Creating the Six Final Ribbon Lines
After the paired calculations are averaged, the indicator produces six final TEWMA lines.
These lines represent increasingly slower trend calculations.
The first line uses the shortest pair of lengths and is therefore the most responsive.
The following lines use progressively longer lengths:
-Ribbon 1: Base Length and Base Length × Multiplier
-Ribbon 2: Base Length × 2 and Adjusted Length × 2
-Ribbon 3: Base Length × 3 and Adjusted Length × 3
-Ribbon 4: Base Length × 4 and Adjusted Length × 4
-Ribbon 5: Base Length × 5 and Adjusted Length × 5
-Ribbon 6: Base Length × 6 and Adjusted Length × 6
Because the lengths become progressively larger, the ribbon contains calculations that can respond to both relatively recent price movement and more slowly developing directional movement.
Measuring the Direction of Every TEWMA
The trend direction of each ribbon line is determined by comparing its current value with its value one bar earlier.
A line is considered bullish when:
Current TEWMA > Previous TEWMA
A line is considered bearish when:
Current TEWMA < Previous TEWMA
This means the script is not using the position of price above or below the TEWMA to determine the trend direction.
Instead, it specifically evaluates the slope of the TEWMA itself .
If the TEWMA is rising, the corresponding signal is bullish.
If the TEWMA is falling, the corresponding signal is bearish.
Assigning a Persistent Directional State
Each of the six ribbon lines receives its own persistent signal variable.
When a TEWMA is rising, its signal is assigned a value of 1.
When a TEWMA is falling, its signal is assigned a value of -1.
These values are stored using Pine Script's var functionality.
The persistent signal state is used to control both the visual color of the ribbon and the overall directional score.
Coloring the Ribbon According to Direction
Every ribbon line changes color depending on whether its corresponding TEWMA is currently rising or falling.
A rising TEWMA is assigned the bullish blue color.
A falling TEWMA is assigned the bearish purple color.
The transparency differs between the ribbon levels.
The outer portions of the ribbon are displayed with greater transparency, while the central lines are displayed with less or no transparency.
This creates a visual ribbon structure in which the middle calculations are more prominent and the surrounding calculations create a layered trend display.
Creating the Ribbon Fill
Each TEWMA line is also paired with a hidden secondary plot.
The hidden plot is calculated as:
TEWMA × 0.9
The area between the TEWMA and this lower hidden plot is then filled using the color assigned to that particular TEWMA.
The lower fill is fully transparent, which causes the visual emphasis to remain closer to the main TEWMA line.
This calculation is repeated individually for all six ribbon levels.
Calculating the Overall Trend Score
After all six directional states have been determined, the indicator calculates an overall score.
Every bullish ribbon signal contributes:
+1
Every bearish ribbon signal contributes:
-1
Since there are six TEWMA lines, the total score can range from:
+6
when all six lines are bullish, to:
-6
when all six lines are bearish.
This creates a simple directional consensus measurement across the complete TEWMA ribbon.
Defining the Overall Bullish State
The overall signal is set to bullish when the score is greater than 3.
Because each bullish line contributes +1 and each bearish line contributes -1, a score above 3 requires a strong bullish majority.
The possible bullish scores that satisfy this condition are:
+4, +5, and +6.
This means that at least five of the six ribbon calculations must be bullish before the script assigns the overall bullish state.
Defining the Overall Bearish State
The overall signal is set to bearish when the score is less than -5.
The only possible score satisfying this condition is -6.
Therefore, all six TEWMA lines must be bearish before the script assigns the overall bearish state.
This creates an asymmetric signal structure.
The bullish state requires a strong bullish majority, while the bearish state requires complete bearish agreement across all six ribbon calculations.
Generating BUY Labels
A BUY label is plotted when the overall signal becomes bullish while the previous overall signal was bearish.
The exact transition condition is:
Current Signal > 0 AND Previous Signal < 0
This means a BUY label is not continuously plotted while the bullish state remains active.
It is only plotted at the moment the stored overall signal transitions directly from bearish to bullish.
Generating SELL Labels
A SELL label is plotted when the overall signal becomes bearish while the previous overall signal was bullish.
The exact transition condition is:
Current Signal < 0 AND Previous Signal > 0
Like the BUY condition, this prevents continuous label generation while the bearish state remains active.
The SELL label is only created when the overall directional state transitions directly from bullish to bearish.
Buy and Sell Conditions:
The indicator uses the directional slope of six individual TEWMA calculations to determine its overall trend state.
Bullish Direction
Each TEWMA line is considered bullish when its current value is higher than its value on the previous bar.
Every bullish line contributes +1 to the overall score.
The script assigns a bullish overall signal when:
Score > 3
Because the score can only move in whole-number increments, this means the score must be +4, +5, or +6.
In practical terms, at least five of the six TEWMA calculations must be rising before the bullish overall state is assigned.
A BUY label is only plotted when this bullish state is reached directly after the previous stored overall state was bearish.
Bearish Direction
Each TEWMA line is considered bearish when its current value is lower than its value on the previous bar.
Every bearish line contributes -1 to the overall score.
The script assigns a bearish overall signal when:
Score < -5
Since the minimum possible score is -6, all six TEWMA calculations must be falling simultaneously for the bearish overall state to be assigned.
A SELL label is only plotted when this bearish state is reached directly after the previous stored overall state was bullish.
Signal Persistence
The overall signal uses a persistent variable.
The script explicitly changes the overall signal to bullish when the bullish threshold is met and changes it to bearish when the bearish threshold is met.
When the score falls between these thresholds, the script does not assign a new neutral value.
As a result, the previously assigned overall state remains stored until one of the opposite threshold conditions is met.
This means the indicator can continue displaying its previously established overall direction during periods where the six TEWMA calculations are mixed and neither threshold is currently satisfied.
Features and Parameters:
* Source - Selects the price source used for every WMA and TEWMA calculation. The default setting is Close.
* Length - Defines the base calculation period used to construct the fastest TEWMA pair and acts as the foundation for all progressively longer ribbon calculations.
* Multiplier - Multiplies every primary calculation length to create the second TEWMA in each pair. The default value is 1.4.
* Six TEWMA Ribbon Levels - The indicator calculates six progressively slower trend lines using multiples of the base length from 1× through 6×.
* Dual-Length Averaging - Every ribbon level averages two separate TEWMAs: one based on the primary length and one based on the multiplier-adjusted length.
* WMA Pre-Smoothing - Every TEWMA begins by applying a Weighted Moving Average to the selected source.
* TEMA Processing - The WMA output is subsequently processed using a Triple Exponential Moving Average.
* Slope-Based Trend Detection - Trend direction is determined by whether each final TEWMA is rising or falling compared with the previous bar.
* Individual Ribbon Direction - Each of the six TEWMA lines independently receives a bullish value of +1 or bearish value of -1.
* Consensus Score - The directional values of all six TEWMA lines are added together to create a score ranging from -6 to +6.
* Bullish Threshold - The overall bullish state is activated when the score is greater than +3.
* Bearish Threshold - The overall bearish state is activated when the score is less than -5.
* Persistent Overall Signal - The most recent bullish or bearish overall state remains active until the opposite threshold condition is explicitly met.
* BUY Labels - A BUY label is plotted when the persistent overall signal transitions from bearish to bullish.
* SELL Labels - A SELL label is plotted when the persistent overall signal transitions from bullish to bearish.
* Dynamic Ribbon Colors - Every TEWMA line changes between bullish blue and bearish purple according to its individual directional state.
* Layered Transparency - Different ribbon levels use different transparency values to create a layered visual structure.
* Ribbon Fill - Each TEWMA line is paired with a hidden plot at 90% of its value, creating a filled area beneath the line.
Specifications:
Weighted Moving Average (WMA)
The Weighted Moving Average is the first smoothing calculation applied to the selected source.
Unlike a Simple Moving Average, where every value inside the lookback period receives equal weight, a WMA assigns progressively greater importance to more recent data.
This means recent price movement has a larger influence on the resulting average than older observations.
Within this indicator, the WMA acts as the first smoothing layer before the data is passed into the TEMA calculation.
Using a WMA before the TEMA means that the Triple Exponential Moving Average is not applied directly to raw price data. Instead, it processes an already smoothed representation of the selected source.
Triple Exponential Moving Average (TEMA)
The Triple Exponential Moving Average is the second major smoothing component used by the indicator.
TEMA is designed as a Moving Average calculation that uses multiple Exponential Moving Average stages and combines them to reduce the lag commonly associated with traditional smoothing methods.
In this script, the TEMA is applied directly to the output of the Weighted Moving Average.
The resulting structure can therefore be represented as:
Source → WMA → TEMA
This creates the TEWMA calculation used throughout the ribbon.
The benefit of combining these two stages is that the initial WMA gives more importance to recent price movement, while the subsequent TEMA provides the final trend-following calculation.
TEWMA Structure
The core calculation of the indicator is:
TEMA(WMA(Source, Length), Length)
The same calculation length is used for both the WMA and TEMA stages.
This process is repeated multiple times using different lengths.
Rather than using only one TEWMA, the indicator creates twelve individual TEWMA calculations in total: two for every one of the six ribbon levels.
Those pairs are subsequently averaged to produce the six displayed TEWMA lines.
Base Length
The base length is the fundamental period from which the entire ribbon structure is built.
The first ribbon level uses the base length directly.
The remaining ribbon levels use multiples of the base length.
The progression is:
Length
Length × 2
Length × 3
Length × 4
Length × 5
Length × 6
Changing the base length therefore changes the responsiveness of the complete ribbon rather than only changing one individual Moving Average.
A shorter base length causes all six ribbon calculations to use shorter periods, while a longer base length increases the smoothing periods throughout the entire structure.
Length Multiplier
The multiplier creates a second calculation length for every ribbon level.
For each primary length, the script calculates:
Primary Length × Multiplier
The result is rounded to the nearest whole number.
This produces a second TEWMA calculation that operates at a proportionally adjusted smoothing speed.
The two TEWMA calculations are then averaged.
Because the multiplier is applied to every primary ribbon length, it affects the complete ribbon consistently.
For example, with a multiplier above 1, the second TEWMA in every pair uses a longer period than the first.
Progressive Length Scaling
The six ribbon levels are constructed using progressively larger multiples of the base length.
This creates a spectrum of trend calculations ranging from relatively responsive to progressively slower.
The shorter TEWMA calculations can react earlier to changes in price direction.
The longer calculations require movement to influence a larger smoothing window and therefore represent a slower directional calculation.
Combining multiple calculation lengths allows the script to evaluate whether directional movement is limited to the faster part of the ribbon or whether it is also present across the slower calculations.
Dual TEWMA Averaging
Each displayed ribbon line is created by averaging two separate TEWMAs.
The calculation is:
Final Ribbon Line = (TEWMA Primary + TEWMA Adjusted) ÷ 2
The primary TEWMA uses the standard length for that ribbon level.
The adjusted TEWMA uses that length multiplied by the selected multiplier.
Averaging the two calculations creates a single line positioned between the two underlying TEWMA values.
This also means that each ribbon level is not dependent on only one specific calculation period.
Instead, it incorporates two proportionally related smoothing periods.
The Six Ribbon Calculations
The script creates six final averaged TEWMA calculations.
The first is based on the base length and multiplier-adjusted base length.
The second is based on twice the base length and its multiplier-adjusted equivalent.
This pattern continues until the sixth calculation, which uses six times the base length and six times the multiplier-adjusted length.
As a result, the indicator evaluates directional movement across six progressively slower trend calculations.
Slope-Based Trend Direction
The indicator determines the direction of each TEWMA by comparing the current value with the previous value.
The bullish condition is:
Current Value > Previous Value
The bearish condition is:
Current Value < Previous Value
This makes the directional logic slope-based.
The indicator does not require price to cross a TEWMA in order for that TEWMA to become bullish or bearish.
Instead, the TEWMA itself must change direction.
This approach focuses on whether the underlying smoothed calculation is rising or falling.
Individual Signal Values
Every one of the six ribbon levels receives a directional value.
A rising line receives:
+1
A falling line receives:
-1
These values are stored individually and later combined into the overall score.
The use of individual directional values makes it possible to measure the degree of agreement across the entire ribbon.
Multi-Line Consensus
The overall score is created by adding together the directional values of all six ribbon lines.
If all six are rising:
+1 + +1 + +1 + +1 + +1 + +1 = +6
If all six are falling:
-1 + -1 + -1 + -1 + -1 + -1 = -6
Mixed directional conditions produce values between these two extremes.
This creates a simple consensus measurement showing whether bullish or bearish directional movement dominates across the ribbon.
Bullish Consensus Threshold
The bullish overall state requires:
Score > 3
Since each line contributes either +1 or -1, the script requires at least five bullish lines.
A score of +4 represents five rising lines and one falling line.
A score of +6 represents complete bullish agreement.
This threshold allows one of the six calculations to remain bearish while the overall bullish state can still be activated.
Bearish Consensus Threshold
The bearish overall state requires:
Score < -5
The only possible score below -5 is -6.
Therefore, every TEWMA line must be falling.
This means the bearish threshold requires complete agreement across the full ribbon.
The bullish and bearish thresholds are intentionally not symmetrical in the code.
The script therefore applies different consensus requirements to establish bullish and bearish states.
Persistent Signal Logic
The overall signal variable is declared using var .
This allows the value to persist from one bar to the next.
The signal changes to +1 when the bullish threshold is satisfied.
It changes to -1 when the bearish threshold is satisfied.
When neither threshold is satisfied, the script does not reset the signal to zero.
Instead, the previously assigned value remains active.
This means that mixed ribbon conditions do not automatically remove the existing bullish or bearish overall state.
A new opposite state must satisfy its own threshold before the stored signal changes.
BUY Signal Transition
The BUY label requires two conditions simultaneously:
-The current persistent signal must be bullish.
-The previous persistent signal must have been bearish.
The label is therefore event-based.
It marks the transition rather than continuously marking every bar during an existing bullish state.
The BUY label is placed above the corresponding candle using the script's defined label settings.
SELL Signal Transition
The SELL label also requires a transition.
The current persistent signal must be bearish while the previous persistent signal was bullish.
The label is therefore only created when the stored directional state switches directly from bullish to bearish.
The SELL label is placed below the corresponding candle according to the label settings used in the script.
Bullish and Bearish Colors
The indicator defines a blue color for bullish conditions and a purple color for bearish conditions.
Each individual ribbon line uses its own directional state to determine which color is displayed.
This means it is possible for different parts of the ribbon to display different colors when the faster and slower TEWMA calculations are not aligned.
The ribbon therefore visually communicates both directional agreement and directional disagreement between the different calculation lengths.
Transparency Structure
The ribbon does not apply identical transparency to every line.
The fastest and slowest outer lines use greater transparency.
The next inner lines use less transparency.
The central lines are displayed without additional transparency.
This creates a layered visual appearance in which the middle portion of the ribbon is emphasized more strongly.
The transparency does not affect the underlying calculations. It is purely a visual representation method.
Ribbon Fill Calculation
Every displayed TEWMA line is accompanied by a hidden plot calculated at:
TEWMA × 0.9
The script fills the area between the main TEWMA line and this lower hidden value.
The fill uses the directional color assigned to the TEWMA.
The lower side of the fill is fully transparent.
This creates a visual extension beneath each line while keeping the calculation itself hidden from the chart.
Combining Fast and Slow Trend Calculations
One of the central characteristics of the indicator is the combination of multiple calculation speeds.
The shorter calculations respond more quickly because they use fewer historical bars.
The longer calculations change more gradually because they incorporate longer lookback periods.
When several calculations begin rising together, the score can move toward the bullish threshold.
When all six calculations are falling, the score reaches the bearish threshold.
This structure allows the indicator to compare directional movement across different smoothing horizons without using separate chart timeframes.
Combining WMA and TEMA
The TEWMA structure combines two different smoothing stages.
The WMA emphasizes more recent observations during the initial smoothing process.
The TEMA then processes this smoothed series.
The result is used as the trend measurement for each calculation length.
Because this process is repeated across twelve separate TEWMA calculations, the final ribbon combines both multi-stage smoothing and progressive length scaling.
Combining Dual-Length Calculations
Every ribbon level combines a primary TEWMA with a multiplier-adjusted TEWMA.
Instead of selecting only one length for each level, the script averages two related calculation periods.
The multiplier maintains a proportional relationship between the two lengths.
Changing the multiplier therefore changes the distance between the primary and adjusted calculations across all six ribbon levels simultaneously.
Combining Individual Signals Into a Score
The six directional states are converted into numerical values and summed.
This converts the visual ribbon into a measurable consensus value.
A higher positive score represents greater bullish agreement.
A lower negative score represents greater bearish agreement.
The score is then used to control the persistent overall signal.
This creates a distinction between the individual direction of each TEWMA and the overall directional state used for the BUY and SELL labels.
Asymmetric Signal Requirements
The script uses different thresholds for bullish and bearish states.
The bullish threshold can be reached with five or six rising TEWMAs.
The bearish threshold can only be reached when all six TEWMAs are falling.
This asymmetry is directly defined by the conditions:
scores > 3
and:
scores < -5
Users should be aware that these exact thresholds mean bullish and bearish state changes do not require the same degree of ribbon agreement.
What the BUY and SELL Labels Represent
The BUY and SELL labels are generated from the overall persistent signal rather than from an individual Moving Average crossover.
A BUY label represents a transition from the script's stored bearish state to its stored bullish state.
A SELL label represents a transition from the stored bullish state to the stored bearish state.
The labels therefore depend on:
-The directional slope of all six averaged TEWMA lines.
-The numerical score created from those six directional states.
-The bullish and bearish thresholds defined in the script.
-The previous value of the persistent overall signal.
Important Interpretation of the Signals
The indicator is designed to visualize directional changes and agreement across multiple smoothed calculations.
The BUY and SELL labels are generated according to the exact mathematical conditions defined in the script and should be interpreted within the context of the selected source, base length, multiplier, market, and timeframe.
Different parameter values will change the lengths used by every TEWMA calculation and can therefore change the responsiveness of the complete ribbon.
The indicator does not use future price data in its calculations. Each WMA, TEMA, directional comparison, score, and label condition is calculated from the available chart data at the corresponding bar.
As with any trend-following calculation, the behavior of the indicator can differ depending on market conditions. Strong directional movement and mixed or rapidly changing price movement can produce different levels of agreement between the faster and slower components of the ribbon.
Enjoy!
インジケーター

インジケーター

Square Bar/Calendar Count Verticals (Gann)█ OVERVIEW
Square Bar/Calendar Count Verticals plots vertical time lines on the chart at squared counts measured from user-selected pivot anchors, in two independent units: trading bars and calendar days. The thesis, drawn from W.D. Gann's time-counting methods, is that elapsed time from a significant price extreme reaching a perfect square (81, 100, 121, 144, 289, 361) marks a date of elevated probability for a trend pause, inflection, or termination, and that the strongest of these dates occur where a bar-count square and a calendar-day square coincide.
█ HISTORY / BACKGROUND
Counting time in squares from major highs and lows originates with W.D. Gann, who treated time and price as interchangeable quantities and used the squares of small integers as recurring measures of trend duration. Constance Brown's published work on Gann analysis demonstrates the method in modern markets: bar counts of 9², 10², 11², and 12² projected from a swing extreme, a 17² calendar-day count from a significant low, repeats of the 144 count monitored from key pivots, and the square of 19 tracked as a separate helix cycle. This indicator implements that specific working set as a chart tool.
The conceptual basis is that these verticals are time factors only. They carry no directional information. Their value is realized when a squared count expires while price is simultaneously at a level identified by independent price-based methods.
█ HOW IT WORKS
1 — The user supplies a comma-separated list of roots (default 9,10,11,12,17,19). At the first bar the script parses the list and computes the square of each root.
2 — Each of up to three anchors is a timestamp selected on the chart. The anchor is resolved to a bar by containment: the anchor bar is the first bar whose closing time exceeds the anchor timestamp. This makes resolution independent of exchange timezone and safe when the timestamp falls on a weekend or holiday.
3 — For every anchor and every square s, the script computes two targets:
- a trading-bar target at anchor bar index + s (bar unit follows the chart timeframe), and
- a calendar-day target at anchor time + s days (independent of timeframe).
With inclusive counting enabled (default) the anchor bar or anchor day is counted as 1, so targets land at s minus 1 units after the anchor.
4 — When the root 12 is present and the repeat setting exceeds 1, additional verticals are drawn at 288, 432, and further multiples of 144, in both units, up to the chosen repeat count.
5 — On the last bar the script draws the verticals once: solid lines in bar-index coordinates for bar squares (projected up to roughly 490 bars into the future) and dashed lines in time coordinates for calendar squares (projectable to any future date). Each line carries a label naming the root, the square, and the unit. The anchor itself is marked with a heavier line and a date label.
6 — A status table reports, per active anchor, the elapsed count in both units and the next upcoming square in each unit, with the bars remaining and the calendar date.
7 — Three alert conditions fire on the bar that completes a bar-count square, the bar that contains a calendar-day square date, and the bar on which both occur together.
█ HOW TO USE
The verticals are appointments in time, not signals. The intended workflow:
- Anchor each slot on a significant swing extreme. Significance is an analytical judgment; the script deliberately performs no automatic pivot detection.
- Validate an anchor by inspecting the verticals already in the past. If historical squared counts from that anchor align with real pivots, the anchor is worth keeping. If they align with nothing, move or disable it.
- When price approaches an upcoming vertical, consult independent price analysis. A squared count expiring while price sits at a level derived from other methods is the condition of interest. A squared count expiring in open space warns at most of a pause or stall.
- The highest-weight event this tool can flag is the third alert: a bar square and a calendar square completing on the same bar.
Bar counts are timeframe-relative by design: the same anchor produces different bar-square dates on daily and weekly charts, and both are legitimate counts on their own timeframe. Calendar-day counts are identical on every timeframe. The tool is designed for daily and weekly swing analysis, where Gann's counts were applied; on intraday charts the calendar counts remain valid but bar counts become session-dependent.
Visual elements: solid vertical lines are trading-bar squares, dashed vertical lines are calendar-day squares, the heavy line with a date label is the anchor, labels above price name bar counts, labels below price name calendar counts, and the top-right table summarizes elapsed and upcoming counts.
█ SETTINGS
- Square roots: comma-separated integer roots to square. Default 9,10,11,12,17,19.
- Inclusive count: anchor bar or day counts as 1 when enabled. Default on.
- Trading-bar squares: show or hide bar-count verticals. Default on.
- Calendar-day squares: show or hide calendar-count verticals. Default on.
- 144-cycle repeats: number of 144 multiples to project; 1 disables repeats. Default 3.
- Anchor 1, 2, 3: enable flag, pivot timestamp (Anchor 1 prompts for a chart click on load), and line color per anchor. Defaults: Anchor 1 enabled, Anchors 2 and 3 disabled.
- Status table: show or hide the summary table. Default on.
- Label size: tiny, small, or normal. Default small.
█ WHAT MAKES IT ORIGINAL
Most Gann-count scripts plot a single count series in a single unit. This implementation differs in three specific ways. First, it runs trading-bar and calendar-day counts in parallel from the same anchor and explicitly detects their coincidence, which is the confluence condition emphasized in the source methodology rather than an afterthought. Second, anchor resolution uses closing-time containment instead of naive date equality, so anchors survive timezone differences, weekends, and holidays without silently shifting by one bar. Third, projection is handled correctly per unit: calendar squares are drawn in time coordinates and can therefore mark dates arbitrarily far in the future, while bar squares are drawn in bar coordinates and are projected only within the platform's future-bar range, keeping both unit systems accurate to their own definition.
█ NOTES / LIMITATIONS
- Drawings are created once per script load on the last bar. As new realtime bars form, elapsed counts in the table and newly reachable verticals refresh only when the script recalculates, for example after a settings change or chart reload.
- Bar-count verticals can be projected at most about 490 bars beyond the current bar, a platform ceiling on future bar-index coordinates. Calendar-day verticals have no such ceiling.
- The script draws up to 500 lines and 500 labels. Many roots combined with three anchors, both units, and repeats can reach this ceiling, at which point the oldest objects are removed.
- If an anchor timestamp predates the symbol's available history, the anchor resolves to the first available bar and every count measures from there, which is unlikely to be the intended pivot.
- Bar counts depend on the chart timeframe and on the symbol's session definition. Symbols with irregular sessions or many holidays will show bar squares and calendar squares diverging substantially, which is expected behavior, not an error.
- The indicator plots time factors only. It produces no directional forecast, and no claim is made about the outcome of price at any vertical. インジケーター

TURKS - Tiered Unit Risk Kernel StrategyTURKS decides how much of a long position to hold. Exposure is a graded function of where the close sits against four moving averages (20/50/100/200), so it moves in rungs rather than switching on and off. That function is monotone in price, which means it inverts: every rung has exactly one price. The panel prints those prices before they are reached — a ladder of levels at which the position gets larger or smaller, readable today.
Long-only, 0 to 1, no shorting and no leverage.
📊 THE RESULT
Twelve symbols, shipped defaults, 4-hour charts, full available history. Commission $1.50 per order, slippage 0.01xATR per side, idle cash credited nothing. b&h is buy-and-hold over the identical bars, charged nothing at all. The comparison is deliberately rigged against the strategy.
CAGR MAX DRAWDOWN CAGR / maxDD
symbol sample TURKS b&h TURKS b&h TURKS b&h
SNDK 1.3y +1406.3% +1899.0% -37.2% -56.8% 37.82 33.43
ETH 9.5y +117.3% +71.9% -54.4% -94.1% 2.16 0.76
BTC 9.5y +70.0% +54.2% -62.3% -83.9% 1.12 0.65
ARM 2.7y +62.5% +72.9% -39.8% -55.8% 1.57 1.31
TSLA 15.9y +32.7% +41.7% -57.0% -74.9% 0.57 0.56
NVDA 22.4y +25.3% +36.4% -77.0% -85.2% 0.33 0.43
AMD 21.4y +20.2% +17.3% -69.3% -96.1% 0.29 0.18
AVGO 16.8y +16.9% +39.0% -36.9% -50.3% 0.46 0.78
MU 22.4y +9.3% +19.7% -81.4% -90.9% 0.11 0.22
GOLD 13.5y +7.2% +7.7% -20.0% -35.0% 0.36 0.22
SPY 20.4y +4.4% +9.1% -40.5% -56.7% 0.11 0.16
INTC 20.4y +2.2% +8.5% -73.3% -74.2% 0.03 0.11
CAGR / maxDD is the column that settles it — return earned per unit of drawdown suffered. On that measure TURKS wins on 7 of 12. It cut maximum drawdown on 12 of 12, and beat buy-and-hold on raw return on 3.
▸ ETH — 117.3% against 71.9%, at −54.4% drawdown against −94.1%. Nearly double the return on barely half the pain.
▸ BTC — 70.0% against 54.2%, at −62.3% against −83.9%.
▸ AMD — 20.2% against 17.3%, turning a −96.1% hole into −69.3% across 21.4 years.
These are assets that spent their entire sample inside a historic bull market, measured against a benchmark paying no commission and no slippage. Halving a drawdown is ordinary. Halving it and finishing ahead is not.
BTCUSD 4h at the shipped defaults. The ladder is the green and red boxes; the envelope is the pair of curves around the mean. Bottom left is the BOOK panel reading 70.0% against 54.2% buy-and-hold at −62.3% drawdown against −83.9%, on 58.0% average exposure. Right side is the live state: what the rule targets now, where the next rung sells, where it buys back.
MU, SPY, TSLA and INTC are in that table because they were chosen to be difficult, and they behave exactly as the mechanism predicts. The rule sells strength and holds cash: it pays when a price path is violent relative to its drift, and it costs when the drift is high and the path is smooth. On a broad index it is the wrong tool — SPY 9.1% becomes 4.4%, and that number is in the table rather than left out of it.
📖 HOW TO USE IT
1 — Set your costs before you read anything. Commission ($ per order) and Typical position size ($) are the only two numbers the cost model needs; every other cost figure is a rate derived from them. A flat $1.50 is 1.9bp on an $8,000 position and 7.5bp on a $2,000 one. Leave these wrong and the panel lies to you.
2 — Pick the instrument. Single names and crypto whose drawdowns are violent relative to their drift. The table above is the guide, including the four rows that say don't.
3 — Read the ladder, not the arrows. The SELL / BUY ENGINE block prints three live numbers:
▸ Sell next above — the price at which the next rung comes off
▸ Buy back below — the price at which it goes back on
▸ Rungs sold — how much the envelope has already taken off, e.g. 12 of 20
Both prices exist now, before the move. They are not marks that appeared after one.
4 — Read the dial. The THE RULE block prints Target weight, which is what the rule says you should be holding at this instant, and Dial c / f. The POSITION block prints what you actually hold, your entry, your open return, and the round-trip cost you are currently carrying — so the gap between intention and position is always visible.
5 — Size it with c and f, not by fighting the rungs. c scales the whole position down. f is the floor you keep while the rule is off; raising it walks the book continuously toward buy-and-hold. Both tooltips print the measured frontier — the whole curve of what each step costs in return and buys in drawdown, including the region where the rule loses to simply holding less.
6 — Verify on your own symbol before trusting any of this. The BOOK panel prints Sample, CAGR against b&h, Max drawdown against b&h, CAGR/maxDD, Sharpe, Exposure and Turnover for whatever chart you are on, net of your own cost settings. Change the symbol and the whole table above regenerates for your instrument in one bar.
7 — Alerts. alert() messages ship on; JSON webhook format is a checkbox away.
🪜 HOW THE EXPOSURE IS SET
Exposure Shape picks the weighting rule. Ensemble 20/50/100/200 (graded) is the default: a slice is sold as the close drops below one more mean, bought back the same way, flat only below all four. Graded (continuous) uses one mean with an ATR ramp. Binary gate (legacy) is the original all-or-nothing rule.
Risk dial c scales the entire position down. Risk dial f is how much you keep while the rule is off. These two are the real levers, and nothing about their trade-off is hidden behind a paywall or a marketing claim — the full measured frontier is printed in the settings dialog.
Quantise Steps rounds the target to N reachable weights and requires price to clear 75% of a step before acting, so orders do not fire every bar. Ramp Width (xATR) sets how far above the mean price must travel to earn full size.
✂️ THE NADARAYA-WATSON SELL ENGINE
A trend weight cuts into weakness by construction, so it sells low: 59% of every unit the dial sells goes out below its own average cost, at 12.4 round trips a year. That is the flaw this block exists to fix. It replaces or constrains the sell side with a Gaussian kernel-regression envelope that only sells into genuine extension.
Sell Engine Mode — Dial, NWE-gated (default) keeps the dial's targets but forbids cutting while price sits below the smoother; it may still add. NWE band only turns the dial's sells off entirely. Dial + NWE (both cut) lets either one sell. Dial only leaves the envelope drawn but inert.
Sell Rungs is how much leaves on each upper-band cross: 1/N of the position. Going from 3 to 10 halved turnover, cut the share sold below basis from 16.7% to 8.9%, and pulled out-of-sample drawdown from −32.6% to −18.3%. It ships at 20, one step further along the same gradient; 10 is the last value with a formal table behind it.
Band Multiplier (3.0) and Buy-back Multiplier (2.5) set the upper and lower halfwidths in mean-absolute-deviation units. The asymmetry is the point: buying back nearer the mean than you sold restores the position before price has fully round-tripped, which is what keeps the overlay from bleeding in a chop. Bandwidth h widens and slows the smoother; it ships at 5.
🔬 HOW THIS WAS BUILT
Nine candidate signal families were tested against a matched-exposure control across 140 markets and 8,793 sessions: moving-average and momentum structure, cross-sectional relative strength, short-horizon mean reversion, volatility-of-volatility and regime transitions, drawdown state, volume, range compression, multi-timeframe agreement, and calendar seasonality. Not one was positive both in and out of sample. All nine were deleted from the codebase rather than left in as decoration.
The cleanest demonstration: take the original engine's own weight path and fire it 60 trading days late — same trades, same sizes, same turnover, same average exposure, only the dates broken. It scores better late than on time. Block-shuffling the path also beats it. A rule whose dates carry information cannot survive having them destroyed, so that engine was removed and what remains is geometry.
The stretch-proportional alternative to fixed rungs was then built and measured across 44 configurations. None beat rungs = 10. The project's pre-registered five-clause acceptance test passed all 20 graded cells — but a constant weight of 1.0 also passes three of five clauses, exactly one cell of twenty reaches p < 0.05 uncorrected (the null expectation for twenty tests), that p fails Bonferroni, and the cells are 0.985-correlated. It was reported as a failed test.
Everything left in this script survived a process designed to kill it. What remains is a sizing rule with no forecast in it: it does not predict the retest, it tells you at a price you can read now exactly what happens when one arrives.
⚙️ COSTS, AND THE SETTINGS THAT DECIDE THEM
Initial capital 150,000; commission $1.50 cash per order; no pyramiding; orders processed on bar close. Sell Engine Mode Dial, NWE-gated, Exposure Shape Ensemble 20/50/100/200 (graded), c = 1.00, f = 0.00, Quantise Steps 3, Ramp 1.0 ATR, Trend Mean 200, Cash Yield 0.00%. Envelope: bandwidth 5, multiplier 3.0, buy-back 2.5, MAE window 499, Sell Rungs 20.
TradingView's strategy() slippage is denominated in ticks, and a tick is an absolute price — one tick cannot be simultaneously correct for a $20 stock and a $1,600 one, nor for the same stock at $0.21 and at $224. It is therefore left at 0, and a proportional Slippage (xATR per side) input, shipped at 0.01, charges the cost in-script where it scales with the instrument.
Cash Yield ships at 0.00%. The rule spends much of its life partly in cash, so any yield credited lands straight on the CAGR, and one constant cannot represent a twenty-year sample where real cash paid about 0.1% for eight years and about 5% for two. Every figure in the table above was measured with it at zero.
Exits are close-only by construction — no strategy.exit, no stop=, no limit= anywhere in the shipped path, and nothing resting at a broker. The printed ladder is the memoryless level; the live quantiser is hysteretic, so the executed switch can sit up to 0.75 steps from the printed one.
© CREDIT
The envelope is a port of "Nadaraya-Watson Envelope " by LuxAlgo (www.tradingview.com), published open-source under CC BY-NC-SA 4.0. The kernel, the MAE band construction and the crossover logic are theirs. This script is published under the same licence.
Only the non-repainting, one-sided causal branch was ported. LuxAlgo's script defaults to the repainting branch, which rebuilds its curve inside barstate.islast with a two-sided kernel, so the value at bar i averages bars on both sides of i — including bars that had not happened when i closed. That branch is deliberately absent here. The measured gap between the two is about 21% of the band halfwidth, which is why the repainting version's arrows look cleaner than any live rule can be. The sizing, the rung logic and the position accounting are new.
ストラテジー

Hunter Channel• Overview
Hunter Channel is a technical analysis indicator designed to identify structured price channels, evaluate their geometry and price interaction, monitor confirmed boundary breaks, and provide sequential post-breakout projections.
The indicator combines several related stages in one workflow. The channel engine identifies the price structure, the quality model evaluates characteristics of that structure, the breakout engine monitors interaction with the channel boundaries, the target system follows price after a breakout, and the Radar provides a separate view of the current smoothed directional environment.
These components are intended to answer different questions about the same market structure rather than operate as independent trading systems.
• Channel Construction
The channel engine uses confirmed pivot highs and pivot lows.
A potential channel can be constructed from two relevant pivot highs with an intervening pivot low, or from two relevant pivot lows with an intervening pivot high.
The two same-side pivots establish the slope of one boundary. The intervening opposite pivot is then used to position the parallel boundary, creating an equidistant channel structure.
The search is controlled by three principal settings:
• Maximum Lookback Limit — determines how far back the script can consider a qualifying pivot structure.
• Minimum Channel Length — specifies the minimum number of bars required before a candidate structure can qualify.
• Pivot Length — controls the sensitivity used to confirm pivot highs and lows.
A shorter Pivot Length generally reacts to smaller price swings, while a larger value requires broader swing structures.
• Channel Validation
Connecting pivots alone is not sufficient for the script to accept a channel.
After constructing a candidate, the indicator checks price behavior across the formation period. If price has moved excessively beyond the projected boundaries relative to the height of the channel, the candidate is rejected.
This validation is intended to distinguish a channel that has contained the relevant price structure from a geometric connection that does not adequately represent the intervening price action.
Once a qualifying newer channel is detected, the script begins tracking that structure and updates its projected boundaries as new bars are formed.
• Channel Display
A qualified structure contains an upper boundary and a parallel lower boundary.
An optional dashed midline represents the center of the channel, and the area between the outer boundaries can be shaded for visual reference.
Channel, midline, fill, and breakout-candle colors can be adjusted from the indicator settings.
• Channel Quality
After a candidate passes structural validation, Hunter Channel evaluates several characteristics of the detected structure.
The quality model considers channel width relative to recent ATR conditions, normalized channel slope, channel angle, and the amount of price movement that occurred outside a narrow tolerance around the projected boundaries.
These measurements are combined into a 0–100 structural score.
The resulting classifications are:
• Elite — score of 85 or higher.
• Strong — score from 70 to 84.
• Good — score from 50 to 69.
• Weak — score below 50.
Only structures meeting the script's qualifying threshold are activated as channels.
The score evaluates characteristics of the detected channel. It is not a historical win rate, statistical probability, or prediction of future performance.
• Channel Angle
The slope of the channel is normalized relative to recent volatility before its angle is evaluated.
The dashboard then describes the structure as Flat/Ranging, Healthy Trend, or Too Steep according to the measured angle.
This provides information about channel geometry independently of whether price will eventually break upward or downward.
• Channel Width
Channel height is also compared with recent ATR conditions.
This allows the script to identify structures that are unusually narrow, unusually wide, or within the script's normal width range.
Width is one component of the structural quality assessment and is not by itself a directional signal.
• Breakout Detection
Once a channel is active, the script continuously evaluates the current upper and lower projected boundaries.
Three breakout methods are available:
• Conservative (Close) — requires the candle to close beyond the relevant channel boundary.
• Aggressive (Wick) — reacts when the candle high or low crosses the relevant boundary.
• 10% Body Breakout — requires price to extend beyond the boundary by an additional amount derived from the channel height.
These alternatives allow users to choose how strict the boundary-break confirmation should be.
A bullish breakout state represents a confirmed break above the upper channel boundary according to the selected method. A bearish breakout state represents the corresponding break below the lower boundary.
A breakout state describes the programmed boundary condition; it does not represent a recommendation to enter a position.
• Sequential Targets
Following a confirmed breakout, the indicator uses the height of the detected channel as the reference for its projection system.
Target levels progress in half-channel-height increments from the breakout reference.
When price reaches the active target, the script advances to the next target and retains completed target levels on the chart.
This creates a sequential projection process rather than displaying only one fixed objective.
The targets are geometric extensions of the detected channel. They do not estimate the probability that price will reach a particular level.
• Retest Monitoring
After a breakout, Hunter Channel continues monitoring the relationship between price and the projected channel boundary.
After the initial breakout bars have passed, the script checks whether price revisits the relevant boundary area and then closes back on the breakout side of that boundary.
When those programmed conditions occur, the indicator marks the event as a retest.
A retest describes price interaction with the former channel boundary and does not guarantee continuation.
• Failed Breakout
The script also defines a condition for invalidating the active breakout state.
If price closes sufficiently back inside the projected channel after the breakout, relative to the height of the channel, the breakout is treated as failed.
The current channel graphics and associated target sequence are then cleared, allowing the channel engine to continue evaluating subsequent structures.
This creates a state-based workflow in which the indicator moves from channel identification to breakout monitoring and then either target/retest tracking or breakout invalidation.
• Radar Context
Hunter Channel includes a separate Radar overlay to provide directional context alongside the geometric channel structure.
The Radar uses two differently smoothed price-midpoint series. The default lengths are 11 and 33, followed by additional short smoothing.
The relative position of the faster and slower Radar lines determines the color of the area between them. A center line is also plotted between the two structures.
Radar does not determine the channel pivots, channel boundaries, channel quality score, or breakout condition.
It is included because the two components describe different aspects of price behavior: the channel represents geometric structure and boundary interaction, while Radar provides a smoothed view of the current directional environment.
This allows users to compare a channel or breakout with the surrounding directional context without merging the two calculations into a single signal.
• Analytical Dashboard
The dashboard summarizes the currently tracked channel using Quality Score, Channel Angle, Channel Width, breakout-context classification, and the next active target.
The quality and breakout-context fields are descriptive outputs derived from the script's structural measurements. They should not be interpreted as empirical probabilities, statistical success rates, or expected trading returns.
• Dashboard Language
The dashboard supports both English and Arabic.
The language can be selected from:
Settings → Dashboard → Table Language / لغة الجدول
Changing the dashboard language only changes displayed text. It does not modify channel detection, scoring, breakout conditions, targets, or Radar calculations.
• Alerts
The script includes alerts for several programmed events, including detection of a new qualifying channel, a confirmed boundary breakout, achievement of a target level, completion of a retest, and detection of a failed breakout.
An alert only indicates that the corresponding programmed condition has occurred. It does not represent an order or personalized trading instruction.
• Suggested Use
A practical way to read Hunter Channel is to begin with the channel itself: review its boundaries, width, angle, and structural quality.
Next, observe how price interacts with the upper and lower boundaries and apply the preferred breakout-confirmation method.
If a breakout occurs, the sequential targets and retest state provide information about subsequent price development.
Radar can then be used as additional directional context rather than as a requirement for channel detection or breakout confirmation.
• Limitations
Hunter Channel is a technical analysis tool and not an automated trading system.
Pivot-based structures require confirmed swing points, so a channel can only be identified after the required pivot information becomes available.
A valid historical channel does not guarantee that its boundaries will continue to contain price.
Breakouts can fail, reverse, or produce limited follow-through.
Channel-quality scores describe the characteristics of detected structures and do not measure future profitability.
Sequential targets are geometric projections and do not guarantee future price levels.
Radar describes smoothed price behavior and does not predict future direction with certainty.
Because the script displays directional breakout states, it is intended for use on standard price charts. Synthetic chart types such as Heikin Ashi, Renko, Kagi, Point & Figure, and Range charts can produce different price data and should not be used to interpret the script's breakout behavior as realistic trading performance.
• Disclaimer
Hunter Channel is provided for technical analysis and educational purposes.
It does not provide investment advice, financial advice, or a recommendation to buy or sell any financial instrument.
No channel, quality score, breakout state, retest, target, Radar condition, or other script output guarantees future market direction or trading results.
Users remain responsible for their own analysis, execution, position sizing, and risk management.
________________________________________
• نظرة عامة
Hunter Channel هو مؤشر للتحليل الفني صُمم لاكتشاف القنوات السعرية المنظمة، وتقييم خصائصها الهندسية وتفاعل السعر معها، ومتابعة اختراق حدودها، ثم عرض مستويات إسقاط متتابعة بعد تحقق الاختراق.
يجمع المؤشر عدة مراحل مترابطة ضمن سير عمل واحد. يتولى محرك القنوات تحديد البنية السعرية، ويقيّم نظام الجودة خصائص القناة المكتشفة، ويراقب محرك الاختراق تفاعل السعر مع حدودها، بينما يتابع نظام الأهداف تطور السعر بعد الاختراق. ويقدم Radar قراءة منفصلة للسياق الاتجاهي الممهد للسعر.
هذه المكونات تقيس جوانب مختلفة من البنية نفسها، ولا تعمل باعتبارها أنظمة تداول مستقلة عن بعضها.
• تكوين القناة
يعتمد محرك القنوات على قمم وقيعان Pivot مؤكدة.
يمكن تكوين قناة محتملة باستخدام قمتين Pivot مناسبتين مع وجود قاع Pivot بينهما، أو باستخدام قاعين Pivot مناسبين مع وجود قمة Pivot بينهما.
تحدد نقطتا الارتكاز الواقعتان في الجهة نفسها ميل أحد حدود القناة، ثم تستخدم نقطة الارتكاز المقابلة لوضع الحد الموازي الآخر، وبذلك تتكون قناة متساوية الأبعاد.
وتتحكم في عملية البحث ثلاثة إعدادات رئيسية:
• Maximum Lookback Limit — يحدد أقصى نطاق تاريخي يمكن للسكربت البحث داخله عن بنية Pivot مناسبة.
• Minimum Channel Length — يحدد الحد الأدنى لعدد الشموع المطلوبة قبل قبول القناة المرشحة.
• Pivot Length — يتحكم في حساسية اكتشاف القمم والقيعان.
القيم الأصغر لـ Pivot Length تتفاعل عادة مع تحركات سعرية أصغر، بينما تتطلب القيم الأكبر تكوينات Swing أوسع قبل تأكيد نقاط الارتكاز.
• التحقق من القناة
مجرد توصيل نقاط Pivot لا يكفي لاعتماد القناة.
بعد تكوين قناة مرشحة، يفحص المؤشر حركة السعر خلال فترة تكوينها. وإذا تجاوز السعر الحدود المتوقعة بدرجة كبيرة مقارنة بارتفاع القناة، يتم رفض البنية.
الغرض من هذا الفحص هو التفريق بين قناة احتوت الحركة السعرية ذات الصلة وبين مجرد اتصال هندسي بين نقاط منفصلة لا يمثل حركة السعر الواقعة بينها بصورة مناسبة.
وعند اكتشاف قناة أحدث مستوفية للشروط، يبدأ السكربت في متابعة تلك البنية وتحديث حدودها المتوقعة مع تكوّن الشموع الجديدة.
• رسم القناة
تتكون البنية المؤهلة من حد علوي وحد سفلي متوازٍ معه.
ويمكن عرض خط متقطع في منتصف القناة، إضافة إلى تظليل المنطقة الواقعة بين الحدين الخارجيين.
كما يمكن التحكم في ألوان القناة وخط المنتصف والتظليل وشمعة الاختراق من الإعدادات.
• تقييم جودة القناة
بعد اجتياز القناة لفحص البنية، يقيم Hunter Channel مجموعة من خصائصها.
يأخذ التقييم في الاعتبار عرض القناة مقارنة بظروف ATR الأخيرة، وميل القناة بعد التطبيع، وزاويتها، ومقدار خروج حركة السعر عن نطاق ضيق حول الحدود المتوقعة.
يتم دمج هذه القياسات في تقييم هيكلي من 0 إلى 100.
وتقسم النتائج إلى:
• Elite / ممتاز — من 85 فأعلى.
• Strong / قوي — من 70 إلى 84.
• Good / جيد — من 50 إلى 69.
• Weak / ضعيف — أقل من 50.
ولا يتم تفعيل القناة إلا عندما تحقق الحد المطلوب في نموذج التقييم.
هذا الرقم يصف خصائص القناة المكتشفة، ولا يمثل نسبة نجاح تاريخية أو احتمالًا إحصائيًا أو توقعًا للأداء المستقبلي.
• زاوية القناة
يتم تطبيع ميل القناة مقارنة بالتذبذب الأخير قبل تقييم زاويتها.
ثم تصف لوحة التحليل البنية بحالات مثل أفقي/عرضي، ترند صحي، أو حاد جدًا بحسب الزاوية المقاسة.
توفر هذه الخانة معلومات عن الشكل الهندسي للقناة بصورة مستقلة عن اتجاه الاختراق الذي قد يحدث لاحقًا.
• عرض القناة
يقارن السكربت ارتفاع القناة بظروف ATR الأخيرة.
ويتيح ذلك التمييز بين القنوات الضيقة بصورة غير معتادة، والقنوات ذات العرض المناسب وفق النموذج، والقنوات الواسعة بصورة كبيرة.
ويمثل العرض أحد مكونات تقييم البنية ولا يشكل بمفرده إشارة اتجاهية.
• اكتشاف الاختراق
بعد تفعيل القناة يراقب السكربت بصورة مستمرة الحدود العلوية والسفلية المتوقعة.
وتتوفر ثلاث طرق لتحديد الاختراق:
• Conservative (Close) — تتطلب إغلاق الشمعة خارج حد القناة ذي الصلة.
• Aggressive (Wick) — تعتمد على تجاوز أعلى أو أدنى سعر داخل الشمعة للحد المناسب.
• 10% Body Breakout — تتطلب امتداد السعر خارج الحد بمسافة إضافية مشتقة من ارتفاع القناة.
وتسمح هذه الخيارات للمستخدم بتحديد درجة الصرامة المطلوبة في تأكيد كسر حدود القناة.
الحالة الصاعدة تعني أن شرط اختراق الحد العلوي قد تحقق وفق الطريقة المختارة، والحالة الهابطة تعني تحقق الشرط المقابل أسفل الحد السفلي.
وصف الاختراق يعني تحقق الشرط البرمجي المرتبط بحد القناة، ولا يمثل توصية بالدخول في صفقة.
• الأهداف المتتابعة
بعد تأكيد الاختراق يستخدم المؤشر ارتفاع القناة المكتشفة باعتباره مرجعًا لنظام الإسقاط السعري.
تتقدم الأهداف بمراحل تعادل نصف ارتفاع القناة انطلاقًا من مرجع الاختراق.
وعند وصول السعر إلى الهدف النشط ينتقل السكربت إلى المستوى التالي، مع الاحتفاظ بمستويات الأهداف التي تم الوصول إليها على الشارت.
وبذلك تتم متابعة امتداد الحركة على مراحل بدل الاعتماد على هدف واحد ثابت.
هذه المستويات عبارة عن إسقاطات هندسية مشتقة من القناة، ولا تقيس احتمال وصول السعر إلى أي مستوى معين.
• متابعة إعادة الاختبار
بعد الاختراق يستمر Hunter Channel في مراقبة العلاقة بين السعر والحد المتوقع للقناة.
بعد مرور الشموع الأولى من الاختراق، يفحص السكربت ما إذا كان السعر قد عاد إلى المنطقة القريبة من الحد ذي الصلة ثم أغلق مرة أخرى في جهة الاختراق.
وعند تحقق الشروط المبرمجة تظهر حالة إعادة الاختبار.
وتمثل إعادة الاختبار وصفًا لتفاعل السعر مع حد القناة السابق ولا تضمن استمرار الحركة.
• فشل الاختراق
يحتوي السكربت كذلك على شرط لإبطال حالة الاختراق النشطة.
إذا أغلق السعر بدرجة كافية مرة أخرى داخل القناة المتوقعة بعد الاختراق، مقارنة بارتفاع القناة، تتم معاملة الحالة باعتبارها اختراقًا فاشلًا.
بعد ذلك يتم مسح القناة وأهدافها المرتبطة بها، ويستمر محرك القنوات في تقييم البنى اللاحقة.
وبذلك يعمل المؤشر وفق دورة حالة تبدأ باكتشاف القناة، ثم متابعة الاختراق، ثم متابعة الأهداف أو إعادة الاختبار، أو إبطال الاختراق عند تحقق شروط الفشل.
• سياق Radar
يتضمن Hunter Channel مكونًا مستقلًا باسم Radar لتوفير سياق اتجاهي إضافي إلى جانب البنية الهندسية للقناة.
يعتمد Radar على بنيتين سعريتين بتنعيم مختلف. الأطوال الافتراضية هي 11 و33، يليهما تنعيم قصير إضافي.
ويحدد الموقع النسبي بين خطي Radar لون المنطقة الواقعة بينهما، كما يتم رسم خط في منتصف البنيتين.
Radar لا يحدد نقاط Pivot الخاصة بالقناة، ولا حدودها، ولا تقييم جودتها، ولا شروط الاختراق.
سبب وجوده إلى جانب القناة هو أن كل مكون يصف جانبًا مختلفًا من حركة السعر. القناة تصف البنية الهندسية والتفاعل مع الحدود، بينما يقدم Radar قراءة ممهدة للبيئة الاتجاهية الحالية.
وبذلك يستطيع المستخدم مقارنة القناة أو الاختراق بالسياق الاتجاهي المحيط دون دمج الحسابين في إشارة واحدة.
• لوحة التحليل
تلخص لوحة التحليل حالة القناة التي تتم متابعتها من خلال تقييم الجودة، وزاوية القناة، وعرض القناة، والتقييم السياقي للاختراق، والهدف النشط التالي.
هذه القراءات عبارة عن أوصاف مشتقة من قياسات البنية داخل السكربت، ولا ينبغي تفسيرها على أنها احتمالات إحصائية أو نسب نجاح أو عوائد تداول متوقعة.
• لغة لوحة التحليل
تدعم لوحة المؤشر اللغتين الإنجليزية والعربية.
يمكن تغيير اللغة من:
Settings → Dashboard → Table Language / لغة الجدول
تغيير اللغة يؤثر فقط في النصوص المعروضة ولا يغير اكتشاف القنوات أو تقييمها أو شروط الاختراق أو الأهداف أو حسابات Radar.
• التنبيهات
يتضمن السكربت تنبيهات لعدد من الأحداث المبرمجة، ومنها اكتشاف قناة جديدة مستوفية للشروط، وتأكيد اختراق أحد الحدود، والوصول إلى هدف، واكتمال إعادة الاختبار، واكتشاف فشل الاختراق.
ظهور التنبيه يعني أن الشرط البرمجي المقابل قد تحقق، ولا يمثل أمر تداول أو توجيهًا شخصيًا للدخول أو الخروج.
• طريقة مقترحة لقراءة المؤشر
يمكن البدء بمراجعة القناة نفسها من خلال حدودها وعرضها وزاويتها وتقييم بنيتها.
بعد ذلك تتم مراقبة تفاعل السعر مع الحدين العلوي والسفلي واستخدام طريقة تأكيد الاختراق التي يختارها المستخدم.
إذا تحقق الاختراق، توفر الأهداف المتتابعة وحالة إعادة الاختبار معلومات إضافية عن تطور السعر بعد الحدث.
أما Radar فيمكن استخدامه باعتباره سياقًا اتجاهيًا إضافيًا، وليس شرطًا لاكتشاف القناة أو تأكيد الاختراق.
• حدود الاستخدام
Hunter Channel أداة للتحليل الفني وليس نظام تداول آليًا.
تعتمد البنية على نقاط Pivot مؤكدة، ولذلك لا يمكن تحديد القناة إلا بعد توفر بيانات الارتكاز المطلوبة.
وجود قناة صحيحة تاريخيًا لا يعني أن السعر سيستمر في احترام حدودها.
وقد يفشل الاختراق أو ينعكس أو ينتج عنه امتداد محدود.
تقييم الجودة يصف خصائص القناة المكتشفة ولا يقيس الربحية المستقبلية.
الأهداف عبارة عن إسقاطات هندسية ولا تضمن وصول السعر إلى المستويات المعروضة.
كما أن Radar يصف حركة سعرية ممهدة ولا يستطيع تحديد الاتجاه المستقبلي بصورة مؤكدة.
ونظرًا إلى أن السكربت يعرض حالات اختراق اتجاهية، فهو مخصص للاستخدام على الشارتات السعرية القياسية. أنواع الشارت الاصطناعية مثل Heikin Ashi وRenko وKagi وPoint & Figure وRange قد تنتج بيانات سعرية مختلفة، ولذلك لا ينبغي استخدام نتائجها لتقييم سلوك إشارات الاختراق باعتباره أداء تداول واقعيًا.
• إخلاء المسؤولية
Hunter Channel مخصص للتحليل الفني والأغراض التعليمية.
ولا يقدم نصيحة استثمارية أو مالية أو توصية بشراء أو بيع أي أداة مالية.
ولا تضمن أي قناة أو تقييم جودة أو حالة اختراق أو إعادة اختبار أو هدف أو قراءة Radar أو أي مخرج آخر من السكربت اتجاه السوق المستقبلي أو نتائج التداول.
ويبقى المستخدم مسؤولًا عن تحليله وقرارات التنفيذ وحجم المراكز وإدارة المخاطر.
インジケーター

Swing Portfolio Trim Dashboard v1.5**Swing Portfolio Trim Dashboard**
A technical portfolio-ranking tool designed for swing traders who typically hold positions for roughly **1–3 months** and need a systematic way to decide which holdings to trim, exit, hold, or continue riding.
The indicator is designed for portfolios containing many positions and focuses entirely on **price action, momentum, trend strength, volatility-adjusted performance, and technical deterioration** rather than fundamentals.
### Technical Score
Every holding receives a **0–100 Technical Score** based on:
* **10-day raw momentum — 5%**
* **20-day raw momentum — 10%**
* **50-day raw momentum — 15%**
* **10-day volatility-adjusted momentum — 2.5%**
* **20-day volatility-adjusted momentum — 7.5%**
* **50-day volatility-adjusted momentum — 15%**
* **10/20/50 EMA trend structure — 20%**
* **ATR-normalized trend health — 25%**
Raw momentum captures absolute leadership, while volatility-adjusted momentum helps normalize comparisons between securities with very different volatility profiles.
This is particularly useful when comparing ordinary stocks, ETFs, and higher-volatility instruments within the same portfolio.
### Portfolio Relative Ranking
Momentum components are converted into **cross-sectional percentile ranks relative to the other securities in the portfolio**.
A stock ranking highly therefore means it is technically stronger than most of the alternatives currently held.
**Tech#** represents this overall ranking:
* **#1 = strongest holding**
* Higher numbers = progressively weaker holdings
### Multi-Horizon Momentum
The model uses three time horizons:
* **10D** — short-term acceleration/deceleration
* **20D** — current swing momentum
* **50D** — broader swing trend
The shorter 10-day horizon receives less weight to reduce sensitivity to temporary price noise.
### Volatility Normalization
The dashboard uses realized volatility and ATR so that securities with very different volatility characteristics can be compared more fairly.
For example, a +10% move in a low-volatility ETF may represent much stronger risk-adjusted momentum than the same +10% move in a highly volatile leveraged product.
### Trend Score
Trend strength is evaluated using:
* Price above EMA10
* Price above EMA20
* Price above EMA50
* EMA10 above EMA20
* EMA20 above EMA50
* Rising EMA20
* Rising EMA50
A **Trend score of 100** represents a very strong and well-structured swing trend.
### ATR20
**ATR20** measures the stock's distance from its 20-day EMA in ATR units:
`(Price - EMA20) / ATR(14)`
Examples:
* **+2.0** = price is 2 ATR above EMA20
* **+0.2** = slightly above EMA20
* **-0.5** = modestly below EMA20
* **-1.0** = meaningful technical damage
* **-2.0** = severe deterioration relative to normal volatility
Using ATR allows the model to distinguish normal volatility from genuinely abnormal price deterioration.
### Score Deterioration
The dashboard tracks how Technical Score changes over time.
**Δ5**
`Current Score - Score 5 trading days ago`
**Δ10**
`Current Score - Score 10 trading days ago`
Negative values indicate deterioration.
For example:
`Δ5 = -12`
means the Technical Score has fallen 12 points during the last five trading sessions.
### RankΔ5
**RankΔ5** measures how the security's portfolio ranking changed during the last five sessions.
Negative values mean the stock is being overtaken by other holdings.
This can help distinguish between:
* a stock whose own technical condition is breaking down, and
* a stock that remains healthy but is losing relative leadership.
### Action Engine
Each security receives an Action classification:
**EXIT**
Severe technical weakness with confirmed longer-term trend damage.
**TRIM**
Weak portfolio ranking combined with confirmed EMA/ATR deterioration.
**TRIM WATCH**
A weak holding approaching or beginning a technical breakdown.
**DETERIORATING**
Momentum or relative ranking is deteriorating, but the underlying price trend has not yet broken enough to justify an automatic trim.
**HOLD**
Technical condition remains acceptable.
**RECOVERING**
A historically weak holding whose technical score is improving materially.
**LEADER**
A top-ranked holding with strong trend structure.
### Trim Priority
Technical Score and Trim Priority are deliberately separate.
**Technical Score** answers:
> How strong is this holding today?
**Trim Priority** answers:
> If I need to reduce positions, which holding deserves attention first?
Trim Priority combines:
* **65% current technical weakness**
* **25% 5-day score deterioration**
* **10% 10-day score deterioration**
However, the dashboard does **not** blindly rank positions by this number.
The Action Engine takes priority.
Sell-eligible states are considered first:
**EXIT → TRIM → TRIM WATCH**
Trim Priority then helps rank securities within those groups.
This prevents an improving laggard from being sold before a genuinely broken position.
### Trim# vs Tech#
The dashboard contains two different rankings:
**Tech#**
Ranks holdings from technically strongest to weakest.
**Trim#**
Ranks holdings according to which positions should be reviewed first when reducing exposure.
These numbers may differ substantially because Trim# also considers deterioration, trend damage, and recovery.
### SPY / QQQ Comparison
The Diagnostics view also displays relative 20-day performance versus:
* SPY
* QQQ
These values are informational and currently **do not affect the Technical Score**, allowing securities from different sectors and asset exposures to compete primarily on their own technical characteristics.
### Portfolio Management Use
The dashboard is designed to answer a practical question:
> If I own 30–40 positions and need to remove 3–4 names, where should I look first?
Rather than manually reviewing every chart, the trader can begin with the highest-ranked **EXIT / TRIM / TRIM WATCH** candidates and then examine the underlying technical evidence.
The indicator is calculated from **daily data** and is intended primarily for decisions made after the daily close rather than intraday trading.
The portfolio ticker list can be edited directly from the indicator settings, allowing holdings to be added or removed without rewriting the Pine Script.
**This indicator is a technical decision-support and portfolio-ranking tool. It is not financial advice and should not be used as a standalone trading or risk-management system.**
インジケーター

MFx Trend Vitality Engine V4Trend Vitality Engine V4
Trend Vitality Engine is a market-analysis indicator designed to describe the evolving condition of buyer and seller campaigns rather than generate entry, exit, top, bottom, or price-prediction signals.
The underlying concept is to treat an active directional move as a developing campaign. Instead of asking only whether price is moving up or down, TVE evaluates several characteristics of the buyer and seller sides and organizes them into an instrument-panel view of trend condition.
Core framework
TVE evaluates several related but distinct aspects of campaign health:
Vitality represents the overall aliveness and condition of the active buyer or seller campaign.
Structural Vitality represents the slower structural condition underlying that campaign.
Live Vitality represents its more immediate condition.
Power represents current applied directional pressure.
Efficiency / Transmission represents how effectively campaign energy is being converted into directional progress.
Durability represents recent structural resilience or accumulated wear.
Reserve / Fuel is a composite measure of usable campaign capacity derived from Power, Efficiency and Durability.
Dominance identifies which side currently holds greater control according to the TVE framework.
State and Phase describe the current internal condition of the buyer-versus-seller contest.
Lifecycle is a heuristic evidence-voting model that describes campaign evolution through stages such as expansion, maturity, distribution, fatigue, capitulation, repair, accumulation and emergence.
Market Health is a composite summary of underlying TVE measurements. It should not be interpreted as an additional independent confirmation signal.
Timeframe cascade
TVE evaluates market condition in the context of a higher-timeframe cascade . The dashboard displays the chart timeframe and the corresponding higher-timeframe context so that the current campaign can be interpreted within a broader market structure.
This allows the indicator to be used as an instrument panel rather than reducing market condition to a single directional reading.
What changed in V4
V4 preserves the established TVE architecture while correcting the live Durability mechanism.
In the previous version, lifetime accumulated damage could continue building across campaign history until the usable Durability range became saturated. This could cause Durability to remain at or near its lower boundary and reduce its ability to represent current structural wear.
V4 retains lifetime accumulated damage as historical diagnostic information but uses rolling live damage for the active Durability calculation. This allows current structural wear to increase during deterioration and recover as damaging evidence leaves the active measurement window.
Repaired Durability is then passed through the existing Reserve calculation and existing downstream TVE systems. The Reserve equation itself was not redesigned for this release.
Because Durability is once again an active input, users should expect some Reserve, Market Health, Lifecycle and related downstream readings to differ from the previous version.
Lifecycle interpretation
Lifecycle stages describe campaign evolution and should not be interpreted as direct forecasts of immediate price direction.
In particular, stages such as Bear Repair, Bear Accumulation and Bear Emergence describe developments occurring within, or emerging from, a bearish campaign context. The word "Bear" identifies the campaign context and does not necessarily mean that the indicator is forecasting an immediate price decline.
Lifecycle Evidence Score represents the strength of evidence supporting the selected lifecycle classification. It is not a calibrated probability or statistical confidence level.
How to use TVE
TVE is intended to be read as a collection of related gauges rather than as a single signal.
A user can begin with Dominance and the higher-timeframe context to understand which side currently controls the campaign. Vitality and Power describe campaign condition and applied pressure. Efficiency describes conversion quality. Durability and Reserve provide information about structural wear and usable capacity. Lifecycle provides context about campaign evolution, while Market Health summarizes the broader condition represented by the underlying gauges.
Divergence, decay, structural events and warning conditions provide additional context when the internal condition of a campaign begins to differ from its surface behavior.
The Command Center summarizes these measurements in plain-language descriptions while the detailed dashboard exposes the underlying buyer and seller measurements.
Alerts
V4 includes alert conditions for Trend Vitality Critical, Trend Vitality Rapid Decay, Critical Vitality plus Structural Event, Late Cycle Divergence, and Silent Damage Accumulating.
These alerts identify TVE conditions. They are not automated trade recommendations.
Research and limitations
TVE was developed as an experimental framework for observing trend health and buyer-versus-seller campaign behavior across multiple timeframes.
V4 follows a validation process that included comparison of internal measurements across multiple instruments and timeframes and investigation of the Durability mechanism. The V4 Durability change addresses an identified mechanical behavior in the previous implementation.
This validation should not be interpreted as evidence that TVE predicts future returns. Individual TVE measurements can overlap because several gauges intentionally summarize related aspects of the same underlying campaign.
TVE does not claim to predict market tops or bottoms, forecast future prices, identify guaranteed reversals, or provide statistically guaranteed entries or exits.
It is intended as an analytical instrument panel that helps users observe the evolving health, pressure, efficiency, wear, reserve, lifecycle and control of buyer and seller campaigns.
Version continuity
V4 is the current version of the Trend Vitality Engine. V3 remains the legacy version so existing charts and previous observations can be preserved and compared without silently changing the historical implementation. インジケーター

ADX/DI Profile & Volume Footprint🔶Overview
This script merges two powerful analytical frameworks—"Algorithmic ADX/DI Price Profile" and "High-Precision Volume Footprint"—into a single chart overlay. By moving Directional Movement data from the time axis (X-axis) to the price axis (Y-axis) and scanning lower timeframe (LTF) tick arrays, it accurately visualizes where trend energy is concentrated and how buyers and sellers interact at discrete price levels. This allows you to objectively verify market structure before committing capital.
🔶System Modules and Execution Flow
Volume Footprint Engine: Utilizes request.security_lower_tf() to scan up to 50 historical bars on a lower timeframe (down to 1-second for Premium users) to reconstruct intra-bar order flow. : Toggle between "Individual Bars" mode for per-candle footprints, and "Composite (N Bars)" mode to aggregate order flow over a specified range into a single comprehensive structure.
ADX/DI Profile Matrix: Computes standard 14-period DMI components, scalable via a Multi-Timeframe (MTF) engine. Generates fixed bounding boxes over historical sessions to project +DI, -DI, and ADX intensity as horizontal histograms. : Profiles are visually separated (Left, Right, Center aligned). A real-time heatmap shader shifts from "Cold" to "Hot" based on energy concentration, instantly identifying trend exhaustion or accumulation zones.
Local VWAP & Fibonacci Controller: Using the dynamically calculated profile range as an anchor, it draws a local Volume Weighted Average Price (VWAP) and customizable Fibonacci extensions, providing highly logical stop-loss and take-profit targets.
Analytical HUD (Default OFF): A fixed 50-column matrix table dynamically tracks Delta, Total Volume, Total Buy, and Total Sell orders, eliminating the need to manually decipher individual numbers inside the boxes.
🔶Configuration and Filtering Options
Resolution & Boundaries: Defines profile row counts (10 to 50 tiers; max 40 recommended for perfect stability, though this does not apply to line rendering) and width multipliers. When trading highly volatile assets like crypto or indices, reducing this to 30 thickens the price buckets and improves visibility.
Algorithmic Noise Filter: A critical threshold gate (0.0 to 1.0). Price tiers failing to meet this relative intensity ratio are visually muted. Increasing the default 0.08 to 0.15 (15%) mathematically erases low-impact price zones, leaving only institutional-level support/resistance clusters.
Volume Weight Toggle: An option to fuse volume data into DMI calculations. Prioritizes directional moves backed by real capital over empty price spikes.
Premium Seconds-Timeframe Guard: An automated downgrade protocol to ensure script stability. If a non-Premium plan is detected, it automatically converts 1-second (1S) requests to a 1-minute timeframe to prevent fatal array compilation errors.
🔶Trading Strategy and Practical Applications
"Wait & See" Filter (Avoiding Chop): The system's color shader acts as your first gate of discipline. If the ADX profile (center) shows "Cold" colors (e.g., dark orange/amber), it means trend energy is low. Do not trade; remain in a no-position state until the ADX blocks turn "Hot" (bright yellow), confirming massive algorithmic participation.
Absorption and Exhaustion Setups: Watch the Footprint engine boxes drawn over the candles closely. If a massive spike of aggressive buying (high positive delta, green text) occurs, yet the candle fails to break out and is immediately capped by a dense -DI profile block (right side, Hot Red), this is "Absorption." Buyers are trapped. Enter short right below this Point of Control (POC) with a tight stop-loss just above the profile box.
VWAP / Fibonacci Targeting: Once an entry is validated by Footprint delta, use the dynamically plotted VWAP as a baseline. For longs, target the upper Fibonacci bands (0.618 or 1.000). The beauty of this system is that these bands are derived strictly from the profiled session's "volume", reacting mathematically to the current market environment rather than arbitrary historical swings.
🔶Architecture and Quantitative Logic (Code Breakdown)
This script relies on multiple mathematical matrices to transform time-based indicators into price-based structures.
1. Footprint Volume Distribution (Tick Estimation)
ticks_1s = math.round((c_h - c_l) / syminfo.mintick) + 1
v_tick = c_v / ticks_1s
Why this calculation is performed: TradingView cannot provide sub-second Bid/Ask data. To measure aggressive market participation at specific price levels and objectively distinguish local buying absorption from selling pressure, the engine mathematically divides the lower timeframe bar's spread (High - Low) and distributes volume evenly across each tick to synthesize aggressive trading behavior.
Actual Output Value: A raw Float representing estimated volume at a single price tick. For example, if a 1-second volume (c_v) is 100 contracts and the spread covers 5 ticks, the output (v_tick) is exactly 20.0 per tick. Absolute volumes are formatted as strings (e.g., "1.5K") for the UI, while net delta is output to the HUD summary table as raw positive/negative floats.
2. DMI Profile Allocation and Normalization
net_di_ratio = math.abs(raw_p_plus - raw_p_minus) / (raw_p_plus + raw_p_minus)
p_plus = raw_p_plus * c_vol * (1 + net_di_ratio)
Why this calculation is performed: To pinpoint the exact price nodes where trend strength (ADX) and direction (+DI/-DI) physically occurred, filtering out empty volatility. Standard DMI ignores volume; this script multiplies DI intensity by trading volume (c_vol) and scales it via net_di_ratio to highlight zones where one side completely overwhelmed the other.
Actual Output Value: A large integer/float representing the local energy assigned to that price tier. If raw +DI is 30, raw -DI is 10, and volume is 1,000, the net_di_ratio is 20 / 40 = 0.5. The final p_plus output assigned to that tier is 30 * 1000 * 1.5 = 45,000 energy points.
3. Box Scaling and Noise Filter
ratio_plus = val_plus / max_plus
// If ratio_plus >= noise_filter, render the box
Why this calculation is performed: To eliminate market noise. max_plus is the Point of Control (POC)—the price tier with the absolute maximum energy. All other tiers are divided by this maximum to output a percentage (0.0 to 1.0). The noise filter (default 0.08, or 8%) culls tiers holding less than 8% of the POC's intensity.
Actual Output Value: A Float ratio between 0.0 and 1.0. A tier with 22,500 energy against a POC of 45,000 outputs 0.5. This 0.5 is passed directly to the f_get_heatmap_color function, outputting an RGBA hex color code that dynamically blends "Cold" and "Hot" variables based on intensity.
4. VWAP and Geometric Fibonacci Derivation
Why this calculation is performed: To establish a baseline fair value and logical standard deviation bands derived directly from the profiled session's volume distribution.
Actual Output Value: Exact absolute price coordinates (Y-axis floats). The Local VWAP is calculated by dividing the sum of (Typical Price * Volume) by Total Volume within the profile window. Fibonacci levels are output as the absolute distance from the VWAP to the session high/low multiplied by standard ratios (0.382, 0.618, 1.000). These are mapped as solid, dashed, or dotted lines across the X-axis bounds of the profile box.
🔶Capabilities and Limitations
Capabilities: Synthesizes massive LTF data arrays into clean, readable UI boxes without repainting. Modular layout prevents candlesticks from being obscured.
Limitations: TradingView imposes strict limits of 500 boxes, 500 lines, and 500 labels per script. On highly volatile assets with deep tick resolution, maximizing row_count or setting footprint lookbacks to 50 bars may cause older UI elements to clip (disappear) due to platform-level garbage collection constraints.
インジケーター

Index Peak Dispersion█ OVERVIEW
Index Peak Dispersion plots, in a separate pane, two normalized series computed across a configurable universe of up to twelve equity indexes: the calendar-day dispersion of their all-time-high dates, expressed as a percent of a topping window, and the share of indexes that printed a fresh all-time high within a short recent window. The thesis is that healthy advances register all-time highs across indexes nearly simultaneously, while major distributive tops fragment, spreading index peak dates across weeks or months.
█ HISTORY / BACKGROUND
The concept descends from the non-confirmation principle of Dow Theory as developed by Charles Dow, William Hamilton and Robert Rhea, in which a new high in one average unaccompanied by a new high in another warns that the trend is losing sponsorship. Classic non-confirmation is measured in the price domain: one index fails to exceed its prior peak while another does.
Market historians and technicians, including Robert Prechter, have documented a related phenomenon in the time domain: at major tops, the final all-time highs of the major indexes scatter across the calendar rather than clustering. At the 2000 top, the Dow Industrials peaked in January, the S&P 500 and NASDAQ Composite in March, and the NYSE Composite in September. At the 2007 top, the Dow Jones Composite peaked in July while the Dow Industrials and S&P 500 peaked in October. This script converts that qualitative observation into a mechanical, reproducible statistic.
█ HOW IT WORKS
The script performs the following steps on each bar:
• For each of up to twelve enabled symbols, one same-timeframe request.security() call evaluates a function inside the requested symbol's context. The function maintains a running maximum of closing prices over the symbol's loaded history and records the timestamp of the bar on which that maximum was last exceeded. This running maximum is point-in-time by construction: no future data enters the calculation, and lookahead is off.
• On the chart symbol, each recorded timestamp is converted to an age in calendar days: current bar time minus the all-time-high time, divided by the number of milliseconds in a day.
• Each enabled index with data is classified. An age at or below the fresh window makes it Fresh. An age at or below the topping window makes it part of the in-window set. An age beyond the topping window makes it Stale.
• When the in-window set contains at least the minimum required count of indexes, the dispersion span equals the maximum in-window age minus the minimum in-window age, in calendar days. The plotted dispersion value is that span divided by the topping window length, times 100. When the in-window count is below the minimum, the dispersion plot returns na.
• The participation value equals the count of Fresh indexes divided by the count of enabled indexes with data, times 100, plotted as columns.
• The fractured top condition is true when the dispersion value is at or above the warning threshold while at least one index is Fresh. The pane background is shaded on those bars, and an alert fires on the first bar of each new occurrence. A second alert fires when every enabled index with data is simultaneously Fresh, which marks a synchronized advance, the opposite condition.
• On the last bar, an optional table lists each index with its all-time-high date, age in days and classification, plus summary counts and the raw span in days.
█ HOW TO USE
The script is designed for the 1D timeframe. The running all-time high is intended to operate on daily closes, and both windows are specified in calendar days, so daily resolution matches the granularity of the logic.
In plain terms, the blue columns answer one question: how many of the enabled indexes hit a record high this week? The red line answers another: how spread out in time are everyone's record highs? In a strong market, the indexes peak together, so the columns are tall and the line stays low. At major tops, the market tends to fall apart in slow motion: one index peaks, then months later another, and by the time the last index prints its final record, several others stopped making records long ago. Each new high is carried by fewer indexes, so the columns thin out while the line climbs. The shaded background marks the combination of both: the market is still printing record highs, but the set of indexes confirming them has been shrinking for months. That is the structure documented at the 2000 and 2007 tops. The same combination also appears during rotation phases that resolve higher, so treat it as a statement that conditions resemble past major tops, not as an instruction to act.
Read the two plotted series together. Low dispersion with high participation describes a synchronized advance in which the enabled indexes are registering highs together. Rising dispersion while some indexes continue to print fresh highs describes fragmentation: leadership is narrowing and earlier leaders have stopped confirming. The shaded background marks bars on which the dispersion value is at or above the dashed threshold line while at least one fresh high exists, the specific combination in which fragmentation is present at a live high rather than in an established downtrend.
The table gives the attribution behind the numbers: which indexes are Fresh, which remain inside the topping window, and which have gone Stale, along with each all-time-high date. Stale entries are non-confirmations older than the topping window and are deliberately excluded from the span so that a single long-dormant index does not saturate the statistic.
The condition is a warning context, not a timing trigger. It identifies an environment consistent with historical distributive tops. It does not predict the date or the existence of a decline.
█ SETTINGS
• Index universe, twelve slots, each with an enable checkbox and a symbol field. Defaults: DJI, DJT, DJU, DJA, SPX, NDX, IXIC, NYA, RUT, SOX, MID, SPXEW. All twelve are enabled by default. Any slot can be repointed to another symbol or disabled.
• Fresh high window, calendar days. Default 7. An index whose all-time high printed within this many days counts as Fresh.
• Topping window, calendar days. Default 378. An index whose all-time high printed within this many days participates in the dispersion span. Older highs are classified Stale.
• Dispersion warning threshold, percent of topping window. Default 25. The dashed reference line and the threshold for the fractured top condition.
• Minimum in-window index count for a valid span. Default 4. Below this count the dispersion plot returns na, which prevents a span computed from too few indexes.
• Show status table. Default on.
• Table position. Default Top right.
█ WHAT MAKES IT ORIGINAL
Breadth and non-confirmation tools on this platform generally measure the price domain: divergences between an index and an internal line, counts of components above a moving average, or new-high and new-low tallies within one exchange universe. This script instead measures the time domain across whole indexes. It reduces the peak-date scatter of a user-defined index universe to a single bounded statistic, the in-window span of all-time-high ages, and pairs it with a participation series so that fragmentation is only flagged while a high is live. The classification into Fresh, in-window and Stale, with the Stale exclusion and the minimum-count validity gate, is what allows the scatter of a historical topping process to be plotted as one continuous, comparable series across eras.
█ NOTES / LIMITATIONS
• The running all-time high is computed only over the bars loaded for each requested symbol. Symbols with short available history, and the early portion of any chart, understate the true age of the all-time high. Treat the plot as reliable only after all enabled symbols have substantial loaded history.
• The logic is designed for the 1D timeframe. On intraday charts the running maximum operates on intraday closes and the calendar-day windows lose their intended granularity. On weekly or monthly charts a fresh window shorter than one bar cannot register.
• All request.security() calls run on the chart timeframe with lookahead off. Values on the developing bar update until the bar closes and do not repaint afterward.
• The script issues twelve security calls. A symbol slot that fails to resolve or returns no data is excluded from every count and appears in the table as No data.
• Ages and spans are measured in calendar days, not trading days, so weekends and holidays are included in the counts.
• The warning threshold is expressed as a percent of the topping window. Changing the topping window changes the day-equivalent of the same percent threshold.
• The dispersion plot returns na whenever fewer than the minimum required indexes have an all-time high inside the topping window.
• The status table renders on the last bar only. インジケーター

ATR PulseATR Pulse is an ATR-based trend and signal indicator designed to identify transitions around a dynamic volatility-adjusted trailing stop.
The script combines one core ATR transition engine with optional validation filters. These filters are not separate trading systems merged together; they act as configurable confirmation layers around the same underlying price-versus-trailing-stop event. This allows users to keep the indicator simple or make signal requirements more selective without changing the core concept.
**How it works**
The indicator calculates Average True Range over the selected ATR Period and multiplies it by the ATR Sensitivity setting.
This produces a dynamic loss distance:
ATR distance = ATR x Sensitivity
The trailing stop then adjusts according to the relationship between the current price, the previous price, and the previous trailing-stop value.
When price remains above the trailing stop, the stop follows upward without moving lower.
When price remains below the trailing stop, the stop follows downward without moving higher.
A directional transition is detected when price crosses the ATR trailing stop:
* A bullish signal requires price to cross above the trailing stop.
* A bearish signal requires price to cross below the trailing stop.
The indicator uses standard chart prices and does not request data from another symbol or timeframe.
**ATR Sensitivity**
ATR Sensitivity controls how closely the trailing stop follows price.
Lower values create a tighter stop that reacts to smaller price movements.
Higher values create a wider stop that requires a larger price movement before a directional transition occurs.
ATR Period controls the lookback used to calculate market volatility.
**Optional EMA trend filter**
When enabled:
* Bullish signals require price to be above the selected EMA.
* Bearish signals require price to be below the selected EMA.
The purpose of this filter is to restrict ATR transitions to the selected broader price direction.
**Optional ADX / DMI filter**
When enabled, the indicator requires both directional strength and directional agreement.
For bullish signals:
* ADX must be at or above the selected minimum.
* +DI must be greater than -DI.
For bearish signals:
* ADX must be at or above the selected minimum.
* -DI must be greater than +DI.
DI Length, ADX Smoothing, and Minimum ADX are independently adjustable.
**Optional RSI filter**
The RSI filter provides an additional directional condition.
When enabled:
* Bullish signals require RSI above the selected RSI Direction Level.
* Bearish signals require RSI below that level.
The default center level is 50, but both the RSI length and directional level can be changed.
**Optional volume filter**
When enabled, current volume must be at least the selected multiple of its moving average.
For example, a setting of 1.5 requires current volume to be at least 1.5 times the selected average-volume reference.
If usable volume data is not available for the symbol, the volume condition is bypassed rather than preventing all signals. Volume therefore should be interpreted according to the quality of volume data provided for the selected market.
**Optional candle-quality filter**
This filter evaluates the signal candle itself.
When enabled:
* A bullish signal requires a bullish candle.
* A bearish signal requires a bearish candle.
* The candle body must represent at least the selected percentage of the candle's full high-to-low range.
This can be used to exclude transition candles with relatively small bodies and large wicks.
**Signal cooldown**
The Minimum bars between signals setting can be used to reduce closely spaced signals.
A value of 0 disables the cooldown.
Higher values require the specified number of bars to pass before another signal can be accepted.
**Candle-close confirmation**
Confirm signals on candle close is enabled by default.
When enabled, Buy and Sell signals are accepted only after the current candle is confirmed closed.
When disabled, signal conditions can become true while the realtime candle is still developing. In that mode, a signal may appear or disappear before the candle closes as price changes.
**Visual controls**
The indicator can display:
* Buy and Sell labels.
* The ATR trailing stop.
* The trend EMA.
* A bullish or bearish background.
* An information dashboard.
Most supplementary visuals are optional so users can keep the chart clean and display only the elements relevant to their analysis.
The dashboard can show the current trend state together with ATR, ADX, RSI, sensitivity, and current filter readiness.
**Alerts**
Two alert conditions are included:
* ATR Pulse Buy
* ATR Pulse Sell
These alerts use the same final signal conditions as the chart labels, including any optional filters that the user has enabled.
Users should configure the indicator settings before creating an alert so the alert reflects the intended configuration.
**Pine Screener support**
ATR Pulse can also be used with TradingView's Pine Screener.
The script includes dedicated Buy and Sell alert conditions that can be used as screening filters, allowing users to scan a watchlist for symbols currently meeting the ATR Pulse bullish or bearish conditions.
This can be particularly useful when the same ATR Pulse settings need to be evaluated across multiple symbols instead of checking charts individually.
Pine Screener has its own platform limitations and calculation scope, so screening results should be interpreted within the data and timeframe processed by the Screener.
**Example workflow**
A user who wants the basic ATR transition behavior can leave all optional filters disabled.
A more selective configuration can enable one or more of the following:
* EMA trend alignment.
* ADX / DI directional strength.
* RSI direction.
* Volume expansion.
* Candle quality.
* Signal cooldown.
Each enabled filter becomes an additional requirement for the same underlying ATR transition signal.
There is no single recommended combination for every symbol or timeframe. Settings should be selected according to the market, timeframe, and type of analysis being performed.
**Repainting and realtime behavior**
ATR Pulse does not use future data or lookahead calculations.
With Confirm signals on candle close enabled, signal confirmation occurs only on closed candles.
The ATR trailing stop itself continues to update as new market data arrives.
If candle-close confirmation is disabled, conditions on the realtime candle can change before that candle closes. This is normal realtime behavior and should not be interpreted as a confirmed historical signal until the bar is complete.
Changing indicator settings, symbol, timeframe, or available chart history causes TradingView to recalculate the indicator.
**Limitations**
ATR Pulse is sensitive to volatility and parameter selection.
A tight ATR Sensitivity may produce more frequent transitions in sideways markets, while a wider setting can respond more slowly to directional changes.
Optional filters can reduce the number of signals, but they can also delay or exclude transitions that would otherwise qualify under the core ATR logic.
ADX, RSI, EMA, volume, and candle-quality conditions describe different aspects of current market behavior. Their inclusion does not guarantee that a subsequent price move will continue in the signal direction.
Signals are descriptive outputs of the selected rules, not forecasts of future price movement.
ATR Pulse is an indicator, not a strategy. It does not place orders, provide performance statistics, or claim a particular win rate. It is intended as a configurable technical-analysis and screening tool to help users identify and evaluate ATR-based directional transitions.
インジケーター

All-Markets Movement Extremes ToolA causal all-markets movement tool for identifying retained terminal PEAK/TROUGH extremes and exposing the earliest available confirmation of those extrema after the required price structure develops.
Name:
All-Markets Movement Extremes Tool
Searchable Name:
All-Markets Movement Extremes Tool
Technical Name:
All-Markets Non-Repainting Terminal-to-Causal Directional Movement Extremes Tool
Short title:
Movement Extremes
Summary
All-Markets Movement Extremes Tool identifies terminal peaks and troughs within developing directional movement and preserves the causal confirmation that makes each retained extreme available.
The central difficulty is that a completed extreme and the generated signal capable of establishing that extreme are not necessarily available at the same time.
A trough can already exist before enough upward structure has developed to confirm that the downward movement terminated there.
A peak can already exist before enough downward structure has developed to confirm that the upward movement terminated there.
Price can therefore move meaningfully away from the terminal before the corresponding confirmation becomes available.
The tool is built around that separation.
During an active directional leg, the current extreme remains provisional and can be replaced by a newer same-side high or low.
Once the required opposite structure confirms, the retained extreme becomes:
TROUGH for the completed low of the prior downward movement
PEAK for the completed high of the prior upward movement
The terminal marker remains attached to the retained movement extreme.
The causal confirmation remains attached to the later bar where that extreme became confirmable.
This keeps two important references visible at the same time:
where the directional movement terminated
and
where the corresponding confirmation became available
The confirmed PEAK/TROUGH stream can therefore provide context for directional-movement trading, filtering, confirmation, and broader trading decisions, while the stream itself represents confirmed movement extremes and their causal availability rather than a complete standalone buy/sell signal.
The result is a directional-movement tool that provides:
movement direction and transition context
terminal peak/trough identification
directional-movement trading context
confirmation and filtering context
entry/exit context
movement-cycle review
and comparison of completed movement with what became causally available
Terminal extremes
The script follows an active directional leg and retains its strongest extreme.
During an upward leg, the highest retained high remains the potential terminal PEAK.
During a downward leg, the lowest retained low remains the potential terminal TROUGH.
A newer same-side extreme can replace the previous candidate while that directional movement remains active.
The extreme becomes confirmed only after the required opposite structure develops.
This prevents a temporary move away from a high or low from automatically being treated as the completed terminal.
Causal confirmation
Every confirmed terminal has two important locations.
Terminal
The retained PEAK or TROUGH belonging to the completed directional movement.
Causal confirmation
The later confirmed-bar event where enough completed structure exists to establish that terminal.
The terminal shows where the completed movement ended.
The causal confirmation shows when the script could establish that terminal through its forward process.
Those two points can be close together or separated by several bars.
The optional Causal Confirmation Comparison makes that difference visible directly on the chart.
Earliest available confirmation
The tool attempts to expose a retained terminal on the first confirmed transition that satisfies its active structural requirements.
That does not move the historical terminal forward.
The PEAK or TROUGH remains attached to the completed movement extreme, while the causal marker remains attached to the later confirmation event.
This is what allows the tool to preserve both the final movement location and its actual causal availability.
Directional movement
The PEAK/TROUGH sequence forms a continuing directional structure.
A confirmed TROUGH establishes the completed low of the preceding downward movement.
A confirmed PEAK establishes the completed high of the preceding upward movement.
Consecutive opposite terminals describe the completed movement between retained extrema.
The tool can display those relationships with HOLD paths and directional backgrounds so the broader directional movement remains visible rather than reducing the chart to isolated labels.
Directional-movement trading context
The confirmed extremes and their causal transitions provide directional-movement context that can be examined alongside confirmation rules, filtering, entry/exit context, or other market-state methods.
The value of the output is the movement structure it establishes:
terminal extreme → causal confirmation → directional movement context
That structure remains available for broader trading-related evaluation without changing what the PEAK/TROUGH stream itself represents.
Movement cycles
Consecutive opposite confirmed extrema form completed directional cycles.
The tool keeps two reference systems available.
Terminal-to-terminal
The completed movement between retained extrema.
Confirmation-to-confirmation
The corresponding directional movement between the causal confirmation points.
These measurements can differ substantially because part of the terminal movement can occur before confirmation becomes available.
Last capture / confirm gap
The Movement Cycle page shows Last capture / confirm gap for the most recent completed cycle.
The capture value compares the latest completed terminal-to-terminal directional result with the corresponding confirmation-to-confirmation result when the terminal movement is positive.
The confirm gap shows the difference between those two completed-cycle results.
Together, they provide a compact comparison between the retained movement extremes and the corresponding causal confirmation references.
Unconfirmed context
Not every developing extreme becomes the retained terminal.
An earlier high can be superseded by a higher high.
An earlier low can be superseded by a lower low.
When enabled, the tool can expose this context separately from the confirmed PEAK/TROUGH sequence.
The optional Minimum Reversal Filter can also reject structural transitions that do not meet the selected movement requirement.
Current movement
For the latest confirmed extreme, the tool can compare:
terminal price
confirmation close
current price
terminal-to-confirm move
price change from confirmation to current
directional move from confirmation to current
best move after confirmation
and bars since confirmation
This provides a current directional reference after the extreme has been established.
Status pages
The tool includes four compact status pages:
Summary
Movement Cycle
Timing
Guide
Summary provides the broad state of confirmed extrema and completed movement cycles.
Movement Cycle focuses on the latest terminal, its confirmation, current movement, and the previous completed cycle.
Timing focuses on terminal-to-confirmation separation and structural timing.
Guide provides a compact interpretation of the active PEAK/TROUGH framework.
Alerts
Optional alerts are available for confirmed PEAK and TROUGH events.
The alert occurs when the causal confirmation becomes available.
The terminal remains attached to the retained movement extreme, while the alert reflects the later confirmation event.
This preserves the difference between terminal location and causal availability.
Features
all-markets directional movement framework
retained terminal PEAK identification
retained terminal TROUGH identification
causal confirmed-bar operation
terminal-versus-confirmation separation
Causal Confirmation Comparison
Confirmed Hold Path
Confirmed Hold Background
movement-cycle tracking
terminal-to-current directional movement
confirm-to-current directional movement
best move after confirm
Last capture / confirm gap
Unconfirmed Extreme Context
Minimum Reversal Filter
compact Summary, Movement Cycle, Timing, and Guide pages
confirmed PEAK/TROUGH alerts
Strengths
Terminal Extreme Preservation — the completed PEAK/TROUGH remains anchored to the retained movement endpoint.
Causal Availability — the corresponding confirmation remains separately visible where it actually became available.
Directional Context — the output describes continuing directional movement rather than isolated bar labels.
All-Markets Use — the framework can be applied across different markets because it is based on directional price structure.
Early Causal Exposure — the tool attempts to establish the retained terminal on the first qualifying confirmed transition.
Terminal-versus-Causal Comparison — completed movement and causally available movement remain directly comparable.
Broader Trading Context — the confirmed extrema provide directional, confirmation, filtering, and entry/exit context while retaining their underlying movement-extreme meaning.
Weaknesses
Confirmation Delay — the terminal can exist before enough opposite structure develops to confirm it.
Movement Before Confirmation — part of the next directional movement can occur before the causal confirmation becomes available.
Superseded Extremes — developing terminal candidates can be replaced by newer same-side extremes.
Standalone Trade Outcome Variability — confirmed PEAK/TROUGH extremes can remain structurally reliable movement references while the result of directly trading every confirmation as its own buy/sell action can vary substantially across market conditions.
Structural Dependence — confirmation timing depends on the selected structural requirements.
No Complete Trade Management — position sizing, risk management, stop placement, profit targets, and wider trade-management logic are separate from the movement-extreme output.
Who it’s for
This tool is suited for users interested in:
terminal market peaks and troughs
directional movement trading
movement-transition confirmation
structural filtering
entry/exit context
causal versus completed movement
terminal-to-terminal cycles
confirmation timing
Last capture / confirm gap
and incorporating confirmed extrema into broader trading methods
It is especially relevant when the question is not only:
“Where did the movement terminate?”
but also:
“When did that terminal become causally available?”
Known limitations
The final retained extreme cannot be confirmed until enough opposite structure has developed.
Some movement can therefore occur before confirmation.
Some developing terminal candidates can be superseded.
Some confirmation-to-confirmation cycles can be non-positive.
The distinction between the terminal and the causal confirmation is therefore explicitly preserved as part of the tool's output.
Final note
All-Markets Movement Extremes Tool identifies retained terminal PEAK/TROUGH extremes and exposes the causal confirmation of those extrema.
The terminal remains attached to the completed movement extreme.
The causal confirmation remains attached to the point where the required structure becomes available.
The relationship between those two references provides directional movement context for confirmation, filtering, cycle comparison, and broader trading-related evaluation. インジケーター

Edo Equal Highs/LowsEdo Equal Highs/Lows — Detects Equal Highs and Equal Lows as Resting Liquidity and Flags When Price Takes It
When two swing highs form at the same level, or two swing lows, they create one of the clearest forms of resting liquidity in price action. Traders place their stops just beyond a double top or double bottom, and breakout orders cluster there too — so that matched level becomes a pool of liquidity that price is frequently drawn to take. In the Smart Money Concepts approach these are equal highs (EQH), holding buy-side liquidity above price, and equal lows (EQL), holding sell-side liquidity below it.
Edo Equal Highs/Lows maps these levels automatically and tracks what happens to them. It marks each EQH and EQL when two swings match within an ATR-based tolerance, extends the level as resting liquidity, and flags the exact moment price closes through it and takes that liquidity — all validated on closed bars so the indicator does not repaint. It is the equal-levels specialist of the Edolab structure family, designed to work alongside liquidity sweep and liquidity zone analysis.
EQUAL HIGHS AND EQUAL LOWS
The indicator compares each new swing pivot with the previous one of the same type. When two consecutive swing highs sit at the same price within the tolerance, it draws an Equal Highs (EQH) level — buy-side liquidity resting above. When two swing lows match, it draws an Equal Lows (EQL) level — sell-side liquidity resting below. The level is drawn from the earlier matching pivot and labelled EQH or EQL, extending to the right as a live reference.
THE ATR TOLERANCE
What counts as "equal" is not a single tick but a configurable band. The Equal Tolerance input is expressed as a fraction of ATR (0.10 by default): two swings are treated as equal when their difference is within that fraction of the average true range. A lower value is stricter — only near-perfect matches qualify; a higher value is looser, catching approximate double tops and bottoms. Tying the tolerance to ATR keeps it adaptive across instruments and timeframes, so the same setting behaves consistently whether the chart is a low-volatility index or a fast-moving crypto.
SWING PROFILES
The swings compared for equality come from pivots whose sensitivity is set by the Swing Profile: Scalper (5 bars each side) for short-term levels on low timeframes, Swing (10 bars, the default) for the balanced 4H and daily read, and Long Term (21 bars) for the major levels on weekly and higher horizons.
ACTIVE AND TAKEN
Each equal level lives in one of two states, evaluated on every closed bar. Active: the level is intact, holding its resting liquidity, drawn as a solid coloured line extending to the right — red for EQH, teal for EQL by default. Taken: price has closed through the level and swept the liquidity — the line turns dashed and faded grey and the label gains a ✕. An EQH is taken when price closes above it; an EQL, when price closes below it. Only Active levels count in the panel, since a taken level has already done its job. To keep the chart clean, only the most recent levels per side are kept, up to Max EQ Levels per side (10 by default).
INFORMATION PANEL
The panel condenses the read into a compact table: the number of active EQH and active EQL levels, and the nearest unswept level on each side — the closest Equal Highs above the current price and the closest Equal Lows below it, with their exact prices. Those nearest levels are the most immediate liquidity targets above and below, the quickest way to see where price may be drawn next. The panel sits in any of the four chart corners (Top Right by default), comes in three sizes (Tiny / Small / Normal) and two themes (Dark / Light), and can be hidden entirely.
NO REPAINTING
Equal levels are built on confirmed pivots and their taken state is validated on closed bars, so a level never appears or disappears intrabar. A wick that pierces an equal level but closes back on the same side does not mark it as taken — the indicator waits for the close. There are no higher-timeframe functions: all logic runs on the current chart timeframe.
CONFIGURATION
The inputs are grouped by block. Detection sets the swing profile, the equal tolerance in ATR and the maximum number of levels kept per side. Style exposes the equal highs and equal lows colours, the taken colour, the label size and the Dark/Light theme. Panel controls panel visibility, position and size. The defaults are calibrated to work without adjustment on stocks, crypto, forex, indices and futures, on any timeframe — the inputs most users touch are the Swing Profile and the Equal Tolerance, to set how strict the matching should be.
ALERTS
Four predefined alerts cover the life of an equal level: Equal Highs formed and Equal Lows formed fire when a new EQH or EQL level is drawn; Equal Highs taken and Equal Lows taken fire when price closes through a level and sweeps its liquidity. The formed alerts flag fresh liquidity targets, and the taken alerts fire exactly when that liquidity is swept — often the trigger for a reaction. All alerts fire on bar close, consistent with the indicator's anti-repaint validation.
HOW TO READ IT
Equal highs and lows are liquidity targets, not entries: price is often drawn toward an EQH above or an EQL below to take the stops resting there, so the nearest levels in the panel point to where the move may head next. Watch the take: when price closes through an equal level and it turns Taken, the liquidity has been swept — that sweep frequently precedes a reaction, and classifying it as confirmed or faded turns the event into a fuller read. Trade levels in confluence: an EQL that sits on a demand zone or a higher-timeframe support is a stronger reference than an isolated one. And set inside broader liquidity zones, the equal levels mark precise liquidity pools, completing the liquidity map.
OPEN SOURCE
Edo Equal Highs/Lows is published as a free open source indicator. The full Pine Script is publicly accessible on TradingView for study, adaptation and integration into any workflow. Part of the Edolab Markets free tools ecosystem, with more structure, liquidity and order-flow indicators available on TradingView.
This indicator is a technical analysis tool for educational and informational purposes only. It does not generate automatic buy or sell signals and should not be considered financial advice. Trading financial markets involves significant risk of capital loss. Past performance does not guarantee future results. Always use proper risk management.
インジケーター

QuantLine Auction State EngineQuantLine Auction State Engine asks one question: what is price doing with the
edge of its prior range?
Many breakout tools mark the first trade above a rolling high or below a rolling
low. That does not distinguish a wick from acceptance, and the rolling level can
move while the event is still being judged. This script separates the process
into explicit states and locks the point-in-time range when a test begins.
States
- BAL — price remains in balance inside the prior range.
- CMP — balance with low ATR percentile: potential energy, no direction.
- T↑ / T↓ — price is testing beyond a locked range edge; acceptance is not yet confirmed.
- A↑ / A↓ — the required closes remain outside the edge and the move passes the selected efficiency and relative-volume checks.
- FA↑ / FA↓ — price returns inside after an attempted auction beyond the edge.
- RT↑ / RT↓ — the first retest holds on the accepted side of the locked edge.
How it is calculated
1. The reference range is the highest high and lowest low of prior bars. The
current bar is excluded.
2. When a close moves beyond an edge by the selected ATR distance, both edges
are locked. They cannot slide while the test is active.
3. Acceptance requires a user-selected number of closes beyond the locked edge.
4. Kaufman-style efficiency ratio separates directional travel from a noisy
path. Optional relative volume checks whether participation is above its
recent average.
5. ATR percentile identifies compression. It does not predict the direction of
the next expansion.
6. A return inside the edge marks a failed auction. After acceptance, the first
touch that closes on the accepted side marks a held retest.
State transitions and alerts occur on confirmed bars. No future bars are used,
and the active range is locked at the time of the test.
How to use it
The tool is a market-structure classifier. It can help a trader distinguish
between “price traded beyond a level” and “price was accepted beyond a level.”
It does not provide an entry, stop, target, position size, probability, or
profitability claim.
All defaults are round research hypotheses and are user-adjustable. Market
quality, fees, slippage and higher-timeframe context remain outside this script.
Educational context only. Not financial advice. インジケーター

Smart Money Structure & Dynamic Equilibrium Suite [ICT Pro]Smart Money Structure & Dynamic Equilibrium Suite
Overview & Purpose
Smart Money Structure & Dynamic Equilibrium Suite is an advanced, high-precision technical analysis visual tool engineered for Pine Script v6. Designed specifically for modern Price Action, Smart Money Concepts (SMC), and Inner Circle Trader (ICT) analysts, this script provides clean visual overlays for key liquidity boundaries, trend momentum, and range midpoints without cluttering chart aesthetics.
Instead of displaying unnecessary lines or repainting historical indicators, this suite focuses purely on real-time structural clarity, dynamic range evaluation, and institutional volume tracking.
Key Features & Technical Components
1. Auto-Swept Previous Day High & Low (PDH / PDL)
- Institutional Liquidity Levels: Automatically tracks and plots the Previous Day High (PDH) and Previous Day Low (PDL) as horizontal daily boundaries.
- Dynamic Disappear / Swept Logic: Once price crosses or sweeps a daily liquidity level during an active trading session, the swept level automatically vanishes from the chart. This ensures your view remains clean and focused only on active, unmitigated daily liquidity targets.
- Full Visual Customization: Adjust line colors, text colors, line thickness, and stroke style (Solid, Dashed, or Dotted) directly from the inputs menu.
2. Connected Dynamic Equilibrium Range
- 50% Midpoint Calculation: Continuously calculates the real-time 50% Equilibrium price zone based on customizable local swing lookback periods.
- Connected Line Extension: Features an extended horizontal line that connects seamlessly to the "EQUILIBRIUM" text label on the right margin, eliminating visual gaps or confusion about range boundaries.
3. Smart Volume Spike & Trend Candle Glow Engine
- Directional Candle Glow: Color-codes chart candles based on dual Moving Average alignments—Neon Green during bullish momentum and Neon Red during bearish momentum.
- Golden Volume Spike Highlighting: Dynamically overlays high-volume institutional candles in a distinct Glowing Gold color whenever current bar volume exceeds customizable moving average multipliers. This makes it effortless to spot institutional expansion bars.
4. Major Intermediate Term Swing Badges (ITH / ITL)
- Structural Pivot Badges: Automatically flags confirmed major high and low points using clear ITH (Intermediate Term High) and ITL (Intermediate Term Low) badges.
- Customizable Sensitivity: Adjust the pivot lookback sensitivity to tailor the detector for scalp, intraday, or higher-timeframe swing trading.
Full Inputs & Parameter Configuration Guide
1. Moving Average & Ribbon Controls
- Show MAs: Enables or disables the visibility of the two core Moving Averages on the chart.
- MA Type: Choose between EMA (Exponential), SMA (Simple), or WMA (Weighted) calculation methods.
- Fast MA Length: Defines the lookback period for the fast directional moving average (Default: 9).
- Slow MA Length: Defines the lookback period for the baseline moving average (Default: 21).
- MA Line Thickness: Adjusts stroke width for both moving averages (1 to 4 pixels).
- Show MA Ribbon Glow: Toggles the background color fill between the Fast and Slow MAs on or off.
2. Smart Candle Glow Settings
- Enable Trend Candle Coloring: Toggles custom candle coloring based on MA trend direction.
- Highlight Volume Spikes: Turns on or off the special Golden Candle overlay for high-volume bars.
- Volume Spike Threshold: Set the volume multiplier relative to the 20-period volume average (Default: 1.8x).
3. Equilibrium Settings
- Show Equilibrium Level: Turns the 50% range midpoint line on or off.
- Equilibrium Lookback Period: Sets the number of historical bars evaluated to compute the local range midpoint.
- Line Style & Thickness: Customize whether the line appears Solid, Dashed, or Dotted, as well as its thickness and color.
4. Daily Liquidity Settings (PDH / PDL)
- Show PDH & PDL: Toggles display of Previous Day High and Low levels.
- PDH/PDL Line Style & Thickness: Select custom visual preferences for daily boundaries.
- Color Pickers: Separate line and text color options for both High and Low daily levels.
Step-by-Step Guide: How to Use This Tool Effectively
Step 1: Determine Structural Bias
Use the Trend Ribbon Cloud and candle coloring to establish current market bias. Green candles and ribbons indicate bullish control, while Red candles signify bearish dominance.
Step 2: Monitor Daily Liquidity Targets
Observe active PDH and PDL lines as primary liquidity pools. When a line disappears from your chart, it confirms that liquidity at that level has been swept by price.
Step 3: Evaluate Value Zones
Refer to the Equilibrium step-line to determine whether current price trades above 50% (Premium territory) or below 50% (Discount territory) relative to recent market swings.
Step 4: Identify Institutional Volume Expansion
Pay close attention to Glowing Gold candles. Volume spikes often coincide with smart money entries, order block mitigations, or explosive range breakouts.
Trading Disclaimer & Risk Warning (House Rules Compliance)
Educational Disclaimer:
This script is strictly a visual analysis and charting utility designed for technical educational purposes. It does NOT offer financial advice, trade signals, investment recommendations, or automated buy/sell algorithms.
Risk Acknowledgment:
Financial trading carries inherent risk, and historical market behavior depicted by visual indicators does not guarantee future results. Users are fully responsible for their own trading decisions and risk management strategies. インジケーター

FRFFlat Range Finder (FRF)
FRF is a high-performance analysis tool developed to detect consolidation (sideways movement) zones in the market.
About FRF Drawing
Purpose and Usage:
The primary purpose of the FRF drawing is to objectively identify zones where the price is compressed within a channel without forming a significant trend over a certain period. This channel allows you to visualize the "uncertain" or "rest" phase of the market.
Update Mechanism:
The FRF drawing periodically scans within the "Min FRF Search Length" and "MAX FRF Search Length" range defined by the system. At each new bar close, the most appropriate channel length is recalculated using the "Channel Fixed R" coefficient. If a stronger consolidation structure forms in the current data, the channel automatically updates itself to adapt to this new data.
Fibonacci & Risk/Reward Box
This feature helps you determine entry, target, and stop-loss levels by using the boundaries of the detected channel.
Why and How to Use It?
Why: In moments of market uncertainty, it provides a disciplined Risk/Reward management based on the channel's own internal dynamics (statistical deviations) rather than arbitrary levels.
How: Activate the box by selecting "Long" or "Short" from the "Position Mode" setting. The box uses the 0.236 Fibonacci ratio as the entry level. The badges on the box dynamically display the current Open P&L status and the Risk/Reward Ratio at the end of the channel.
⚠️ WARNING: THE FIBONACCI & RISK BOX IS AUTOMATICALLY RECALCULATED UPON EVERY NEW CHANNEL DETECTION OR CHANGE IN PRICE DATA. PREVIOUS BOXES AND LABELS ARE DELETED AND REDRAWN ACCORDING TO THE MOST CURRENT CHANNEL DATA. TO AVOID LOSING YOUR PREVIOUS TRADE ANALYSES, ENSURE YOU ARE TRACKING THE LATEST BOX DATA.
Technical Specifications of the Indicator
FRF is equipped with the following capabilities within the classic TradingView library:
MTF (Multi-Timeframe) Support: The indicator can process data from a different timeframe regardless of the current timeframe. You can select your desired TF by activating the Enable MTF option.
Dynamic Channel Fixed R Analysis: This is a statistical metric used to determine the strength of the consolidation. You can optimize how "flat" the channel should be using the Target Threshold <= this setting.
Breakout Alerts: When the upper or lower boundaries of the channel are broken by the body of a candle, the indicator triggers the alert() function to send you a notification.
Advanced Visualizations:
Debug Table: You can view the statistical data of the channel in real-time in the corner of your screen.
Channel Customization: You can fully adjust the channel line style, transparency, and fill colors according to your personal chart preferences.
Midline: You can display the middle baseline within the channel, allowing you to distinguish more clearly which half of the channel the price is dominant in.
Debugging: You can toggle the labels on the bars to understand the indicator's operational logic by using the Show Debug Label option.
This indicator is not a prediction tool, but a data-driven channel detection engine. インジケーター

DUAL Relative Strength Index (Settings: 14 14 28)RSI with Dual Smoothing MA
A modified version of TradingView's built-in RSI indicator with a second RSI-based moving average added.
The standard RSI includes a single smoothing MA. This version adds a second, fully independent one — so you can run a fast MA alongside a slow MA and compare the RSI's short-term movement against its longer-term trend in the same pane.
Features
Two separate RSI-based MAs, each with its own type and length (SMA, EMA, SMMA/RMA, WMA, VWMA)
Independent color selection for each line
Either MA can be switched off entirely by setting its type to "None"
Optional Bollinger Bands on the first MA (as in the original)
Regular bullish/bearish divergence detection and alerts (as in the original)
Settings
RSI Settings: RSI length, source, divergence calculation
Smoothing: first MA — defaults to 14 SMA, yellow
Smoothing 2: second MA — defaults to 28 SMA, orange
Ways to use it
The fast MA crossing above the slow MA can be read as strengthening momentum; crossing below, as weakening
Both MAs sitting on the same side of the 50 level can serve as directional confirmation
The distance between the two lines gives a sense of how quickly momentum is shifting
This indicator does not generate standalone buy or sell signals. It is intended as a confirmation tool within your own system, and settings should be tested against the symbol and timeframe you trade.
Based on TradingView's open-source built-in "Relative Strength Index" indicator.
İngilizce:
Ways to use it
The fast MA crossing above the slow MA can be read as strengthening momentum; crossing below, as weakening
Crossovers that occur in the extreme zones (below 30 / above 70) tend to be more meaningful than those in the middle range (roughly 40–60), where the RSI often moves sideways and the MAs cross back and forth, producing noise
Both MAs sitting on the same side of the 50 level can serve as directional confirmation
The distance between the two lines gives a sense of how quickly momentum is shifting インジケーター

インジケーター

Professional Volume Delta & CVD SuiteEnglish Version
Professional Volume Delta & CVD Suite
Professional Volume Delta & CVD Suite is an all-in-one order flow and volume analysis indicator engineered to deliver institutional-grade market context across any timeframe. By combining Intrabar Volume Delta estimation, Cumulative Volume Delta (CVD), Order Flow Divergences, Volume Climax detection, and a dynamic Real-Time Data Table, this script condenses multiple advanced trading tools into a single, clean workspace.
Key Features & Internal Mechanics
Dual Volume Delta Calculation Engine:
Wick-Based Estimation (Recommended): Evaluates intrabar price action by analyzing high, low, and close prices (volume * (close - low) / (high - low)) to accurately distribute buying and selling volume within each candle.
Color-Based Alternative: Calculates net volume based strictly on candle close vs. open.
Automated Multi-Timeframe Adaptation (Auto-Adjust):
Intraday Mode (1m - 1H): Calculates a Session CVD that resets to 0 at the start of each trading day (00:00 UTC), ideal for tracking day-trading order flow absorption. Divergence lookback is set to 5 bars, Volume MA to 20 periods, and Climax Multiplier to 2.0x.
Daily & Weekly Mode (1D, 1W, 1M): Automatically switches to a Continuous Accumulated CVD (no daily reset) to track multi-week accumulation/distribution cycles. Sets the volume Moving Average to 21 periods (1 trading month) and divergence lookback to 10 bars for high-conviction swing signals.
In-Bar Buyer/Seller Percentage Labels:
Plots exact percentages of buying (%C) and selling (%V) pressure on each individual volume bar.
Fully customizable display: show both percentages, only the winning side, adjust font sizes, toggle % symbols, and control vertical offset distance.
Algorithmic Price vs. Delta Divergence Detection:
Bullish Divergence (Green Arrow): Triggers below the volume histogram when price marks a lower low but Volume Delta forms a higher low (indicates institutional supply absorption).
Bearish Divergence (Red Arrow): Triggers above the volume histogram when price marks a higher high but Volume Delta forms a lower high (indicates demand exhaustion/distribution).
Volume Climax & Trend Filters:
Volume Moving Average (MA): Smoothed volume baseline (default 21 periods for daily charts).
Volume Climax Highlights: Highlights exceptional volume spikes in bright gold when total volume exceeds the moving average by the configured multiplier (e.g., 1.8x or 2.0x), signaling heavy institutional positioning or potential exhaustion.
Dynamic Real-Time Information Table:
Candle Status: Live indicator (Bullish 🟢 / Bearish 🔴).
% Buyer / % Seller: Exact percentage breakdown for the current open candle.
Candle Delta: Net delta percentage of the active bar.
Session CVD / Accumulated CVD: Shows continuous capital flow adapted to the current timeframe.
Volume Activity: Displays current volume activity relative to the MA percentage or alerts CLIMAX ⚡.
Inputs & Customization Settings
Timeframe Configuration: Toggle auto-adaptation or manually enforce Intraday / Daily modes.
Calculations & Display: Choose calculation methods, toggle label modes, change text sizes, and adjust label offsets.
Divergences & MA Filters: Customize MA period, divergence lookback window (bars), and climax thresholds.
Table & Aesthetics: Full control over UI table placement (9 anchor points), table size, row visibility, and custom color palettes for buyers, sellers, climax bars, and divergence shapes.
Versión en Español
Professional Volume Delta & CVD Suite
Professional Volume Delta & CVD Suite es un indicador de análisis de flujo de órdenes (order flow) y volumen todo-en-uno, diseñado para proporcionar contexto de nivel institucional en cualquier marco temporal. Al combinar la estimación de Delta por vela, el Delta Acumulado (CVD), Divergencias de Order Flow, detección de Clímax de Volumen y una Tabla de Datos en Tiempo Real, este script sintetiza múltiples herramientas avanzadas en un único panel limpio y eficiente.
Características Principales y Mecánica Interna
Motor Doble de Cálculo de Volumen Delta:
Estimación por Mechas (Recomendado): Evalúa la acción del precio dentro de la vela analizando máximos, mínimos y cierres (volumen * (cierre - mínimo) / (máximo - mínimo)) para distribuir de manera precisa el volumen comprador y vendedor.
Alternativa por Color de Vela: Calcula el volumen neto basándose estrictamente en el cierre vs. la apertura.
Adaptación Automática según Temporalidad (Auto-Adjust):
Modo Intradía (1m - 1H): Calcula un CVD de Sesión que se reinicia a 0 al inicio de cada jornada (00:00 UTC), ideal para medir la absorción en el day trading. Configura la evaluación de divergencias en 5 velas, la Media Móvil en 20 períodos y el Clímax en 2.0x.
Modo Diario y Semanal (1D, 1W, 1M): Cambia automáticamente a un CVD Acumulado Continuo (sin reseteo diario) para medir ciclos de acumulación y distribución de mediano/largo plazo. Ajusta la Media Móvil de volumen a 21 ruedas (1 mes bursátil) y la evaluación de divergencias a 10 velas para señales swing de alta probabilidad.
Etiquetas de Porcentaje Comprador/Vendedor en Barras:
Muestra en tiempo real los porcentajes exactos de presión compradora (%C) y vendedora (%V) sobre cada barra de volumen.
Personalización visual total: muestra ambos porcentajes, solo el lado ganador, ajusta el tamaño de texto, activa/desactiva el símbolo % y modifica la distancia vertical.
Detección Algorítmica de Divergencias (Precio vs. Delta):
Divergencia Alcista (Flecha Verde): Salta debajo del histograma cuando el precio hace un mínimo más bajo pero el Delta de Volumen hace un mínimo más alto (señal de absorción de oferta institucional).
Divergencia Bajista (Flecha Roja): Salta arriba del histograma cuando el precio marca un máximo más alto pero el Delta de Volumen marca un máximo más bajo (señal de agotamiento de demanda o distribución).
Clímax de Volumen y Filtros de Tendencia:
Media Móvil de Volumen (MA): Línea base del volumen promedio (fijada en 21 ruedas para gráficos diarios).
Resaltado de Clímax: Pinta las barras en color dorado brillante cuando el volumen total supera drásticamente la media móvil según el multiplicador configurado (1.8x o 2.0x), alertando sobre volumen institucional masivo o posible agotamiento.
Tabla Informativa Dinámica en Tiempo Real:
Estado Vela: Indicador en vivo del sesgo actual (ALCISTA 🟢 / BAJISTA 🔴).
% Comprador / % Vendedor: Desglose porcentual exacto de la vela en formación.
Delta Vela: Porcentaje de delta neto de la barra activa.
CVD Sesión / CVD Acumulado: Flujo continuo de dinero adaptado dinámicamente según la temporalidad del gráfico.
Actividad Vol.: Muestra la actividad de volumen respecto a la Media Móvil o la alerta de CLÍMAX ⚡.
Parámetros y Opciones de Configuración
Configuración de Temporalidad: Activa/desactiva la autoconfiguración o fuerza manualmente los modos Intradía o Diario/Semanal.
Cálculos y Visualización: Elección del método de cálculo, formatos de etiqueta, tamaños de texto y distancias en el gráfico.
Divergencias y Filtros de MA: Ajuste de períodos de Media Móvil, rango de velas para divergencias (lookback) y umbrales de clímax.
Estética de la Tabla: Control total sobre la posición de la tabla (9 anclajes), tamaño de celda, visibilidad de filas y paletas de colores totalmente personalizables (compradores, vendedores, clímax y flechas de divergencia).
インジケーター

VWAP Regime AI [AxeAlgo]OVERVIEW
VWAP Regime AI is an anchored VWAP (Volume-Weighted Average Price) with
standard-deviation bands, enhanced by a native, from-scratch k-means
clustering engine that classifies recent market volatility into three
regimes — Low, Medium, and High — and adapts the indicator's behavior
based on which regime is currently active.
At its foundation this is the same tool institutional desks use every
day: a running volume-weighted average price with bands around it, used
to judge where "fair value" sits and how far price has stretched away
from it. What this script adds on top is a genuine unsupervised machine
learning step that reads the market's own volatility and lets that
reading drive three things: how wide the bands are, which signal logic
is active, and how much the indicator should trust its own regime call
before acting on it.
This script is free and open-source. All calculations happen natively in
Pine Script on your own chart data.
============================================================
FULL TRANSPARENCY ABOUT THE "AI" IN THIS SCRIPT
============================================================
Pine Script cannot call an LLM, a remote model, or any external AI
service — TradingView does not allow outbound network requests from
indicators, and this script makes none. There is no hidden API call,
no "black box," and nothing running outside of what you can read in the
source code.
What "AI" means here specifically: this script implements k-means
clustering — a well-established unsupervised machine learning algorithm
— entirely in native Pine Script math and arrays. It groups a rolling
window of recent ATR (volatility) readings into three clusters by
repeatedly assigning each reading to its nearest cluster center and then
recomputing each center as the mean of everything assigned to it. This
publication states plainly what is and is not happening so nobody
mistakes this for predictive AI, sentiment analysis, or anything that
consults external data or forecasts the future. It classifies what has
already happened; it does not predict what will happen next.
============================================================
HOW IT WORKS
============================================================
VWAP & Standard Deviation Bands
--------------------------------
The core VWAP resets at the start of each new anchor period (Session,
Week, Month, Quarter, or Year — configurable) and accumulates a running
volume-weighted average from there. Standard deviation is calculated
using the same volume-weighted variance formula TradingView's own
built-in VWAP-with-bands tool. Up to three bands can be shown,
each set at a configurable standard-deviation distance from VWAP.
AI Volatility Clustering (K-Means)
------------------------------------
A rolling window of recent ATR readings (length and window size are both
configurable) is periodically re-clustered into three groups — Low,
Medium, High — using k-means. Reclustering happens every N bars rather
than every single bar, purely for performance; the live classification
of the current bar still updates continuously between reclusters.
Alongside the classification, the script computes a Confidence score
(0-100%): how much closer the current reading sits to its nearest
cluster than to its second-nearest one. A reading sitting right on a
cluster's center scores near 100%; a reading sitting on the boundary
between two regimes — an effectively ambiguous call — scores near 0%.
A "Minimum Regime Confidence" input lets you require a minimum score
before the regime is allowed to influence anything else in the script,
so an unconfident, boundary-line classification doesn't silently drive
behavior.
Adaptive Band Width
----------------------
When enabled, the standard-deviation band multipliers are scaled by a
per-regime factor: tighter in Low volatility, wider in High volatility,
instead of one fixed multiplier that's too tight in some conditions and
too loose in others. This only engages once the AI is both ready
(its lookback window has filled and it has run at least once) and
confident, per the Minimum Regime Confidence setting above.
Signal Logic — Mean Reversion, Breakout, or Auto
----------------------------------------------------
Two independent signal styles are built in, both measured off Band 2:
Mean Reversion looks for price crossing back inside the band from
outside (betting an extreme move snaps back toward VWAP); Breakout looks
for price crossing outside the band (betting the move has momentum to
keep running). "Auto" mode lets the detected volatility regime decide
which logic applies bar by bar — Low/Medium volatility defaults to Mean
Reversion, High volatility defaults to Breakout — falling back to Mean
Reversion whenever the AI isn't ready or confident enough to trust.
Three independent, stackable filters reduce noise on top of the raw
band cross:
- Bar-Close Confirmation: a cross only counts once the bar has fully
closed, filtering out intrabar wicks that reverse before the close.
- Signal Cooldown: blocks a new signal, in either direction, for a
configurable number of bars after the last one — aimed directly at
whipsaw (price crossing back and forth across a band repeatedly).
- Band Cross Buffer (hysteresis): requires price to clear a band by a
small extra distance, in standard deviations, rather than an exact
touch, so noise sitting right on the line doesn't keep re-triggering
crosses back and forth.
AI Volume Confirmation Filter
---------------------------------
The same k-means engine used for volatility is optionally reused on raw
volume, classifying each bar's volume as Low, Normal, or High. When
enabled, signals are only allowed on Normal-or-above volume, filtering
out low-conviction moves.
Secondary VWAP
-----------------
An optional second VWAP anchored to a different (typically higher)
period can be plotted alongside the primary one — for example a Weekly
VWAP behind a Session VWAP — for confluence, since multiple VWAP anchors
are commonly watched together rather than trusting a single one in
isolation. It is a reference line only; no bands are drawn for it.
Signal Track Record
-----------------------
An on-chart scorecard tracks, in a simple and fully model-free way, how
the signals have actually performed: each signal opens a virtual
position at that bar's close, and the next opposite-direction signal
closes it out, scored as a win or a loss purely on which way price
moved in between. No target or stop-loss assumption is built into this
score — see the Limitations section below for exactly what this number
does and does not tell you.
Status Table
---------------
An optional on-chart table shows the current regime and its confidence,
the active band scale, the current VWAP value, a "Stretch Score" (see
below), and the Signal Track Record numbers, all in one place.
Stretch Score
----------------
A signed z-score of how many standard deviations price currently sits
from VWAP. Because it's measured in the same standard deviations the
bands are drawn in, it stays consistent with whatever the adaptive band
width currently has in effect — a reading of +2.00 always means "sitting
on Band 2," whether that band is currently tight or wide.
============================================================
HOW TO USE THIS INDICATOR
============================================================
1. Start with the default settings and watch the status table for a
while before changing anything. Let the AI Volatility Clustering
lookback window fill (the table will show "Calibrating..." until it
has enough data) so the regime classification is meaningful.
2. Decide whether you want Mean Reversion, Breakout, or Auto signal
logic. Auto is a reasonable starting point since it adapts to
detected conditions automatically.
3. Watch the Confidence score alongside the regime label. If confidence
is frequently low on your instrument/timeframe, consider raising the
Minimum Regime Confidence input so the indicator falls back to
neutral behavior more readily instead of acting on ambiguous calls.
4. Use the Stretch Score to judge how extended price currently is
relative to VWAP in a way that stays consistent even as band width
adapts.
5. Treat the Signal Track Record as a rough, ongoing sanity check on
signal quality — not a backtest and not a promise (see Limitations).
6. This is a visual/analytical tool, not an auto-trading system. It
does not place trades. Any alerts it can generate are notifications
only.
============================================================
INPUT GROUPS (SUMMARY)
============================================================
VWAP Settings
- Anchor Period (Session / Week / Month / Quarter / Year)
- Source price used for the VWAP calculation
Secondary VWAP (Confluence)
- Show/hide toggle, its own anchor period, and its own color
Standard Deviation Bands
- Independent show/hide and distance (in standard deviations) for
three bands, plus a toggle for the gradient fill shading around them
AI Volatility Clustering (K-Means)
- Enable/disable the clustering engine
- ATR length used as the raw volatility reading that gets clustered
- Clustering lookback window (bars) and reclustering frequency
- Number of k-means refinement iterations per reclustering
- Adaptive band width toggle and the three per-regime scale factors
- Minimum Regime Confidence threshold
Signals
- Show/hide signal markers
- Signal Mode (Mean Reversion / Breakout / Auto)
- Volume confirmation filter toggle
- Bar-close confirmation toggle
- Signal cooldown (bars)
- Band cross buffer (hysteresis, in standard deviations)
Visuals
- Regime background highlight toggle
- Status table toggle and Signal Track Record toggle
- Colors for VWAP, each band, each regime, and each signal direction
============================================================
REPAINTING & REAL-TIME BEHAVIOR
============================================================
This script does not use any higher-timeframe security() calls and does
not look ahead — every value at every historical bar is a function of
data available up to and including that bar. Once a historical bar is
confirmed, its VWAP, bands, regime classification, and signals do not
change on subsequent chart loads or reloads.
Like any real-time indicator, values on the currently forming (unclosed)
bar update as new price/volume ticks arrive, and will settle once that
bar closes — this is standard behavior for any live indicator, not
repainting of historical data. If you want signal markers to appear only
after a bar has fully closed rather than updating intrabar, keep the
"Require Bar Close Confirmation" input enabled (it is on by default).
============================================================
LIMITATIONS — PLEASE READ
============================================================
- The Signal Track Record is a simplified, model-free heuristic, not a
backtest. It ignores commissions, spread, slippage, position sizing,
and any stop-loss/take-profit logic, and it scores a "trade" purely by
whether price was above or below the entry price when the next
opposite signal fired. It exists to give a rough, ongoing sense of
signal direction quality — it is not a performance guarantee and
should not be relied on as one.
- K-means clustering, like any clustering method, can produce a
misleadingly high confidence score if recent volatility (or volume)
readings happen to be nearly constant for an extended window — a rare
condition, more likely on thinly-traded instruments, but worth being
aware of.
- Regime classification and adaptive behavior depend on the Clustering
Lookback window filling with data first; expect "Calibrating..." on a
freshly loaded chart or a short history until then.
- This is a discretionary analysis tool intended to support your own
judgment, not a mechanical, guaranteed-signal system. No combination
of settings eliminates false signals entirely, which is why several
independent, adjustable filters (bar-close confirmation, cooldown,
hysteresis buffer, volume confirmation, regime confidence threshold)
are provided rather than relied on individually.
============================================================
RISK DISCLAIMER
============================================================
This script is provided for educational and informational purposes
only. It is not financial advice, and it is not a recommendation to buy
or sell any security or instrument. Trading and investing involve
substantial risk of loss and are not suitable for every investor. Past
performance — whether real, simulated, or shown via the on-chart Signal
Track Record — is not indicative of future results. Always do your own
research and consider consulting a licensed financial advisor before
making trading decisions. Use this indicator, and any alerts it
generates, entirely at your own risk. インジケーター

EMA Reversal Squeeze K8EEMA Reversal Squeeze K8E
The EMA Reversal Squeeze K8E is designed to identify potential momentum reversals by detecting a specific sequence of EMA compression and directional flipping.
Works on lower time frames only
The indicator monitors the 9 EMA, 20 EMA, and 50 EMA internally and looks for situations where the three averages come tightly together before reversing their order.
How LONG signals work
A LONG setup begins when:
EMA 9 < EMA 20 < EMA 50
All three EMAs are within 1 point of each other
The EMAs compress further to within 0.5 points
The EMA structure then flips to EMA 9 > EMA 20 > EMA 50
The final flip occurs while the EMAs remain within 1 point
The indicator then prints a LONG signal on the first qualifying candle.
How SHORT signals work
A SHORT setup is the exact opposite:
EMA 9 > EMA 20 > EMA 50
All three EMAs are within 1 point
The EMAs compress to within 0.5 points
The EMA structure flips to EMA 9 < EMA 20 < EMA 50
The final flip occurs while the EMAs remain within 1 point
The indicator then prints a SHORT signal on the first qualifying candle.
Why the squeeze matters
The idea behind the setup is that when the 9, 20, and 50 EMAs become extremely compressed, the market is showing a period of reduced separation between short-, medium-, and longer-term momentum.
When that compression is followed by a complete EMA order reversal, it can indicate that momentum is transitioning to the opposite direction.
The EMA lines are intentionally hidden from the chart so the indicator provides clean LONG and SHORT signals without clutter.
Note: This indicator is a technical analysis tool and should not be considered financial advice. Signals should be evaluated alongside price action, market structure, volatility, session levels, and your own risk-management rules. インジケーター
