Multi-TF Keltner Heatmap# Multi-TF Keltner Heatmap
A multi-timeframe volatility structure indicator designed to show where momentum pivots are forming across timeframes.
Instead of plotting a single Keltner Channel, this script overlays Keltner envelopes from 12 timeframes simultaneously, allowing traders to see when lower timeframe volatility begins pivoting relative to higher timeframe structure.
For options traders, these pivot points often represent the moments where momentum changes fastest while options are still relatively cheap.
The goal is to identify the earliest structural shift in volatility expansion before the larger move becomes obvious.
## Core Idea
Momentum rarely appears suddenly on higher timeframes.
Instead, it typically builds from smaller timeframes upward.
Lower timeframes begin expanding volatility until they interact with or surpass the volatility boundaries of larger timeframes.
When this occurs, the script identifies it as a pivot event.
A pivot means the shorter timeframe volatility envelope has reached or crossed the adjacent higher timeframe envelope, indicating that momentum pressure is shifting.
As these pivots propagate upward through the timeframe ladder, a momentum chain forms.
This chain represents how many layers of the market structure are currently shifting direction.
## Timeframes Included
The script pulls Keltner Channel data from the following timeframes:
- 1 Minute
- 3 Minute
- 5 Minute
- 10 Minute
- 15 Minute
- 30 Minute
- 45 Minute
- 1 Hour
- 2 Hour
- 4 Hour
- 1 Day
- 1 Week
These timeframes together create a stacked volatility structure showing how pressure builds through the market.
## Keltner Channel Construction
Each timeframe uses the same parameters.
Basis
EMA (default length: 200)
Volatility Envelope
ATR (default length: 200)
Bandwidth Multiplier
ATR × 8
These intentionally large settings create structural volatility envelopes rather than short-term reactive channels.
The focus is on major volatility shifts rather than micro fluctuations.
## Visual Structure
The indicator uses color to separate layers of the timeframe hierarchy.
### White Bands (1m – 15m)
These represent short-term market microstructure.
They allow traders to see:
- short-term compression
- micro volatility expansion
- early directional pressure
Opacity is reduced so these bands remain informational rather than dominant.
### Intermediate Layer (30m / 45m)
Upper bands are colored green.
Lower bands are colored red.
These timeframes often act as the bridge between intraday volatility and higher timeframe momentum.
When price begins interacting strongly with these bands, it often signals that pressure is building toward a larger pivot.
### Higher Timeframe Bands (1H – 1W)
Higher timeframe bands are hidden by default.
They only appear when a pivot condition occurs.
A pivot occurs when:
Shorter timeframe upper band ≥ adjacent higher timeframe upper band
or
Shorter timeframe lower band ≤ adjacent higher timeframe lower band
Example:
45m upper ≥ 1H upper
When this happens, the 1H upper band becomes visible.
This signals that short-term volatility is now interacting with higher timeframe structure.
## Pivot Chain
Momentum shifts are tracked using adjacent timeframe pivots.
Upper band pivots follow this sequence:
- 45m → 1H
- 1H → 2H
- 2H → 4H
- 4H → 1D
- 1D → 1W
Lower band pivots follow the same sequence.
This adjacency logic reflects how momentum realistically propagates through the market rather than skipping timeframes.
## Pivot Chain Depth
The indicator calculates two values shown in the status line and data window.
Bull Chain
Number of upward pivot steps currently active.
Example:
45m pivoting above 1H
1H pivoting above 2H
2H pivoting above 4H
Bull Chain = 3
Bear Chain
Number of downward pivot steps currently active.
Example:
45m pivoting below 1H
1H pivoting below 2H
2H pivoting below 4H
Bear Chain = 3
## Interpreting Chain Depth
Lower chain values typically indicate:
- localized volatility
- range conditions
- early momentum shifts
Higher chain values indicate:
- stronger structural alignment
- expanding volatility
- sustained directional momentum
Deep pivot chains are relatively rare and often occur during:
- breakouts
- strong trend continuation
- macro directional moves
## Why This Matters for Options
Options traders benefit most when they can identify large momentum shifts early, before volatility expansion fully develops.
When lower timeframes begin pivoting relative to higher timeframe envelopes, it often means:
- directional pressure is building
- volatility expansion may follow
- option pricing has not fully reacted yet
This creates the opportunity to enter positions before volatility and delta expansion make contracts expensive.
## Practical Uses
This indicator can help traders:
- identify early momentum pivots
- visualize multi-timeframe volatility alignment
- detect volatility expansion before breakouts
- confirm trend continuation across timeframes
It is particularly useful when looking for high momentum opportunities while options remain relatively inexpensive.
## Conceptual Summary
Momentum builds from smaller timeframes upward.
When lower timeframe volatility begins interacting with and pivoting against larger timeframe envelopes, the market is often entering a structural shift phase.
This indicator visualizes that process so traders can see momentum transitions while they are still forming. อินดิเคเตอร์

Pattern Recognition Signals | ProjectSyndicatePattern Recognition Signals automatically identifies and validates high-probability, non-repainting Double Top and Double Bottom patterns. It filters for structural quality, calculates adaptive take-profit and stop-loss zones based on Average Daily Range (ADR), and presents a complete statistical breakdown on a non-intrusive dashboard to provide a quantifiable edge.
🧠 NRP Multi-Wave Detection — identifies classic Double (W/M) and Triple (W/M) patterns using a non-repainting pivot engine, ensuring signals are confirmed and stable.
🎯 ADR-Adaptive TP/SL Zones — automatically calculates and plots TP1, TP2, and SL zones based on a percentage of the 10-day ADR, allowing the strategy to dynamically adapt to any asset's volatility.
🎨 Direction-Matched Colors — Bullish pattern labels are colored green to match the TP zones, and Bearish labels are colored red to match the SL zone, providing instant visual confirmation of trade direction.
📊 Full Performance Dashboard — provides a complete statistical overview, including the real-time ADR10 value, total signals, win rates for TP1/TP2, and a log of the last 10 trade outcomes.
✅ Advanced Quality Control Filters — user-configurable inputs for Max Pattern Bars, Max Pattern Height (% of ADR10), and Min Bars Between Signals eliminate low-quality or excessively large patterns and prevent over-signaling.
🔔 Comprehensive Alerts — get a single, detailed alert per signal—including the symbol, timeframe, entry price, SL, TP1, and TP2—formatted for easy integration with automated trading systems.
🔧 Fully Customizable — control everything from pivot lengths and pattern quality filters to the colors and extension of all zones, labels, and dashboard elements.
🎯 Why this algo is unique: Standard ZigZag and pattern indicators are notorious for repainting and providing subjective signals with no statistical backing. This algorithm provides an objective, fully-gated, non-repainting signal engine. It doesn’t just draw a pattern; it builds a complete, quantifiable trading framework around it with adaptive risk management (ADR-based zones) and a dashboard to prove its historical performance on the chart you are trading.
🚀 Apply to Gold (XAUUSD), Forex, Crypto, and Indices on any M5/M10/M15/M30/H1. The ADR-based system and extensive quality filters allow it to adapt to anything from M5 scalping to H4 swing trading.
🎯 How to use this? Use the dashboard to understand the strategy's recent performance on the current asset/timeframe. Adjust the TP/SL and pattern filter percentages to match your risk tolerance. Consider taking trades that align with the higher-timeframe trend for higher probability setups.
⚠️ IMPORTANT NOTICE: This indicator is designed to identify statistically-backed pattern signals. It should NOT be used as a standalone signal for entering trades. Always use it in conjunction with your own trading strategy, price action analysis, and other technical indicators to confirm trade setups and manage risk. อินดิเคเตอร์

Ornstein-Uhlenbeck Mean Reversion Probability Bands [UAlgo]Ornstein-Uhlenbeck Mean Reversion Probability Bands is a statistical mean reversion indicator that models price as a mean reverting process and projects dynamic probability style zones around an estimated equilibrium mean. The script uses a rolling lookback of closing prices, fits an Ornstein-Uhlenbeck inspired parameter set from recent behavior, and then converts that estimate into inner and outer deviation bands around the current mean.
The indicator runs directly on price ( overlay=true ) and is built to help traders identify when price is stretched away from its estimated equilibrium. Instead of using a fixed moving average and static standard deviation, the script attempts to infer a mean reverting structure from the data itself. It estimates the long term mean, the speed of reversion, and an equilibrium style dispersion measure, then plots two upside and two downside mean reversion zones.
When price pushes into the upper or lower band regions, the script calculates a standardized distance from the estimated mean and displays a probability style label with both the percentage score and the current z score. This gives the user a quick visual read of how statistically extended price is relative to the model.
A key strength of this script is that it combines:
A rolling Ornstein-Uhlenbeck style parameter estimation
Adaptive mean reversion zones
Probability style stretch labels at band events
A clean overlay presentation with visible upper and lower probability regions
Important note: The percentage label in this script is a normal distribution coverage style score derived from the current z score. It is best understood as a probabilistic stretch measure, not a literal exact OU first passage probability.
🔹 Features
🔸 1) Ornstein-Uhlenbeck Inspired Mean Reversion Model
The script estimates a mean reverting process from recent closing prices instead of relying only on a moving average. It uses a rolling regression style approach on consecutive price observations, then converts those estimates into Ornstein-Uhlenbeck style parameters.
This makes the indicator more model driven than a standard band tool.
🔸 2) Rolling Adaptive Mean Line
The central mean line is not a fixed average only. It is the estimated equilibrium level ( mu ) of the fitted process. As the rolling price sample changes, the model updates and the mean shifts with changing market structure.
The mean line also changes color depending on whether current price is above or below that estimated equilibrium.
🔸 3) Dual Mean Reversion Zones (Inner and Outer)
The script builds two sets of reversion bands around the mean:
Inner bands using the inner multiplier
Outer bands using the outer multiplier
This creates a layered framework where the inner zone marks an early stretch area and the outer zone marks a more extreme statistical extension.
🔸 4) Probability Style Stretch Labels
When price crosses into the upper or lower band regions, the script calculates a z score based on current distance from the estimated mean and converts it into a percentage style probability score.
The label shows:
A directional marker
The probability style percentage
The current z score
This gives the user both a visual event trigger and a numeric measure of extension.
🔸 5) Visual Zone Based Design
The indicator uses filled upper and lower zones rather than emphasizing the band lines themselves. This creates a cleaner chart display where the mean line stays visible and the stretch regions are highlighted as colored areas above and below it.
This makes the indicator easy to read during fast chart scanning.
🔸 6) Configurable Lookback, Time Step, and Band Width
Users can customize:
The rolling lookback period used for model estimation
The time step parameter ( dt ) used in OU conversion
The inner band multiplier
The outer band multiplier
This makes the script adaptable to different timeframes, instruments, and preferred sensitivity levels.
🔸 7) Built In Estimation Safeguards
The parameter estimation logic includes fallback protections. If the inferred model parameters are unstable or unrealistic, the script falls back to simpler sample statistics. This helps prevent unusable outputs during difficult market regimes or low quality fits.
🔸 8) Directional Touch Event Logic
The script tracks both upper side and lower side band interaction:
Upper side events can signal statistically stretched bullish price movement
Lower side events can signal statistically stretched bearish price movement
Labels are only created on crossing events, which helps reduce repeated prints while price remains outside the band.
🔹 Calculations
1) Rolling Price Queue Management
The script stores recent closing prices in an array with a fixed maximum length:
price_array.update_queue(close, length_input)
The queue update method behaves differently depending on bar state:
On a new bar, it pushes the latest value
On an updating live bar, it overwrites the last stored value
This keeps the rolling sample aligned with the current chart state without duplicating the active bar.
2) Fallback Mean and Dispersion Estimates
Before attempting the OU style fit, the script calculates simple fallback values:
float fallback_mu = src_array.avg()
float fallback_sigma = src_array.stdev()
These act as safety defaults if the regression based OU estimate is not reliable.
Important note:
In this script, fallback_sigma is a simple sample standard deviation of price levels, not return volatility.
3) AR(1) Style Regression on Consecutive Prices
The model estimation is built from consecutive price pairs:
x = price
y = price
The script computes:
Mean of x
Mean of y
Covariance between x and y
Variance of x
Then it estimates:
float b = sum_cov / sum_var_x
This creates an AR(1) style coefficient that is later translated into OU style parameters.
4) Conversion from AR(1) Form to OU Style Parameters
If the estimated b is within a valid range:
if b > 0.05 and b < 0.95
the script computes:
float a = mean_y - b * mean_x
float mu_exact = a / (1.0 - b)
float theta_exact = -math.log(b) / dt
Interpretation:
mu_exact is the estimated long run mean.
theta_exact is the implied mean reversion speed.
The conversion assumes the AR(1) relation is a discrete time representation of a mean reverting process.
5) Residual Variance and Equilibrium Dispersion
The script next measures residual error from the AR(1) fit:
float err = y_i - (a + b * x_i)
float var_err = sum_err_sq / (n - 1)
Then it converts that residual variance into an equilibrium variance estimate:
float var_eq = var_err / (1.0 - b * b)
Finally:
float calc_sigma = math.sqrt(var_eq)
Important implementation note:
The variable named sigma in this script is used as an equilibrium style standard deviation around the mean, not as the continuous time OU diffusion coefficient from the SDE form.
6) Stability Filter for the Estimated Sigma
Even if the AR(1) fit is mathematically valid, the script only accepts the calculated sigma when it is reasonably close to the fallback sample standard deviation:
if calc_sigma < fallback_sigma * 1.5 and calc_sigma > fallback_sigma * 0.5
If this test fails, the script keeps the fallback values instead.
This helps avoid unstable band widths caused by bad short term fits.
7) Final Parameter Output
The estimation method returns:
OU_Params.new(theta, mu, sigma_eq)
Where:
theta is the estimated reversion speed
mu is the estimated equilibrium mean
sigma_eq is the accepted equilibrium dispersion measure
These parameters are then used to build the bands.
8) Band Construction
The script computes four band levels around the estimated mean:
float up_out = mean_val + (dev_val * mult_outer)
float up_in = mean_val + (dev_val * mult_inner)
float dn_in = mean_val - (dev_val * mult_inner)
float dn_out = mean_val - (dev_val * mult_outer)
Interpretation:
Inner bands represent a milder deviation from the mean.
Outer bands represent a more extreme deviation from the mean.
9) Mean and Zone Visualization
The mean line is explicitly plotted:
p_mean = plot(ou_bands.mean, color=color_mean, linewidth=2, title="Mean")
The inner and outer band plots are also created, but their colors are fully transparent:
color color_inner_up = color.new(#ffb74d, 100)
color color_outer_up = color.new(#ef5350, 100)
...
This means the visible structure mainly comes from the zone fills:
fill(p_ui, p_uo, ...)
fill(p_li, p_lo, ...)
So the user sees clean upper and lower probability zones rather than several bright boundary lines.
10) Touch and Crossing Logic
The script first checks whether price is currently inside a stretch area:
bool touch_upper = close >= ou_bands.upper_inner
bool touch_lower = close <= ou_bands.lower_inner
Then it checks for fresh crossings:
bool cross_up_in = ta.crossover(close, ou_bands.upper_inner)
bool cross_up_out = ta.crossover(close, ou_bands.upper_outer)
bool cross_dn_in = ta.crossunder(close, ou_bands.lower_inner)
bool cross_dn_out = ta.crossunder(close, ou_bands.lower_outer)
Labels are only created when price is touching the region and a fresh crossing occurs. This avoids creating labels on every bar that remains outside the band.
11) Z Score Calculation
When an event occurs, the script calculates the standardized distance from the mean:
float current_z_score = dev_val != 0 ? math.abs(close - mean_val) / dev_val : 0.0
Interpretation:
A z score of 1 means price is one equilibrium standard deviation away from the estimated mean.
Higher values indicate a more statistically stretched condition.
12) Probability Style Score Calculation
The script converts the z score into a percentage style score using an approximation of the error function:
float x = math.abs(z_score) / math.sqrt(2.0)
...
float prob = erf_approx * 100.0
Because erf(|z| / sqrt(2)) corresponds to the probability mass within plus or minus that z distance under a normal distribution, the output behaves like a confidence or coverage score.
Important note:
This is not a direct OU mean reversion probability in the strict stochastic process sense. It is a normal distribution style stretch score based on the current z distance.
13) Upper Event Label Logic
When price crosses into the upper band region:
if (touch_upper and cross_up_in) or (touch_upper and cross_up_out)
the script prints a bearish styled label above the bar:
"▼ %" + str.tostring(probability, "#.##") + " (Z:" + str.tostring(current_z_score, "#.##") + ")"
This reflects the idea that price is statistically extended above the mean and may be vulnerable to reversion.
14) Lower Event Label Logic
When price crosses into the lower band region:
if (touch_lower and cross_dn_in) or (touch_lower and cross_dn_out)
the script prints a bullish styled label below the bar:
"▲ %" + str.tostring(probability, "#.##") + " (Z:" + str.tostring(current_z_score, "#.##") + ")"
This reflects the idea that price is statistically extended below the mean and may be vulnerable to reversion.
15) Role of the Time Step Input
The dt_input parameter affects the conversion from the AR(1) coefficient into the OU reversion speed:
float theta_exact = -math.log(b) / dt
A larger dt lowers the inferred theta for the same b .
A smaller dt raises the inferred theta for the same b . อินดิเคเตอร์

Wedge Pattern [UAlgo]Overview
Wedge Pattern is a chart overlay that detects rising and falling wedge formations using strict pivot based rules and a validation engine that enforces classic technical analysis requirements. The script builds two trendlines from confirmed pivot highs and pivot lows, verifies that both boundaries converge toward an apex in the future, and ensures that price remains contained within the wedge until a valid breakout occurs.
The indicator is designed to reduce subjective pattern drawing. It requires a minimum number of touches on each boundary, checks that no candle closes outside the wedge during formation, and treats the wedge as invalid if price breaks in the wrong direction or if the two boundaries collapse into each other. When a breakout is confirmed, the script updates the wedge label and can project a measured target based on the initial wedge width.
This tool is meant for traders who want automatic, rules driven wedge identification with clear status states, breakout confirmation, and optional target projection on the chart.
🔹 Features
1) Pivot Based Wedge Construction
The script identifies swing highs and swing lows using pivot detection. Each confirmed pivot is stored as a Coordinate containing bar index and price. When enough pivots exist, the script forms:
An upper trendline from the earliest required pivot high to the most recent pivot high
A lower trendline from the earliest required pivot low to the most recent pivot low
Pivot Left and Pivot Right control swing sensitivity. Larger values produce fewer but stronger pivots. Smaller values react faster but may include minor swings.
2) Minimum Touch Requirement Per Boundary
A wedge is only considered valid when there are at least a user defined number of pivot touches for both the upper and lower boundary. This aligns with standard charting practice where two points draw a line, but three points validate it.
Min Touches per Line controls the minimum pivot count required before a wedge can be formed.
3) Objective Wedge Type Classification
After calculating slopes for the upper and lower trendlines, the script classifies wedge type using slope direction and relative steepness:
Rising wedge requires both slopes to be positive and the lower slope to be steeper than the upper slope
Falling wedge requires both slopes to be negative and the upper slope to be steeper than the lower slope in the negative direction
This ensures convergence and distinguishes wedges from simple channels.
4) Apex Projection and Future Convergence Rule
The wedge apex is computed as the intersection point of the two trendlines. A valid wedge requires the apex index to be in the future. This confirms that the boundaries are converging and that the pattern is not already expired at detection time.
5) Mandatory Containment Rule During Formation
A core validation rule enforces that no closes occur outside the wedge boundaries while the wedge is forming. If any close is above the upper boundary or below the lower boundary by at least one tick, the candidate wedge is rejected. This prevents premature breakouts from being treated as valid patterns.
6) Live Updating Boundaries
Once a wedge becomes active, the script extends both boundary lines on every bar by updating their end coordinates using the trendline slope. This keeps the wedge aligned with current time and allows breakout checks to remain accurate.
7) Breakout Detection and Status Labeling
The script defines correct breakouts by wedge type:
Rising wedge is bearish biased, so a valid breakout is a close below the lower boundary
Falling wedge is bullish biased, so a valid breakout is a close above the upper boundary
When a valid breakout occurs, the wedge status is updated to BROKEOUT and the label color reflects direction. If price breaks the opposite boundary, or if boundaries collapse, the wedge is marked FAILED.
8) Target Projection Using Measured Move
If enabled, the script projects a target line after breakout. The target distance is based on the wedge width measured near the start of the pattern, then projected from the breakout boundary:
For a rising wedge breakdown, the target is placed below the lower boundary by the measured width
For a falling wedge breakout, the target is placed above the upper boundary by the measured width
A target label prints the projected price level.
🔹 Calculations
1) Pivot Detection and Coordinate Storage
Swing points are detected using symmetric pivots:
float ph = ta.pivothigh(high, INPUT_PIVOT_LEFT, INPUT_PIVOT_RIGHT)
float pl = ta.pivotlow(low, INPUT_PIVOT_LEFT, INPUT_PIVOT_RIGHT)
Confirmed pivots are stored using the pivot right offset so the bar index matches where the pivot actually formed:
if not na(ph)
pivot_highs.push(Coordinate.new(bar_index - INPUT_PIVOT_RIGHT, ph))
if not na(pl)
pivot_lows.push(Coordinate.new(bar_index - INPUT_PIVOT_RIGHT, pl))
Arrays are capped to keep only recent pivot history.
2) Trendline Construction and Slope Calculation
When enough pivots exist, the script picks the earliest required touch and the most recent touch for both highs and lows, then builds trendlines:
Coordinate p1h = pivot_highs.get(pivot_highs.size() - MIN_TOUCHES_PER_LINE)
Coordinate pNh = pivot_highs.get(pivot_highs.size() - 1)
Trendline tl_up = Trendline.new(p1h, pNh, 0.0, na)
tl_up.slope := tl_up.calc_slope()
Slope is defined as:
(this.end.price - this.start.price) / (this.end.index - this.start.index)
The same logic is used for the lower trendline from pivot lows.
3) Wedge Type Rules
Wedge type is derived from slope sign and convergence:
Rising wedge:
if tl_up.slope > 0 and tl_lo.slope > 0 and tl_lo.slope > tl_up.slope
w_type := 1
Falling wedge:
if tl_up.slope < 0 and tl_lo.slope < 0 and tl_up.slope < tl_lo.slope
w_type := 2
This ensures both boundaries move in the same direction while converging.
4) Apex Index Calculation
The apex index is calculated from the line intersection of the two trendlines:
float apex_x = (y2 - y1 + m1 * x1 - m2 * x2) / (m1 - m2)
math.round(apex_x)
A candidate wedge is only accepted if apex index is greater than the current bar index.
5) Containment Validation Using Close Prices
The script checks each bar from the wedge start to the current bar to ensure that close remains within boundaries:
float up_p = this.upper.get_price_at(i)
float lo_p = this.lower.get_price_at(i)
float c_p = close
if c_p > up_p + syminfo.mintick or c_p < lo_p - syminfo.mintick
violated := true
If violated is true, the wedge is rejected.
6) Live Boundary Update and Breakout Checks
For active wedges, end coordinates are updated each bar using the projected boundary price:
line.set_y2(w.upper.line_id, w.upper.get_price_at(bar_index))
line.set_y2(w.lower.line_id, w.lower.get_price_at(bar_index))
Breakout checks use the current close against projected boundary prices:
bool b_up = close > u_p
bool b_dn = close < l_p
Correct breakout:
Rising wedge requires b_dn
Falling wedge requires b_up
Invalidation:
Rising wedge fails if b_up
Falling wedge fails if b_dn
Any wedge fails if upper boundary price is less than or equal to lower boundary price
7) Target Projection
Measured width is derived from the initial distance between boundaries near the start of the wedge, then projected from the breakout side:
float m = math.abs(w.upper.start.price - w.lower.get_price_at(w.upper.start.index))
float t = w.is_rising ? l_p - m : u_p + m
The target line and label are drawn forward a fixed number of bars to provide a clear reference after breakout. อินดิเคเตอร์

Donchian Ribbon [UAlgo]Donchian Ribbon is a chart-overlay Donchian Channel ribbon that visualizes multiple lookback lengths at the same time. Instead of plotting a single Donchian Channel, the script builds a fixed stack of channels that increase in length and blends them into a clean, layered ribbon above and below price using progressive fills.
The goal is to make market structure and regime easier to read without clutter:
- When the ribbon expands and stays orderly (fast boundaries leading, slow boundaries following), it often reflects sustained range expansion and more directional flow.
- When the ribbon compresses and bands overlap frequently, it typically reflects consolidation, rotational behavior, and reduced clarity.
- The slowest channel provides the structural “outer frame” of the market’s recent range, while shorter channels react first and show how quickly the range is shifting.
This indicator is designed as a context tool. It does not attempt to “predict” direction by itself, but it gives a high-quality visual map of evolving highs/lows across multiple sensitivities so you can align entries, risk, and expectations with the current regime.
🔹 Features
1) Multi-Length Donchian Stack (Ribbon Engine)
The script constructs several Donchian Channels from a Base Length and a Step Length. Each band represents a different sensitivity level:
- Fast bands respond quickly to recent highs and lows.
- Slow bands respond more conservatively and define broader containment.
By stacking these lengths together, you can see short-term responsiveness and higher-level structure simultaneously.
2) Two-Sided Ribbon (Upper and Lower Envelopes)
The indicator visualizes both sides of the Donchian framework:
- Upper ribbon is built from stacked Donchian highs (highest highs per length).
- Lower ribbon is built from stacked Donchian lows (lowest lows per length).
This keeps interpretation intuitive: price pressing into the upper ribbon suggests pressure toward recent highs, while leaning into the lower ribbon suggests pressure toward recent lows.
3) Gradient Depth via Layered Fills (Clean Charts)
Instead of drawing many lines, the script fills the space between consecutive bands. Transparency is gradually adjusted from the fast band to the slow band, producing a smooth depth effect that stays readable even on busy charts.
Intermediate plots are intentionally hidden so the ribbon remains the main visual output.
4) Regime Readability (Expansion vs Compression)
Because each band has a different lookback length, the ribbon naturally communicates volatility and state:
- Expansion: spacing between fast and slow bands increases, commonly seen in stronger directional phases.
- Compression: spacing collapses and bands cluster, commonly seen in ranges, pauses, or choppy rotation.
This helps you quickly decide whether to treat price action as breakout-oriented, trend-continuation, or mean-reverting.
5) Trend Baseline Reference (Slow Midpoint)
A baseline is plotted using the midpoint of the slowest channel. This provides a stable reference that helps you judge whether price is operating in the upper or lower half of the broader range structure.
🔹 Calculations
1) Donchian High, Low, and Midpoint Per Band
Each Donchian band is computed from its own length:
- High = highest high over the lookback length
- Low = lowest low over the lookback length
- Mid = average of High and Low
id.high := ta.highest(id.length)
id.low := ta.lowest(id.length)
id.mid := math.avg(id.high, id.low)
2) Length Sequencing (Base Length + Step Length)
The indicator creates a fixed number of bands. Lengths are built as:
- Band 1: base_length
- Band 2: base_length + step_length
- Band 3: base_length + 2 * step_length
- ...
- Final band: base_length + (ribbon_count - 1) * step_length
This yields a consistent progression from fast to slow sensitivity.
int len = base_length + (i * step_length)
channels.push(DonchianChannel.new(len))
3) Iterative Updates with Arrays and Methods
All bands are stored in an array and updated every bar using a unified method call. This ensures every band follows identical rules and makes the logic scalable and maintainable.
for dc in channels
dc.update()
4) Upper Ribbon Construction (Layered Fills Between Highs)
The upper ribbon is created by filling between consecutive Donchian highs. Each layer uses the same upper tone with progressively stronger visibility toward the slow band.
fill(p_fast_high, p_mid1_high, color.new(col_upper, 90), "Ribbon Upper 1")
fill(p_mid1_high, p_mid2_high, color.new(col_upper, 80), "Ribbon Upper 2")
fill(p_mid2_high, p_mid3_high, color.new(col_upper, 70), "Ribbon Upper 3")
fill(p_mid3_high, p_slow_high, color.new(col_upper, 60), "Ribbon Upper 4")
5) Lower Ribbon Construction (Layered Fills Between Lows)
The lower ribbon is created by filling between consecutive Donchian lows with the lower tone, again using progressive transparency.
fill(p_fast_low, p_mid1_low, color.new(col_lower, 90), "Ribbon Lower 1")
fill(p_mid1_low, p_mid2_low, color.new(col_lower, 80), "Ribbon Lower 2")
fill(p_mid2_low, p_mid3_low, color.new(col_lower, 70), "Ribbon Lower 3")
fill(p_mid3_low, p_slow_low, color.new(col_lower, 60), "Ribbon Lower 4")
6) Trend Baseline (Slow Midpoint)
The baseline is the midpoint of the slowest Donchian band, plotted as a stable center reference for the broadest range framework.
plot(dc_slow.mid, "Trend Baseline",
color = color.from_gradient(0.5, 0, 1, col_lower, col_upper),
linewidth = 2)
7) Visualization Choice (Hidden Internals, Visible Structure)
To keep charts clean, most intermediate plots are hidden and the ribbon fills do the heavy lifting visually, while the slow boundaries remain visible as the outer frame.
p_fast_high = plot(dc_fast.high, "Fast High", color = color.new(col_upper, 80), display = display.none)
p_fast_low = plot(dc_fast.low, "Fast Low", color = color.new(col_lower, 80), display = display.none)
p_slow_high = plot(dc_slow.high, "Slow High", color = color.new(col_upper, 50))
p_slow_low = plot(dc_slow.low, "Slow Low", color = color.new(col_lower, 50))
อินดิเคเตอร์

Rolling Liquidity Clusters Channel [LuxAlgo]The Rolling Liquidity Clusters Channel indicator identifies dynamic support and resistance zones by calculating levels that maximize candle wick touches while strictly avoiding intersections with candle bodies within a rolling window. This tool provides a unique perspective on liquidity clusters, highlighting price levels where historical rejection is most concentrated without being invalidated by price "closing" through them.
🔶 USAGE
The indicator plots a channel consisting of an Upper Level, a Lower Level, and a Mid Level. The space between these levels is filled with a vertical gradient to visually represent the strength of the liquidity zone.
Upper Level (Red): Represents a resistance zone where the most upper wicks are concentrated without any candle body in the lookback window crossing above it.
Lower Level (Green): Represents a support zone where the most lower wicks are concentrated without any candle body in the lookback window crossing below it.
Mid Level (Orange): Represents the equilibrium or average of the current liquidity channel.
Traders can use these levels to identify potential reversal points or areas of price consolidation. A breakout from the channel might indicate a shift in market structure as price moves beyond the most inclusive "non-broken" wick levels.
🔶 DETAILS
The script employs a specific constraint logic to ensure the levels represent true "untouched" liquidity:
🔹 Body-Crossing Constraint
Before identifying the wick touches, the script calculates the highest candle body high and lowest candle body low within the user-defined window. The resulting levels are guaranteed to stay outside of this "body zone," ensuring that the plotted levels represent prices that the market reached but failed to sustain via a close.
🔹 Maximizing Touches
To find the most significant level, the algorithm searches for the most inclusive price point. For the upper level, it identifies the lowest "high" that remains above all candle bodies. For the lower level, it identifies the highest "low" that remains below all candle bodies. This mathematical approach effectively finds the level where the most price action "clusters" via wicks.
🔹 Vertical Gradient Fills
The visual style uses a vertical gradient fill. The upper half fades from 90% transparency at the Upper Level (Red) to 100% transparency at the Mid Level. The lower half follows a similar logic, fading from the Lower Level (Green) toward the center. This creates a "glow" effect, emphasizing the outer boundaries where liquidity is highest.
🔶 SETTINGS
Window Size: The number of bars used for the rolling calculation. A larger window creates more stable, long-term levels, while a smaller window adapts quickly to recent price action.
Upper Level: Customize the color of the upper resistance level and its associated gradient fill.
Lower Level: Customize the color of the lower support level and its associated gradient fill.
Mid Level: Customize the color of the central equilibrium line.
อินดิเคเตอร์

Adaptive Bounds RSI [LuxAlgo]The Adaptive Bounds RSI indicator utilizes online 1D K-Means clustering to dynamically adapt RSI overbought and oversold bounds based on evolving market conditions. Unlike traditional RSI thresholds (70/30) that remain static, this tool identifies five shifting clusters to better categorize price action into regimes ranging from deep discount to extreme premium.
🔶 USAGE
The indicator provides a more responsive way to identify overextended market conditions by learning from recent RSI distributions. Instead of relying on fixed levels that may be irrelevant in strong trends, the adaptive bounds expand and contract based on the volatility and momentum of the asset.
🔹 Regime Classification
The tool classifies the market into five distinct regimes based on five internal centroids (clusters):
Extreme Premium (Upper Bound): Represents highly overextended bullish conditions.
Bullish: The zone between the center and the upper bound.
Neutral: The area surrounding the 50-level midline.
Bearish: The zone between the center and the lower bound.
Deep Discount (Lower Bound): Represents highly overextended bearish conditions.
🔹 Signal Markers
The indicator plots circular markers directly on the RSI line when the oscillator crosses the adaptive bounds:
A Bullish Marker appears when the RSI crosses below the adaptive lower bound (Deep Discount).
A Bearish Marker appears when the RSI crosses above the adaptive upper bound (Extreme Premium).
To prevent signal clutter, these markers only reappear once the RSI has returned to cross the 50-level midline, ensuring the market has "reset" before a new overextended signal is generated.
🔶 DETAILS
The core of this indicator is an Online 1D K-Means algorithm. Unlike standard clustering which requires a full dataset, this online version updates its centroids bar-by-bar.
When a new RSI value is calculated, the algorithm determines which of the five centroids is closest to that value. It then shifts that "winning" centroid toward the RSI value by a factor determined by the Learning Rate. This allows the boundaries to "breathe" with the market; in a persistent uptrend, the upper bound will naturally migrate higher to avoid premature overbought signals.
🔶 SETTINGS
🔹 Oscillator Settings
RSI Length: Determines the lookback period for the underlying Relative Strength Index calculation.
🔹 K-Means Settings
Learning Rate (K-Means): Controls how quickly the adaptive bounds react to new data. A higher value makes the bounds move faster, while a lower value provides more stable, "sticky" boundaries.
🔹 Visuals
Lower Bound Color: Sets the color for the lower adaptive boundary and bullish signals.
Upper Bound Color: Sets the color for the upper adaptive boundary and bearish signals.
Auto RSI Color: When enabled, the RSI line matches the chart's foreground color.
RSI Color: Sets the color of the RSI line when "Auto RSI Color" is disabled.
🔶 ALERTS
Regime Flip: Triggers when the market transitions from a Neutral state into a trending cluster (Bullish or Bearish).
Lower Bound Cross: Triggers when the RSI crosses into the Deep Discount zone.
Upper Bound Cross: Triggers when the RSI crosses into the Extreme Premium zone.
อินดิเคเตอร์

Neighboring Price Bands [LuxAlgo]The Neighboring Price Bands indicator provides dynamic support and resistance levels based on the local statistical distribution of historical prices relative to the current market position. Unlike traditional volatility bands that rely on fixed standard deviations, this tool identifies "price neighbors" within a sorted historical buffer to determine where the market has previously found friction.
🔶 USAGE
The indicator helps traders identify potential reversal zones and breakout opportunities by analyzing the density of price action around the current level.
🔹 Support and Resistance
The bands act as flexible zones of interest. The upper (green) band represents a bullish boundary derived from historical prices slightly higher than the current price, while the lower (red) band represents a bearish boundary from prices slightly lower. When the price interacts with these bands, it is entering a zone where historical price density suggests a potential reaction.
🔹 Price Discovery & Breakouts
A unique feature of this tool is the "Discovery" mechanism. If the current price moves beyond the range of its historical "neighbors" (e.g., reaching a new multi-period high or low), the corresponding band will disappear, and a background highlight will appear.
Bullish Discovery: A green background highlight indicates the price is entering uncharted territory relative to the historical buffer, suggesting a strong bullish breakout.
Bearish Discovery: A red background highlight indicates the price is dropping below its local historical distribution, suggesting a strong bearish breakdown.
🔶 DETAILS
The script maintains a historical buffer of prices, which it constantly sorts to create a price distribution. For every new bar, the algorithm performs the following:
It locates the current price within the sorted distribution.
It identifies a specific number of "neighbors" (K) above and below that position.
It calculates a specific percentile within those neighbors to plot the bands.
Because the bands are derived from actual price frequency rather than a calculation like standard deviation (Bollinger Bands) or Average True Range (Keltner Channels), they adapt more specifically to "sticky" price levels where the market has historically spent time.
🔶 SETTINGS
Historical Buffer (Bars): The total number of past bars used to build the price distribution. A larger buffer includes more historical context, while a smaller buffer makes the bands more reactive to recent local ranges.
Neighboring Range (K): Determines how many samples from the sorted distribution are used to calculate the bands. A smaller K makes the bands tighter and more sensitive to the immediate price position.
Percentile: Controls the width of the bands within the neighbor groups. Higher values push the bands further away from the current price.
Smoothing: Applies an SMA to the resulting bands to reduce noise and provide a cleaner visual output.
อินดิเคเตอร์

LOWESS Channel & Extrapolation [LuxAlgo]The LOWESS Channel & Extrapolation indicator calculates a Locally Weighted Scatterplot Smoothing (LOWESS) curve to define a non-linear trend and projects it into future bars using local regression slopes. It provides a dynamic channel based on the standard deviation of residuals, helping traders identify overextended price levels and potential mean-reversion points.
The LOWESS Channel & Extrapolation indicator is subject to repainting and displayed retrospectively.
🔶 USAGE
This tool is primarily designed for trend analysis and identifying exhaustion points. Because the LOWESS algorithm recalculates based on the most recent data window, the entire historical curve can adjust, making it a powerful tool for backtesting and analyzing past market structures rather than for real-time signal generation without confirmation.
🔹 Trend Identification
The central fit line represents the smoothed local trend. When the curve is sloping upward, the local market sentiment is considered bullish; conversely, a downward slope indicates bearish sentiment.
🔹 Overbought/Oversold Conditions
The dashed outer channels represent a volatility-adjusted boundary. When price moves outside these boundaries, it is statistically overextended relative to the local trend, often preceding a move back toward the mid-line.
🔹 Extrapolation
The indicator extends the most recent local regression slope into the future. This provides a "path of least resistance" projection based on the current momentum of the smoothed curve.
🔶 DETAILS
The LOWESS (Locally Weighted Scatterplot Smoothing) algorithm works by performing a separate weighted linear regression for every data point in the window.
It uses a "tricube" weighting function, which ensures that data points closer to the focal point have a higher influence on the fit than points further away. This results in a curve that is much more flexible than a simple moving average and can adapt to complex price cycles without the lag associated with traditional filters.
The channel width is determined by calculating the Standard Deviation of the residuals (the difference between the actual price and the LOWESS fit). This ensures the channel expands during high volatility and contracts during consolidation.
🔶 SETTINGS
Length : Determines the number of historical observations used to fit the LOWESS curve. Larger values result in a smoother, more macro trend. Span : The fraction of data points used for each local regression. A higher span (closer to 1.0) creates a smoother line, while a lower span allows the curve to follow price more tightly. Channel Multiplier : Multiplier applied to the standard deviation of residuals to define the distance of the upper and lower bands from the mid-line. Extrapolation Bars : The number of bars to project the current trend into the future. Fit Color : Sets the color and transparency of the central LOWESS line. Channel Color : Sets the color of the dashed outer bands and the background fill. Line Width : Adjusts the thickness of the central fit line. อินดิเคเตอร์

Rolling Trendline [LuxAlgo]The Rolling Trendline indicator provides a dynamic, self-adjusting trendline that tracks price action using linear regression slope projections and automatically resets when price deviates beyond a specific threshold.
🔶 USAGE
The indicator is designed to provide a continuous trend bias without the "lag" often associated with static linear regression lines. It projects a line forward based on a calculated slope and only shifts its trajectory when the market demonstrates a significant change in momentum.
The addition of ATR-based volatility zones allows traders to visualize a range of expected price action around the projected trend, providing a buffer that accounts for market volatility at the time of each trend reset.
🔹 Interpreting the Line and Zones
Bullish Phase (Green): Indicates an upward-sloping trajectory. The trendline and its surrounding ATR zones will be colored green, suggesting a bullish bias.
Bearish Phase (Red): Indicates a downward-sloping trajectory. The trendline and its surrounding ATR zones will be colored red, suggesting a bearish bias.
ATR Zones: These shaded areas represent a volatility-adjusted range. As long as price remains within the deviation threshold, the zones follow the trendline's trajectory.
Reset Points: Visualized by a small circle and a break in the line, these occur when price moves too far from the projection. At this moment, the indicator re-anchors to the current price and recalculates both the slope and the ATR zone width.
🔶 DETAILS
The indicator follows a specific logic flow to maintain its "Rolling" characteristic:
1. Slope Calculation: It calculates the Linear Regression slope over a user-defined lookback period. This slope represents the average rate of change in price.
2. Projection: On every new bar, the indicator projects the next value of the trendline by adding the active slope to the previous trendline value.
3. Deviation Check: The indicator calculates a Standard Deviation threshold. If the distance between the current price and the projected trendline value exceeds this threshold, a reset is triggered.
4. Re-Anchoring: Upon a reset, the trendline "rolls" to the current price and adopts the most recent linear regression slope. Simultaneously, it captures the current ATR to set the width of the new trend zones.
🔶 SETTINGS
🔹 Trend Settings
Slope Lookback: The period used to calculate the linear regression slope. Higher values result in a slope that considers more historical data.
Deviation Multiplier: Determines how far price can deviate from the trendline before a reset occurs.
Slope Divisor: This setting allows you to tame the trajectory of the line. Higher values divide the captured slope, resulting in flatter trendlines.
Source: The price data used for all calculations (default is Close).
🔹 ATR Zones
ATR Length: The lookback period used for the Average True Range calculation, which determines the width of the volatility bands.
ATR Multiplier: Controls the width of the shaded zones around the trendline.
🔹 Visuals
Bullish/Bearish Trend Colors: Customizes the colors for the trendline and zones based on the slope direction.
Zone Color: Sets the base color for the ATR area fills.
Line Width: Adjusts the thickness of the primary rolling trendline.
อินดิเคเตอร์

Whittaker Envelope [LuxAlgo]The Whittaker Envelope indicator is a visualization tool that uses Asymmetric Least Squares (ALS) to create a smooth, non-linear envelope that adapts to price extremes and troughs.
This indicator is for visualization purposes only and should not be used for direct trading signals without confirmation.
It is important to note that this script is displayed retrospectively . Because it calculates the best fit over a fixed historical window (the last N bars) using an iterative optimization process, the entire shape of the envelope can change as new data arrives. This means the indicator repaints and should be used to analyze overall market structure and volatility rather than for real-time execution.
🔶 USAGE
The Whittaker Envelope provides a unique way to visualize the "breathing" of the market. By applying different asymmetry parameters, the indicator generates a lower boundary that seeks out price troughs and an upper boundary that seeks out price peaks.
🔹 Trend and Volatility Analysis
The area between the upper and lower bounds represents the smoothed price range. A widening envelope suggests increasing volatility, while a narrowing one indicates consolidation. The dashed midline acts as a smoothed average of these two extremes, providing a baseline for the current trend.
🔹 Extrapolation
The tool includes a linear extrapolation feature that projects the current trajectory of the envelope into the future. This can help users visualize the potential direction of the trend if the current momentum persists.
🔶 DETAILS
The script implements the Whittaker-Eilers smoothing algorithm, which balances two conflicting goals: fitting the data points closely and keeping the resulting curve smooth.
By using Asymmetric Least Squares (ALS), we assign different weights to prices depending on whether they are above or below the curve. For the upper band, we use a high asymmetry value ( p ) so the curve is "pushed" toward the peaks. For the lower band, a very low p value is used to "pull" the curve toward the troughs.
🔶 SETTINGS
Length : The number of recent bars included in the calculation window.
Lambda (λ) : The smoothing factor. Higher values result in a stiffer, straighter envelope, while lower values allow the bands to follow price more closely.
Lower Asymmetry (p) : Controls how the lower band reacts to prices. Typically set to a very low value (e.g., 0.001) to ensure it follows the bottom of the price action.
Upper Asymmetry (p) : Controls how the upper band reacts to prices. Typically set to a very high value (e.g., 0.999) to ensure it follows the top of the price action.
Iterations : The number of times the ALS algorithm runs to refine the fit. More iterations provide a more accurate envelope but require more computational power.
Extrapolation : The number of bars to project the current slope of the bands into the future.
Source : The price data used for the calculation (default is Close).
อินดิเคเตอร์

อินดิเคเตอร์

Dynamic Extreme Channels & Reversals [LuxAlgo]The Dynamic Extreme Channels & Reversals indicator provides an adaptive framework for identifying price extremes and trend shifts through self-adjusting boundaries. Unlike static channels, this tool dynamically resets its levels based on price activity, offering a responsive environment for trend following and mean-reversion analysis.
🔶 USAGE
The indicator functions by tracking the highest highs and lowest lows over a specific window. When the price fails to make a new extreme within the defined period, the boundaries contract toward the current price action. This behavior creates a "breathing" channel that adapts to market volatility and consolidation phases.
Users can toggle between two primary viewing modes:
Channel Mode: Displays the upper, lower, and midline boundaries. This is ideal for identifying overextended price levels and potential mean-reversion targets.
Trailing Stop Mode: Simplifies the visual output into a single step-line that tracks the lower boundary during uptrends and the upper boundary during downtrends, serving as a dynamic exit or trend-following level.
🔹 Reversal Signals
The script includes built-in reversal signals designed to catch "blow-off" tops or "panic" bottoms where price briefly exceeds a boundary but immediately loses momentum.
Bullish Signal (▲): Occurs when the price hits a new lower extreme (LL) but the current candle manages to peak back above the channel midline.
Bearish Signal (▼): Occurs when the price hits a new higher extreme (HH) but the current candle manages to drop below the channel midline.
The sensitivity and frequency of these signals are directly influenced by the Lookback Period and Reset Alpha % :
Lookback Period: A shorter lookback causes the channel boundaries to "reset" more frequently. This results in tighter channels and more frequent reversal signals, as the midline becomes easier to cross. A longer lookback creates wider, more stable channels, resulting in fewer, high-conviction signals.
Reset Alpha %: This determines how aggressively the levels move toward the price after the lookback period expires. A high Alpha (e.g., 100%) creates sharp adjustments, which can lead to rapid signal generation during choppy markets. A lower Alpha creates smoother transitions, filtering out noise in the reversal logic.
🔶 DETAILS
The core logic avoids standard rolling maximum/minimum functions to provide a more "sticky" boundary. Instead of the channel edge constantly moving with every bar, it remains fixed until a new extreme is reached or the "timer" (Lookback Period) runs out.
When the timer runs out, the level interpolates toward the price based on the Reset Alpha. This simulates a decaying memory of past price extremes, ensuring the indicator remains relevant even after long periods of sideways movement.
🔶 SETTINGS
🔹 Core Settings
Lookback Period: The number of bars the indicator waits before adjusting an extreme level if no new high/low is found.
Reset Alpha %: Controls the intensity of the level adjustment. 100% resets the level entirely to the current price, while 0% keeps it static.
Trailing Stop Mode: Switches the display from a three-line channel to a single trend-following stop line.
🔹 Visuals
Show Reversal Signals: Toggles the visibility of the triangle reversal labels.
Upper Color: Customizes the color and transparency of the upper boundary.
Midline Color: Customizes the color and transparency of the center line.
Lower Color: Customizes the color and transparency of the lower boundary.
🔹 Dashboard
Dashboard: Toggles the on-screen information panel.
Position: Controls the location of the dashboard on the chart.
Size: Controls the scale of the dashboard text and cells.
อินดิเคเตอร์

Jurik MA Trend Breakouts [BigBeluga]🔵 OVERVIEW
Jurik MA Trend Breakouts is a precision trend-breakout detector built on a custom Jurik-smoothed moving average.
It identifies trend direction with ultra-low lag and maps breakout levels using pivot-based swing highs/lows.
The indicator plots dynamic breakout lines and confirms trend continuation or reversal when price breaks them — providing clean, minimalistic yet extremely accurate trend signals.
🔵 CONCEPTS
Jurik Moving Average (JMA) — A highly smooth and low-lag moving average that reacts quickly to trend shifts without noise. This becomes the core trend baseline.
Trend Bias —
• JMA rising → bullish trend
• JMA falling → bearish trend
The JMA color updates instantly based on slope.
Swing Pivots — Recent pivot highs/lows are detected to define structural break levels while filtering out weak noise.
Trend Breakout Levels —
The indicator draws horizontal levels at the last valid pivot in the direction of the trend.
These levels act as “confirmation gates” for breakout entries.
ATR Validity Filter — Ensures only meaningful pivots within a threshold are used to prevent fake breakouts.
🔵 FEATURES
Ultra-Smooth Jurik Trend Line — A visually clean trend baseline changing color based on direction.
Automatic Swing High Breakout Setup (Bullish) —
• During an uptrend, the indicator tracks the most recent pivot high.
• A horizontal breakout line is extended across the chart.
• A ✔ marker appears at both pivot points when the breakout structure becomes valid.
Automatic Swing Low Breakout Setup (Bearish) —
• During a downtrend, pivot lows are tracked.
• A horizontal breakout line marks the breakdown level.
• ✔ markers confirm valid structure before the breakout triggers.
Breakout Detection —
• Price closing above the bullish breakout line → “↑” signal printed on the chart.
• Price closing below the bearish breakout line → “↓” signal printed on the chart.
Automatic Reset on Trend Change —
When the JMA trend flips, all breakout structures are cleared and the model starts tracking new pivot levels.
Trend-Colored Visualization —
Glow + main JMA line give instant clarity of market direction.
🔵 HOW IT WORKS
1. JurikMA defines the main trend — Slope determines bullish or bearish state.
2. The indicator continuously searches for pivots in the direction of the trend.
3. When a valid pivot forms and passes ATR proximity filter, a structural breakout level is drawn.
4. As long as price stays below that level (bullish case), the trend setup remains active.
5. When price finally breaks the level , the indicator prints a directional arrow (↑ or ↓).
6. Trend flip instantly resets all levels and begins tracking pivots on the opposite side.
🔵 HOW TO USE
Breakout Trading — Enter long on “↑” and short on “↓” signals when price breaks key pivot structure.
Trend Confirmation — Use the JurikMA color to stay aligned with the main trend direction.
Reversals — Trend flips often mark major turning points.
Structure Mapping — Use the horizontal breakout lines to understand how close price is to confirming a new trend leg.
🔵 CONCLUSION
Jurik MA Trend Breakouts combines the speed of a Jurik MA with structural breakout logic to deliver clean, reliable entry signals.
Its minimal design, pivot-based confirmation, and trend-aligned logic make it suitable for scalping, swing trading, and intraday trend continuation setups.
If you want fast yet filtered breakout recognition with almost zero noise, this tool gives you everything you need. อินดิเคเตอร์

อินดิเคเตอร์

Cup & Handle (Zeiierman)█ Overview
Cup & Handle (Zeiierman) is a classic continuation-pattern scanner that detects both bullish Cup+Handle and bearish Inverted Cup+Handle structures using a compact pivot stream. It’s designed to highlight rounded reversals back to a “rim” level, followed by a smaller pullback (“handle”) before a potential continuation move.
⚪ What It Detects
A Cup & Handle (Bull) forms when price makes a rounded decline from a left rim, bottoms, then climbs back to a similar right rim. After returning to the rim, price forms a handle (a smaller pullback) that stays within an allowed retracement range. This pattern often precedes a bullish continuation attempt.
An Inverted Cup & Handle (Bear) is the mirrored version. Price makes a rounded rise to a left rim, tops, then declines back to a similar right rim. After returning to that rim, price forms a handle (a smaller bounce) that stays within the allowed retracement range. This pattern often precedes a bearish continuation attempt.
█ How It Works
⚪ 1) Pivot Extraction (Swing Compression)
The script first converts raw candles into a small set of meaningful swing pivots using ta.pivothigh() and ta.pivotlow() with Pivot span. A pivot is accepted only after it is confirmed by the lookback window, which helps reduce noise.
Key effect:
Higher Pivot span = fewer, stronger pivots (cleaner patterns)
Lower Pivot span = more pivots (more patterns, more noise)
⚪ 2) Pattern Framing (4-Point Structure)
When at least four pivots exist, the script maps them into a fixed sequence:
For a bull Cup+Handle sequence: High → Low → High → Low
These are treated as:
L = left rim pivot
B = cup bottom pivot
R = right rim pivot
H = handle pivot
For a bear inverted Cup+Handle sequence: Low → High → Low → High
Mapped similarly, but inverted.
This “4-pivot” structure is the minimum shape needed to define a cup and a handle without overfitting.
⚪ 3) Rim Similarity Filter (Cup Quality Control)
The script checks if the left rim and right rim are close enough to be considered a proper cup rim:
Rim similarity tolerance (%) controls this.
Lower tolerance = only very clean symmetric rims
Higher tolerance = allows uneven rims (more detections)
⚪ 4) Handle Depth Filter (Reject Weak or Messy Handles)
The handle is validated by measuring how deep it retraces relative to the cup depth:
Handle Retraction = |rim − handle| / |rim − bottom|
The handle must fall between:
Handle retrace min
Handle retrace max
This prevents:
tiny “non-handle” wiggles (too shallow)
deep pullbacks that break the structure (too deep)
█ How to Use
⚪ Interpreting a Bull Cup & Handle
Treat it like a continuation setup built around a key breakout level:
Cup forms
Handle forms
Breakout happens above this level
Once price returns to this breakout zone and the handle stays controlled, the structure may attempt to continue upward.
Common behaviors after a clean signal:
Push above the breakout level
Brief retest/acceptance near the breakout zone
Continuation toward the projected target if momentum holds
⚪ Interpreting a Bear Inverted Cup & Handle
Treat it like a bearish continuation/rollover setup built around the same breakout concept:
Cup forms (inverted)
Handle forms
Breakout happens below this level
Once price returns to this breakout zone and the handle stays controlled, the structure may attempt to continue downward.
Common behaviors after a clean signal:
Drop below the breakout level
Retest from underneath
Continuation toward the projected target if selling pressure persists
█ Settings
Pivot span – pivot sensitivity. Higher = smoother pivots, fewer signals. Lower = more pivots, more signals/noise.
Rim similarity tolerance (%) – rim quality filter. Lower = stricter symmetry, higher = more permissive detection.
Handle retrace min – minimum handle depth (filters weak handles).
Handle retrace max – maximum handle depth (filters messy/deep handles).
Invalidation (handle max retrace %) – “maximum tolerated damage” for handle move before the structure is considered broken.
Require breakout confirmation – only trigger when price closes beyond the rim in the expected direction.
Target multiplier (× cup depth) – scales how far the projection target is. Lower = closer targets; 1.0 = classic depth target.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
อินดิเคเตอร์

Flexible S/R Channels🟩 Flexible S/R Channels is a visualization tool that draws curved support and resistance boundaries through user-defined anchor points. Unlike traditional trendlines and channels that force linear interpretation onto price action, this indicator captures the curved structures that markets frequently form—rounded tops and bottoms, parabolic advances and declines, arcing rallies and pullbacks. Three anchor points per curve define the shape; the indicator fits a smooth mathematical curve through these points and projects it forward. The approach is simple: draw what you see. Curved market structure that resists precise definition with traditional tools can now be rendered with mathematical accuracy.
The indicator bridges the gap between static drawing tools and programmable indicators. TradingView's arc tool draws curves but produces only visual pixels with no analytical value. Flexible S/R Channels creates live data series that integrate with other analysis tools. Four curve-fitting methods—Quadratic, Quadratic-Linear, Weighted Linear, and Natural Cubic Spline—accommodate different market structures. The curved levels naturally lend themselves to breakout and reversion strategies—applications left to the trader's discretion. The open-source code invites experimentation and customization.
💡 THEORY AND CONCEPT 💡
Traders have long relied on horizontal levels and diagonal trendlines to define support and resistance. Linear tools assume constant slope—a property rarely exhibited by actual market movement. When momentum accelerates or decelerates, price trajectories curve rather than hold to fixed angles. The resulting structures—parabolic advances during expansion phases, arcing pullbacks during consolidation, rounded formations at reversal points—represent changes in the rate of change itself. Traditional drawing tools cannot accommodate this variable geometry without sacrificing mathematical precision..
Flexible S/R Channels extends familiar support and resistance concepts into curved space. The approach is simple: draw what you see. When the eye recognizes a curved boundary in price action, this indicator provides the means to define it precisely. Three anchor points per curve—an initial point, an intermediate point, and a recent point—are all that is required. The indicator fits a smooth mathematical curve through these points and extends it forward as a projection.
This indicator represents a blend of human pattern recognition and algorithmic precision. Fully automated indicators make decisions without user input—efficient but detached from trader discretion. Manual drawing tools rely entirely on freehand skill—expressive but imprecise. Flexible S/R Channels occupies the middle ground. The trader identifies the curved structure; the algorithm renders it mathematically. The result is human insight expressed with computational accuracy—for traders who recognize curved structure in price action but lack precise tools to define it.
This projection is not a prediction. It is a visual hypothesis—a structured way of asking "if this trajectory continues, where would price be?" The underlying assumption is simple: like Newton's first law of motion, a trajectory in motion tends to continue unless acted upon by an external force. Future price action validates or invalidates the projection, just as it does with any trendline or channel.
TradingView offers an arc drawing tool for freehand curved lines, but these are purely visual—static pixels on a screen with no programmable value. Flexible S/R Channels bridges this gap. The fitted curves exist as data series that can generate alerts, trigger signals, and interact with other analysis tools. The visual drawing becomes operational structure.
🔁 CURVE METHODS 🔁
The indicator offers four curve-calculation methods, each producing different shapes suited to different market structures:
Quadratic — Fits a parabolic arc through the three anchor points. Best for smooth, continuous curves such as rounded tops and bottoms. It captures the natural "swing" of the market, assuming the momentum will maintain its current rate of acceleration or deceleration.
Quadratic-Linear — Uses a parabolic curve through the anchor points, then transitions to a straight line after the final anchor. Useful when curved structure gives way to linear trend continuation. This is the "bridge" between a turning market and a steady, directed move, preventing the projection from curving back on itself when the price begins to run.
Weighted Linear — Connects anchor points with straight line segments rather than a smooth curve. Suited for angular market structures with distinct inflection points. It treats the market as a series of rigid shifts, providing a clear "corridor" when the price is bouncing between sharp, diagonal levels.
Natural Cubic Spline — Produces the smoothest curve by minimizing abrupt directional changes. Ideal for organic, flowing market movements. It acts as a flexible spine that adapts to complex transitions without the rigid constraints of a fixed geometric shape.
Quadratic Fitting : A smooth, parabolic arc defines a curved resistance boundary. By fitting a mathematical path through three anchor points, the curve captures rounded structures and arcing price action that traditional linear trendlines fail to represent.
Weighted Linear Fitting : This method produces an angular, segmented path by connecting anchor points with distinct linear slopes. Unlike the continuous smoothness of a quadratic arc, the weighted linear approach creates a more jointed geometry, allowing for a precise match to market structures that exhibit sharp, localized changes in trajectory.
Natural Cubic Spline Fitting : This method creates a highly fluid, elastic curve that can accommodate complex price oscillations. In this instance, the curves define a narrowing range as support and resistance converge, highlighting the volatility compression that often precedes a significant breakout or breakdown from established structures.
🖱️ HOW IT WORKS 🖱️
1️⃣ Initial Setup
Unlike traditional indicators that calculate values automatically from price data, Flexible S/R Channels requires user-defined anchor points. This is intentional. The trader's eye is the pattern recognition engine—no algorithm can see the curved structure that experience and intuition reveal. The indicator waits for this input, then applies mathematical precision to render what the trader has identified.
The Recognition of Natural Structure : Effective analysis begins when a curved rhythm becomes visible within price action that traditional trendlines cannot satisfy. Identifying the specific swing highs and swing lows that define these boundaries is the first step in organizing a chart. By isolating three key pivots for resistance and three for support, the underlying framework of the market's trajectory is established, providing the necessary coordinates to accurately map the path.
Interactive Setup Workflow : Upon loading, the indicator prompts for the sequential selection of six points—three swing highs and three swing lows—to serve as the raw data for the calculation. While the chart remains blank during this initial phase, the curves generate instantly once the final anchor is confirmed. These points are not permanent; they appear as interactive grips that can be dragged in real time to refine the boundaries as the market structure evolves.
The indicator prompts for six sequential selections—three for resistance, three for support. The first three selections define the resistance boundary; the final three define support. This sequential grouping is distinct from zigzag-style selection patterns. Within each group, clicking order is flexible—the algorithm automatically sorts points chronologically, allowing traders to select visually prominent pivots in whatever sequence feels natural.
Structural Anchor Identification : Identifying three key swing highs and three key swing lows provides the foundation for the dual-curve geometry. These specific structural peaks and troughs serve as the coordinates for the mathematical models, ensuring that the resulting boundaries accurately reflect the underlying skeleton of the market action.
2️⃣ Interactive Adjustment
After the initial setup, all six anchor points are fully adjustable:
Points are automatically sorted chronologically regardless of selection order
Grip handles appear at each anchor location
Any point can be repositioned by clicking and dragging its grip handle
The curves recalculate instantly as points are adjusted
The algorithm produces a mathematically perfect curve based on the anchor points provided. If the result does not match the trader's vision, adjustments are immediate. This iterative refinement—see, adjust, refine—continues until the rendered curve represents what the trader sees in the price action. The user remains in control; the algorithm remains in service.
Interactive Channel Boundaries : Six user-defined anchor points—three for resistance and three for support —establish a non-linear range that moves beyond the constraints of a flat, horizontal channel. This configuration captures the arcing trajectory of the market while showing price action respecting the curved boundaries in a classic reversion pattern. By manually positioning these anchors, a dynamic dimension is added to the chart that maintains structural integrity even as the price follows a rounded path.
🛠️ SETTINGS 🛠️
Customizable Visual Feedback : Beyond the core geometry, the visualization offers various user-defined settings to tailor the chart's information density. From identifying specific price targets to toggling structural labels, these options allow the trader to adjust the level of detail to suit their personal analysis style while maintaining a clear view of the non-linear boundaries.
Configuration Options
Curve Method — Select the curve-fitting algorithm: Quadratic, Quadratic-Linear, Weighted Linear, or Natural Cubic Spline.
Projection Length — Number of bars to project the curves beyond current price action. Projections appear as dashed lines.
Visual Settings
Grip Size — Size of the draggable handles displayed at each anchor point. Set to zero to hide grips entirely.
Line Width — Thickness of the support and resistance curves.
Support Color / Resistance Color — Color settings for each curve.
Show Info Table — Toggle display of the info table showing the current curve method in the chart corner.
Advanced: Time/Price Coordinates
The settings panel includes precise time and price values for each of the six anchor points, grouped under Resistance Time/Price and Support Time/Price. These values are populated automatically when points are selected on the chart.
Adjusting anchor points by dragging the grip handles directly on the chart is faster and more intuitive. The time/price fields are available for situations requiring exact coordinate entry—such as aligning an anchor to a specific candle timestamp or a precise price level. These fields can be safely ignored unless fine-tuning is necessary.
🖼️ CHART EXAMPLES 🖼️
The Flexible S/R Channels indicator adapts to diverse market structures across multiple timeframes and instruments. Curved boundaries can define subtle momentum shifts in near-linear trends, dramatic reversals in rounding formations, or volatility compression as channels converge toward breakout points. The four curve-fitting methods accommodate different geometries—smooth parabolic arcs for continuous momentum changes, segmented linear paths for angular structures, and elastic splines for complex oscillations. Each anchor point adjustment instantly recalculates the curves, allowing iterative refinement until the rendered boundaries align with the trader's interpretation of market structure. Forward projections extend these mathematical relationships into future territory, providing visual context for hypothetical support and resistance levels if current trajectories persist.
Subtle Curve Alignment : Even in structures that appear linear, subtle curvature allows the channel boundaries to breathe with the market’s internal momentum. By utilizing three anchor points rather than two, the channel adapts to the slight acceleration of a trend, providing a more precise fit than a rigid, straight corridor.
Decelerating Momentum and Convergence : This classic rounding structure illustrates a transition where the initial wide oscillations between highs and lows begin to contract. As the boundaries converge, the curve captures the diminishing volatility and the shift in market energy, providing a clear visual representation of a trend losing its expansive momentum as it approaches a potential turning point.
Organic Trend Modeling : In an accelerating uptrend, the Natural Cubic Spline provides a highly adaptable boundary that mirrors the organic flow of momentum. This non-traditional approach allows the channel to follow complex price pulses that a standard linear trendline would likely cut through, maintaining a precise fit even as the angle of the trend shifts over time.
Non-Linear Projections : Unlike standard trendlines that converge at a fixed rate, curved projections adapt to the historical momentum of the move. This allows the indicator to map a dynamic squeeze, capturing the subtle nuances of how price action tightens toward an apex. It provides a more sophisticated view of future convergence points that traditional linear channels often fail to anticipate.
The "Draw What You See" Philosophy : Market structures are rarely perfect, and this example highlights the indicator’s ability to map unconventional rhythms. Rather than forcing price into a predefined category, the tool remains flexible enough to define any structural path the trader identifies. If you can see a trend's trajectory, the indicator can provide the mathematical framework to support it.
Comparative Projection Modeling : Using identical anchor points as above, this example demonstrates how selecting a different calculation method can alter the projected path. While the historical fit remains precise, the variation in the forward-looking trajectory allows traders to explore multiple mathematical interpretations of the same market structure, choosing the model that best aligns with the current volatility and trend behavior.
Extended Timeframe Channel Definition : This multi-year perspective demonstrates the indicator's ability to define curved channel boundaries across extended timeframes spanning hundreds of bars and multiple market cycles. The resistance curve captures the rounded distribution of swing highs while the support curve follows the accelerating base formation, creating a non-linear channel that frames long-term structural trends more precisely than traditional parallel channels or static trendlines.
Rounding Bottom Reversal and Channel Convergence : This example captures a classic rounding bottom formation—a reversal pattern that linear tools cannot adequately define. The Quadratic method produces a smooth parabolic arc through the resistance anchors, tracing the deceleration of the downtrend, the capitulation low, and the subsequent re-acceleration upward as a single continuous curve. The support boundary mirrors this momentum shift from below, creating a curved channel that narrows toward current price. This convergence represents structural compression—the boundaries tightening as volatility contracts and directional resolution approaches. Price action oscillates within these non-linear boundaries, demonstrating that channel behavior persists even when the geometry is curved rather than parallel. The projection extends both curves forward, mapping the hypothetical trajectory if the current momentum structure continues, providing visual context for potential breakout or breakdown levels as the channel reaches its apex.
Built-in Precision vs. Algorithmic Power : While TradingView offers basic curve drawing tools (shown here as dashed lines), the Flexible S/R Channels indicator elevates this concept into a functional analytical framework. By converting manual observations into mathematical models, it moves beyond mere drawing to provide a data-driven structure that can be utilized for advanced technical analysis and future Pine Script trading logic.
⚙️ TECHNICAL DETAILS ⚙️
Curve Fitting vs. Overfitting: The term curve fitting often carries negative connotations in quantitative analysis due to its association with overfitting—the practice of adjusting a model until it perfectly matches historical data, producing an illusion of accuracy that fails when applied to new data. The application here is fundamentally different. Flexible S/R Channels does not optimize parameters to maximize historical fit; it constructs a mathematical curve through user-selected anchor points, then projects that curve into unknown territory. The curve is not fitted to price data—it is fitted to structural pivots identified by the trader. The projection represents a hypothesis about trajectory continuation, not a prediction derived from statistical optimization. Future price action validates or invalidates this hypothesis in real time, exactly as it does with any trendline or channel. The anchor points remain fixed unless manually adjusted, ensuring the curve does not adapt to new data retroactively.
Non-Repainting Behavior: The indicator does not repaint historical bars. The mathematical coefficients that define each curve are calculated once—when the final anchor point is set—and stored as fixed values. These coefficients remain constant unless an anchor point is manually repositioned. The backfit polyline is drawn once using these coefficients, spanning the known range from the first to last anchor point. The plot() function applies the same coefficients to each subsequent bar, updating in real-time as new bars form but never altering previously plotted values. The projection polyline extends forward from the current bar using the same fixed coefficients, projecting a user-defined number of future bars (maximum 500). This projection redraws on each tick to maintain its position relative to the moving current bar, but the mathematical trajectory remains constant—only the starting point advances. The current bar's curve value will update tick-by-tick as price develops, which is standard real-time behavior, not repainting. Once a bar closes, all curve values on that bar are permanent. The hybrid architecture (backfit polyline for known history, plot() for unlimited real-time range, projection polyline for controlled forward extension) prevents overflow errors while maintaining non-repainting integrity across all components.
🗒️ NOTES 🗒️
The indicator renders curves based on any anchor points provided without validation. Unusual anchor placement produces mathematically accurate but potentially non-useful results. Adjustment is iterative—if the curve doesn't match expectations, reposition the anchors.
Because anchor points are stored as specific time and price coordinates, a new instance of the indicator should be added when analyzing a different chart or timeframe.
Grip handles can be hidden by setting Grip Size to zero in the settings. This is useful for clean chart screenshots or presentations where interactive elements are not needed.
Projection length can be set to zero if forward-looking curves are not desired. The indicator will still render the backfit curves through the anchor points and continue plotting in real-time without the dotted projection extensions.
Anchor points remain fixed at their selected time-price coordinates as new bars form. The curves extend forward automatically from these historical anchors, allowing observation of how projected trajectories align with developing price action.
⚠️ DISCLAIMER ⚠️
The Flexible S/R Channels indicator is a visual analysis tool designed to illustrate geometric market inertia and serve as a framework for understanding dynamic support and resistance. While the indicator generates structural channels and projected paths, no guarantee is made regarding the accuracy or profitability of these projections. Like all technical indicators, the curves and boundaries generated by this tool may appear to align with favorable trading opportunities in hindsight. However, these visualizations are not intended as standalone recommendations for trading decisions. This indicator is intended for educational and analytical purposes, complementing other tools and methods of market analysis.
🧠 BEYOND THE CODE 🧠
Flexible S/R Channels is part of a broader collection of tools designed to provide structured market analysis. This includes the Grid Bot Simulator , the Grid Bot Auto , the Grid Bot Parabolic , and the Gridbot Ping Pong . While each tool serves a distinct purpose, they all utilize dynamic anchor mechanics and non-linear boundaries to adapt to evolving market conditions.
This indicator shares the same educational philosophy as the Fibonacci Time-Price Zones and the Fibonacci Geometry Series - providing frameworks for understanding market concepts through visualization and experimentation rather than black-box signals.
The Flexible S/R Channels indicator, like other xxattaxx indicators , is designed to encourage both education and community engagement. Feedback and insights are invaluable to refining and enhancing this tool. We look forward to the creative applications, observations, and discussions this indicator inspires within the trading community. อินดิเคเตอร์

Power Hour Trendlines [LuxAlgo]The Power Hour Trendlines indicator is based on Power Hours detection, and includes up to three displayed trendlines derived from the closing prices of all the bars within the last user-selected Power Hours.
Users can edit the time of Power Hours, choose how many sessions to take into account, enable or disable any trendlines, and change their colors.
🔶 USAGE
The Power Hour is defined as the last hour of the trading session and is set by default from 3:00 p.m. to 4:00 p.m. New York time. During this period, volume and volatility enter the market. Traders using higher timeframes may use this period to enter or exit positions by placing MOC (Market on Close) orders.
This tool works under the hypothesis that prices made during power hours (periods with high trading activity) are more relevant when used for the construction of trendlines.
An initial trendline is fit using linear regression; prices from power hours located above this initial fit are used for the upper trendline, while the ones below the fit are used for the lower one.
As with any trendline, traders can analyze the slope to determine the market's direction:
Positive slope: The market is trending up.
Negative slope: The market is trending down.
No slope: The market is trending sideways.
As we can see in the image, Nasdaq and Bitcoin are clearly in downtrends, gold is clearly in an uptrend, and the euro/U.S. dollar is in a sideways market over the last visible sessions.
As you can see, the trend lines may or may not be parallel to each other. The wider the area, the more volatile the data. The narrower the area, the less volatile the data. Let's look at an example.
In the image, the Dow30 and the euro/U.S. dollar have opposite behaviors. The volatility above the middle trendline is growing in the first case but shrinking in the second. In both cases, the volatility in the bottom area seems steady, so there are no big surprises there.
Traders can adjust the number of sessions for calculations, making the tool ideal for analyzing price behavior over different time frames.
As the image shows, we can clearly see how the market behaves over different time periods. XLY has been moving down over the last 10, 20, and 40 sessions, with a steeper decline over shorter periods. However, it has been moving sideways over the last 70 sessions.
One of the main uses of trendlines is to provide key support and resistance. In the image, SPY is shown with trendlines over the last 20 sessions. These lines provide excellent reference points for trading and observing price behavior in those areas, such as whether prices are accepted or rejected, which may trigger a response from other traders.
🔹 Not Allowed Timeframes
For obvious reasons, timeframes larger than 1H are not allowed. The Power Hour is defined as the last hour of the trading session. The tool will display a warning message if the timeframe is longer than 60 minutes.
🔶 SETTINGS
Power Hour (NY Time): Choose a custom Power Hour in New York time
Sessions Memory: Select how many Power Hours to take into account for calculations.
🔹 Style
Top: Enable or disable the top line and choose the line and background colors.
Middle: Enable or disable the middle line and choose the line color.
Bottom: Enable or disable the bottom line and choose the line and background colors.
Background: Enable or disable the background color for top and bottom lines.
อินดิเคเตอร์

ATR Bands (MA Distance)ATR Bands (MA Distance) plots volatility-based bands at a multiple of ATR away from a selected moving average.
Unlike percentage envelopes or standard deviation bands, this indicator measures distance from the moving average using ATR, representing the market’s normal “breathing range” rather than statistical probability.
Key Features
The center line is a selectable moving average (EMA, SMA, RMA/Wilder, or WMA).
Upper and lower bands are calculated as:
Moving Average ± ATR × Multiplier
Band width automatically adapts to changing market volatility.
Designed for consistent use across different markets and timeframes without parameter re-optimization.
Non-repainting: all values are calculated only from confirmed historical bars.
Intended Use
ATR Bands (MA Distance) is best used as a context and preparation tool , not as a direct entry or exit signal.
Typical use cases include:
Identifying areas where price is extended relative to its recent volatility.
Visualizing normal vs. stretched price distance from the moving average.
Supporting range-based analysis or trade preparation when combined with other indicators (e.g., oscillators).
Important Notes / How NOT to Use
This indicator does NOT generate buy or sell signals by itself .
Touching or crossing a band does not imply an automatic reversal.
In strong trending markets, price may stay outside the bands for extended periods.
ATR Bands should not be interpreted as overbought/oversold levels on their own.
This indicator does NOT repaint. Once a bar is closed, its values will not change.
For best results:
Use ATR Bands as a preparation zone, then wait for confirmation from your own entry logic.
Disable or ignore band-based mean-reversion ideas during strong trend conditions.
Concept Summary (Short)
ATR Bands (MA Distance) visualize how far price has moved from its moving average in terms of volatility, without repainting and without relying on percentage deviation or statistical assumptions.
Optional Short Description (Preview)
Volatility-based, non-repainting ATR bands plotted at a distance from a moving average.
Designed for market context and trade preparation — not standalone signals. อินดิเคเตอร์

Double&Triple Pattern[TS_Indie]📌 Description – Double & Triple Pattern Indicator
The Double & Triple Pattern Indicator is developed to help traders systematically and clearly identify Double Top, Double Bottom, Triple Top, and Triple Bottom chart patterns.
⚙️ Core Logic & Working Mechanism
The Double & Triple Pattern Indicator is built on the concept of price swing formation, based on the logic of Trend Entry_0 , which focuses on structured market analysis and price action behavior.
The indicator detects three main swing points (Swing 1, Swing 2, and Swing 3). A Fibonacci Box is then created using Swing A and Swing B as reference points to define the swing detection zone.
When all three swings remain inside the defined Fibonacci Box, the structure is considered a valid Price Action setup.
The indicator then plots key lines on the chart:
➩ Break Line – used to confirm the signal (confirmation)
➩ Cancel Line – used to invalidate the price action if price moves against the conditions
➛ When price breaks the Break Line , the structure is confirmed and a Pending Order is placed at Swing B , with the Stop Loss set at Swing 1.
➛ If price breaks the Cancel Line first, the price action structure is immediately invalidated.
⚙️ Fibonacci Entry Zone & Change SL Settings
➩ When Fibo Entry Zone is set to 0, the Pending Order is placed directly at Swing B.
➩ When the value is greater than 0, the Pending Order is calculated using Fibonacci levels drawn from Swing B to the Stop Loss level.
➩ Change SL allows switching the Stop Loss reference between Swing 1 and Swing A.
⚙️ Min & Max Control for Swing Size : xATR
When enabling Control Size Swing : xATR , the indicator filters Swing B based on the defined Min and Max range.
This allows traders to selectively test larger or smaller swing-based price actions , depending on their trading strategy.
⭐ Pending Order Cancellation Conditions
A Pending Order will be canceled under the following conditions:
1.A new Price Action signal appears on either the Buy or Sell side.
2.When Time Session is enabled, the Pending Order is canceled once price exits the selected session.
🕹 Order Management Rule
When there is an active open position, the indicator restricts the creation of new Pending Orders to prevent overlapping positions.
💡 Double Pattern Example
💡 Triple Pattern Example
⚠️ Disclaimer
This indicator is designed for technical analysis purposes only and does not constitute investment advice.
Users should apply proper risk management and make decisions at their own discretion.
🥂 Community Sharing
If you find parameter settings that work well or produce strong statistical results, feel free to share them with the community so we can improve and develop this indicator together.
กลยุทธ์

HMA 34 Dual-Fractal Projections - VdubusVdubus MacD Divergence Trend Break Signal Generator :Here:-
HMA 18 Dual-Fractal Projections
Overview
The HMA 18 Dual-Fractal Projections is a technical analysis tool designed to identify market structure and potential breakout patterns by analyzing the pivots of a Hull Moving Average (HMA).
Unlike standard trendline indicators that struggle to balance "big picture" trends with immediate price action, this indicator utilizes a Dual-Fractal approach. It simultaneously calculates two separate timelines—Macro and Micro—to visualize both the dominant channel and the developing chart patterns (such as wedges or triangles) in real-time.
Visual Guide
The indicator plots three key elements on the main chart:
The HMA Line (Blue): A smooth, fast-acting moving average (default length 34) that serves as the baseline for all calculations.
Macro Structure (Solid, Thick Lines):
Red (Solid): Major Resistance.
Green (Solid): Major Support.
Purpose: Identifies the long-term trend channel. These lines react slowly and filter out noise.
Micro Structure (Dashed, Thin Lines):
Red (Dashed): Immediate Resistance.
Green (Dashed): Immediate Support.
Purpose: Identifies the short-term market structure. These lines react quickly to show forming wedges, triangles, or flags.
How It Works
The indicator applies a "Pivot High/Low" algorithm directly to the HMA data rather than raw price data. This filters out candle wicks and volatility, ensuring lines are drawn based on established momentum shifts.
Layer 1 (Macro): Uses a large "Lookback" period (default 44 bars) to find significant peaks and valleys. It connects the most recent major pivot to the previous one, projecting a line forward to show where the major trend channel lies.
Layer 2 (Micro): Uses a small "Lookback" period (default 10 bars) to find local peaks and valleys. This allows you to see how price is behaving within the larger channel.
Settings & Configuration
HMA Settings
HMA Length: The length of the Hull Moving Average.
Default: 34 (Matches the "visually pleasing" setting from recent testing).
Note: Set to 18 for a faster, more reactive baseline (scalping).
Layer 1: Macro (Big Channel)
Macro Lookback: Determines how many bars must pass before a peak is confirmed.
Default: 44. High values find broad, established channels.
Max Macro Lines: How many historical lines to keep on the chart.
Default: 1 (Keeps the chart clean, showing only the current structure).
Extend Macro Lines: Projects the lines infinitely to the right to predict future support/resistance zones.
Layer 2: Micro (Current Pattern)
Micro Lookback: A lower sensitivity setting to catch immediate structure.
Default: 10. Low values will pinpoint the exact boundaries of small wedges or flags forming right now.
Trading Strategy & Interpretation
1. The "Squeeze" (Wedge Identification) This is the primary use case.
Look for scenarios where the Macro Lines (Solid) are wide/parallel, but the Micro Lines (Dashed) are rapidly converging (pointing towards each other).
This indicates that while the main trend is intact, momentum is compressing. A breakout is imminent where the dashed lines intersect.
2. Trend Channels
When both Solid and Dashed lines are roughly parallel and sloping in the same direction, the trend is healthy and strong. Price is respecting both the short-term and long-term momentum.
3. Divergence / Early Reversal Warning
If the Macro Line is sloping UP, but the Micro Line starts sloping DOWN (crossing inside), it indicates a loss of momentum and a potential reversal before the price actually breaks the major trendline.
===========================================================================
2. Micro/Macro Cross Alert
A new input, Enable Micro/Macro Cross Alert, has been added under the "Alerts & Features" section.
This alert condition is triggered when the momentum of the Micro Structure exceeds the momentum of the Macro Structure, which is a high-probability signal for a breakout:
Bullish Alert: The Micro High (dashed red line) crosses above the Macro High (solid red line).
Bearish Alert: The Micro Low (dashed green line) crosses below the Macro Low (solid green line).
To set up the actual alert on your chart:
Right-click on the chart.
Select "Add alert on HMA 34 Dual-Fractal Projections".
In the Condition dropdown, select the indicator's name.
For the main alert criteria, choose "Any alert()".
Select your preferred alert actions (e.g., notification, email). อินดิเคเตอร์

อินดิเคเตอร์

อินดิเคเตอร์
