Self-Aware Trend System [WillyAlgoTrader]🧠 Self-Aware Trend System (SATS) is an adaptive SuperTrend-based trend-following system that continuously measures its own operating environment through a 4-factor Trend Quality Index (TQI) and modulates band width, asymmetry, and flip logic in real time. Unlike a fixed SuperTrend — which uses the same ATR multiplier forever — SATS knows when the market is trending vs. chopping, compresses bands in clean trends to lock profit tighter, widens them in noisy conditions to avoid whipsaws, and can detect regime collapse through a "character-flip" even when price hasn't broken the band yet. Each confirmed signal comes with a full trade plan (Entry, SL, TP1/TP2/TP3 at user-defined R multiples), and the system tracks its own realized R, win rate, drawdown, and per-regime edge — building an honest, instrument-specific performance log directly on your chart.
The name "Self-Aware" refers to one specific property: the indicator measures the quality of its own environment every bar and feeds that measurement back into its band width and flip conditions. It doesn't predict the future — it reacts to present conditions with mathematically defined adaptation rules.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A classic SuperTrend has one problem: its ATR multiplier is fixed. In a clean trending market the bands are too wide, giving back profit on every pullback. In a choppy market the bands are too tight, generating whipsaw after whipsaw. Traders try to fix this by manually switching multipliers per timeframe or per instrument — but that's guesswork.
SATS chains a different approach:
Market state measurement (TQI) → Non-linear band modulation → Asymmetric band widths → Character-flip detection → R-multiple trade plan → Outcome tracking → Regime-aware statistics
The TQI engine measures market quality from four independent angles each bar (efficiency, volatility regime, structure, momentum persistence). The non-linear modulation translates that quality into band width — high quality compresses bands, low quality expands them, using a power curve that avoids both over-reacting to mild fluctuations and under-reacting to severe regime changes. Asymmetric bands tighten the active side (in the direction of the trend) while loosening the passive side — creating a "ratchet with leverage" that locks in profit faster than it invalidates the trend. Character-flip detection catches regime collapses (high quality → low quality) even when price hasn't broken the band — critical for exiting stale trends before they fully reverse. And performance tracking records every signal's realized R, building a real statistical picture of how the system performs on your specific instrument and timeframe.
Without TQI, the bands are blind. Without asymmetry, profit-taking lags. Without character-flip, exits happen too late. Without performance tracking, you have no idea if the system has a real edge on your instrument. All four work together — each layer addresses a specific weakness of classic SuperTrend.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Trend Quality Index (TQI) — 4-factor continuous quality measurement.
TQI is computed every bar as a weighted combination of four independent 0..1 factors:
— 🧭 Efficiency (default weight 0.35) : Kaufman Efficiency Ratio = |close − close | / sum(|close − close |). Measures directional movement vs. total path. 1.0 = perfect straight line, 0.0 = pure noise. Default window 20 bars.
— 📊 Volatility Regime (weight 0.20) : uses Volume Z-score when volume data is available (z = (volume − sma) / stdev, mapped from to ), or falls back to ATR ratio (current ATR vs. long-baseline ATR) on volume-less instruments.
— 🏗️ Structure (weight 0.25) : price position within its recent range. pricePos = (close − lowest) / (highest − lowest). Then tqiStruct = |pricePos − 0.5| × 2. Trends pin price to one edge (1.0), chop oscillates around the midpoint (0.0). No ATR dependency.
— ⏩ Momentum Persistence (weight 0.20) : of the last N bars, what fraction moved in the same direction as the overall window change? alignedBars / N. Default 10 bars.
Final TQI = (factor1 × w1 + factor2 × w2 + factor3 × w3 + factor4 × w4) / sum(weights), clamped to 0..1. Each weight is user-configurable.
2️⃣ Non-linear band modulation with power curve.
Instead of a linear "multiplier × (1 − tqi)", SATS uses a power curve:
qualityDeviation = (1 − tqi)^curvePower
tqiMult = 1 − qStrength + qStrength × (0.6 + 0.8 × qualityDeviation)
With curvePower = 1.5 (default), mild quality drops (from 0.9 to 0.7) cause small band expansion, but severe drops (0.5 to 0.2) cause rapid expansion. This matches how traders actually think: ignore small wobbles, react strongly to clear regime changes.
3️⃣ Asymmetric band widths — ratchet with leverage.
In a strong uptrend, the lower band (active, trailing price up) tightens while the upper band (passive, not used as stop) widens:
activeMult = symMult × (1 − asymStrength × tqi × 0.3)
passiveMult = symMult × (1 + asymStrength × tqi × 0.4)
Effect: as trend quality rises, the trailing stop moves closer to price (locking profit faster) while the opposite band moves away (so an accidental pullback doesn't trigger a flip). This is the "leverage" — asymmetric response to confirmed trend strength.
4️⃣ EMA-smoothed multipliers before ratchet application.
Raw TQI can spike bar-to-bar. If those spikes fed directly into the SuperTrend ratchet logic, bands would compress at a high-TQI bar and stay stuck there (SuperTrend math never loosens active bands against the trend). SATS EMA-smooths the multipliers (alpha 0.15) before ratchet application — preventing stickiness. This is the critical fix that makes adaptive SuperTrend actually work in practice.
5️⃣ Efficiency-weighted ATR.
Used for band construction and SL/TP sizing (not for TQI itself, to avoid circular feedback):
effATR = rawATR × (0.5 + 0.5 × ER)
Clean trending volatility counts full (ER = 1.0 → effATR = rawATR). Noisy chop volatility is halved (ER = 0.0 → effATR = 0.5 × rawATR). This makes SL/TP distances proportional to "useful" volatility, not total volatility.
6️⃣ Character-flip detection with age guard.
Classic SuperTrend only flips on price breaks. But a trend can die internally — quality collapses, momentum fades — before price actually breaches the band. Character-flip catches this:
charFlipDown = prevTQI > 0.55 (high) AND currentTQI < 0.25 (low) AND trendAge ≥ minAge AND close < source
The age guard (default 5 bars) prevents whipsaw on fresh trends — a newborn trend hasn't had time to establish quality, so early TQI noise can't kill it. After the age threshold, a quality collapse triggers an immediate flip even without price break.
7️⃣ Auto-fixed TP order.
If a user accidentally sets TP1 > TP2 (or TP3 < TP2), the indicator automatically sorts them. Math: fixedMin = min(all), fixedMax = max(all), middle = sum − min − max. The three TP lines always end up in correct order on the chart regardless of user input order.
8️⃣ R-multiple trade planning with pivot-anchored SL.
On each signal:
— Entry = close at bar of confirmed flip
— SL = min(pivot − slMult×ATR, entry − slMult×ATR) for longs (mirror for shorts)
— TP1/2/3 = entry ± risk × R-multiple
The SL uses whichever is further from entry — the recent pivot (if available) or a pure ATR distance. This ensures the stop always has a minimum ATR buffer regardless of how close the nearest pivot is.
9️⃣ Performance tracking with realized R accounting.
Every signal is tracked bar-by-bar for TP hits, SL hits, and timeout (default 100 bars). On close-out, realized R is calculated assuming 1/3 position per TP:
— TP3 hit: realized = (tp1R + tp2R + tp3R) / 3 (all three filled)
— SL hit after TP1: realized = (1/3) × tp1R + (2/3) × (−1R)
— SL hit after TP1+TP2: realized = (1/3) × tp1R + (1/3) × tp2R + (1/3) × (−1R)
— Pure SL: realized = −1R
— Timeout: realized = sum of already-hit TP portions (no penalty)
Results feed a rolling buffer (up to 100 signals), which drives:
— Rolling Win Rate
— Rolling Avg R
— Rolling drawdown (window DD)
— All-time drawdown
— Current and max win/loss streaks
🔟 9-cell regime edge tracking.
Every completed signal is bucketed by the market regime at entry time: Efficiency bin (low/mid/high) × Volatility bin (low/normal/high) = 3×3 = 9 cells. Each cell accumulates its own EWMA of realized R. The dashboard shows the current regime's historical edge — e.g., "Trending + High Vol: +0.85R (23 trades)". This lets you see which market conditions the system actually profits in.
1️⃣1️⃣ Experimental self-calibration (off by default).
When enabled, the system monitors its rolling avg R and drifts the Quality Influence parameter toward the user default if recent edge is poor (below threshold). This is explicitly marked experimental — no claim of improved results — and recommended off until validated on your instrument.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — TQI computation : Compute four factors (Efficiency, Volatility Regime, Structure, Momentum Persistence). Weight and combine into a single 0..1 value.
Step 2 — ATR and effective ATR : rawATR = ta.atr(len). effATR = rawATR × (0.5 + 0.5 × ER).
Step 3 — Adaptive multiplier : Apply legacy ER adaptation (optional) and non-linear TQI curve. If asymmetric bands enabled, split into active/passive multipliers.
Step 4 — EMA smoothing : Smooth both multipliers with alpha 0.15 to prevent ratchet stickiness.
Step 5 — SuperTrend bands : upperBand = source + upperMult × effATR. lowerBand = source − lowerMult × effATR. Ratchet logic: lower only rises, upper only falls, until a flip.
Step 6 — Flip detection : Price flip (close crosses opposite band) OR character-flip (TQI collapse + age guard). On flip: reset trend age, start new segment.
Step 7 — Trade plan : On confirmed flip, compute Entry/SL/TP1/TP2/TP3. Draw lines and labels. Cache the market regime (ER bin × Vol bin) for later edge attribution.
Step 8 — Outcome tracking : Each bar, check active trade for TP1/TP2/TP3/SL hits and timeout. On close-out, calculate realized R, push to history buffer, update rolling stats, drawdown, streaks, and regime cell.
Step 9 — Dashboard render : On last bar, render live state (Trend, TQI, regime, performance stats, TQI breakdown, regime edge).
📖 HOW TO USE
🎯 Quick start:
1. Add indicator — preset is "Auto" (adapts to your current timeframe)
2. Green line = bullish trend, red = bearish trend
3. Line transparency reflects TQI: bright = high quality, faded = low quality
4. ▲ BUY / ▼ SELL labels appear on confirmed flips
5. Entry, SL, TP1, TP2, TP3 lines drawn automatically at the signal
6. Copy levels to your exchange, let the dashboard track outcomes
👁️ Reading the chart:
— 🟢 Bright green line = bullish trend with high TQI — aggressive participation
— 🟢 Faded green line = bullish trend with low TQI — cautious, possible regime shift
— 🔴 Bright red line = bearish trend with high TQI
— 🔴 Faded red line = bearish trend with low TQI
— Line flip + label = new trade signal
— Dashed TP lines turning solid + "✓" = TP was hit
— Score on label (e.g., "85/102") = multi-factor confluence strength
📊 Dashboard fields:
— Preset: Auto-resolved (Scalping / Default / Swing / Crypto)
— Trend: Bullish ▲ / Bearish ▼
— TQI: current quality index (0..1)
— Q.Strength: effective Quality Influence (may drift if auto-calibration enabled)
— Signal: current bar signal (BUY / SELL / —)
— Regime: Trending / Mixed / Choppy + Low/Norm/High Vol
— ER / RSI / Vol Z: raw filter values
— TQI Components breakdown: Efficiency / Volatility / Structure / Momentum (each 0..1)
— Performance section: Win Rate, Avg R, Window DD, All-Time DD, Streak W/L, Regime Edge
🔧 Tuning guide:
— Too many whipsaws : increase Quality Influence (0.5–0.7), increase Structure weight, increase Base Band Width
— Missing moves / signals too late : decrease Quality Influence (0.2–0.3), decrease Base Band Width, increase asymmetry
— Choppy instrument : use Swing preset, enable Character-Flip, raise minAge to 10+
— Strong trending instrument : use Scalping preset, enable Asymmetric Bands with strength 0.6+
— No volume data : automatically falls back to ATR ratio for volatility regime — no action needed
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Preset : Auto / Custom / Scalping / Default / Swing / Crypto 24/7 (auto-adapts ATR, band width, ER window, RSI, SL multiplier)
— ATR Length (13), Base Band Width (2.0 × ATR)
📐 Trend Quality Engine:
— Enable TQI (default On)
— Quality Influence (0.4): how strongly TQI compresses/expands bands
— Quality Curve Power (1.5): non-linearity
— Smooth Adaptive Multipliers (On): critical fix for ratchet stickiness
— Asymmetric Bands (On) + Asymmetry Strength (0.5)
— Efficiency-Weighted ATR (On)
— Character-Flip (On) + Min Age (5) + High/Low TQI thresholds (0.55 / 0.25)
— TQI factor weights : ER 0.35, Volatility 0.20, Structure 0.25, Momentum 0.20
🎯 Risk:
— SL Buffer (1.5 × ATR), TP1/2/3 R-multiples (1.0 / 2.0 / 3.0), Trade Timeout (100 bars)
🤖 Self-Learning (experimental):
— Auto-calibration (default Off), calibration window, bad/good R thresholds, quality step, cooldown, floor/ceiling
— Reset Learning Memory button
📊 Dashboard: position, TQI breakdown toggle, performance stats toggle, score breakdown toggle
🔔 Alerts
— 🟢 BUY — ticker, TF, price, TQI, score, SL, TP1, TP2, TP3
— 🔴 SELL — same payload
Plain text and JSON webhook formats supported. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. SuperTrend ratchet logic is monotonic — once the trailing band moves, it cannot move back against the trend until a flip. Character-flip uses only previous-bar TQI and current-bar close, both available at bar close.
— 📊 TQI is descriptive, not predictive. It measures current market quality from 4 factors — it does not forecast future price. A high TQI reading means "the market is currently behaving like a trend" — it can still fail on the next bar.
— 📏 Performance stats are walk-forward, not backtested. The rolling buffer records signals as they happen, bar by bar. Drawdown, win rate, and regime edge are honest forward-looking statistics on your specific instrument and timeframe — not curve-fitted optimization results.
— ⚖️ The realized R accounting assumes 1/3 position per TP . This mirrors a standard "scale out at each target" approach. Traders who hold full position to a single target should interpret the R values accordingly.
— 🔄 Auto-calibration is experimental. It's off by default and should stay off until you've validated it on your specific instrument. The drift is mean-reverting (toward your user default), not profit-maximizing — no claim of improvement is made.
— 🔒 The Reset Learning Memory button clears the rolling buffer, regime cells, drawdown, and streak stats. Use when changing instruments or after significant market regime shifts.
— 🛠️ SATS is a decision-support and trade-planning tool , not an automated bot. It identifies trend conditions, measures environmental quality, provides structured trade plans with R-based targets, and tracks outcomes — trade decisions and execution remain yours.
— 🌐 Works on all markets and timeframes. Volume-dependent features (Volume Z in TQI) auto-fall-back to ATR-based measurement when volume data is unavailable. Indicator

AG Pro Trend Continuation Quality [AGPro Series]AG Pro Trend Continuation Quality
Overview / What it does
AG Pro Trend Continuation Quality is an overlay built to evaluate whether a pullback is behaving like a healthy retracement inside an active trend, or whether the move is losing structural quality before continuation can develop.
Instead of treating every dip in an uptrend or every pop in a downtrend as equally important, the script isolates pullback sequences and scores them through a continuation-quality framework. The goal is not to predict every next candle. The goal is to help traders judge whether the market is showing disciplined retracement behavior that often precedes trend continuation.
The model combines trend alignment, pullback depth, pullback duration, relative volume behavior during the retracement, and the strength of the bounce candle that attempts to resume the trend. These conditions are translated into a compact quality score so the user can quickly separate cleaner continuation structures from weaker ones.
On the chart, the script highlights pullback zones, tracks the retracement box, displays a continuation-quality label, and maintains an information panel that summarizes trend state, recent quality readings, best quality, average quality, and internal distribution data. The result is a workflow-oriented continuation map rather than a simple trend-following overlay.
Unique Edge
The distinctive part of this script is that it does not label trend continuation from trend direction alone. A bullish EMA stack or bearish EMA stack is not enough by itself. The script specifically evaluates the quality of the retracement before the continuation attempt is scored.
That makes it meaningfully different from basic EMA trend tools, pullback highlighters, or single-condition continuation signals. Many tools can say that price is above or below an average. Fewer tools attempt to measure whether the internal anatomy of the pullback remains constructive for continuation.
The scoring engine focuses on five practical questions:
1. Is the broader trend aligned?
2. Is the pullback still structurally controlled rather than excessively deep?
3. Did the retracement last a reasonable number of bars?
4. Did volume contract during the pullback instead of expanding aggressively against trend?
5. Did the bounce show enough intent to suggest renewed directional participation?
This creates a cleaner framework for evaluating continuation setups in a way that is visual, systematic, and easier to compare across multiple pullbacks on the same chart.
Methodology
The script first determines directional context using EMA alignment and, when needed, swing-structure logic. This creates a working trend state that frames whether the script should be looking for bullish or bearish pullback behavior.
Once a directional leg is active, the script begins tracking a pullback when price retraces against that trend. During the retracement, it measures:
- how far the pullback travels relative to the prior trend leg,
- how many bars the pullback lasts,
- how pullback volume compares with the prior expansion leg,
- and whether the bounce candle shows convincing re-engagement.
These components are translated into a 0 to 10 quality score. Higher scores represent more orderly and structurally coherent pullbacks. Lower scores represent weaker or more suspect retracements.
The visual output is designed to make those evaluations easier to read in real time:
- pullback boxes frame the retracement zone,
- optional fib-depth line shows the deepest retracement point tracked inside the pullback,
- labels display score, quality grade, depth, duration, and relative volume,
- panel metrics summarize the current continuation environment.
Signals & Alerts
The script is designed as a quality-mapping tool, not as an automatic trade system.
Its event logic revolves around the completion of a pullback and the appearance of a bounce candle that attempts to resume the trend. When that bounce qualifies, the script calculates the final continuation-quality score and can display the setup if it meets the user-defined minimum score threshold.
Available workflow signals include:
- active bullish or bearish trend state,
- pullback in progress,
- completed pullback with scored continuation attempt,
- high-quality continuation events when the score reaches stronger thresholds.
Optional alerts can be used for:
- high-quality continuation conditions,
- or any scored pullback event, depending on user preference.
Because alerts are tied to the script’s scoring and confirmation logic, they are intended to support chart review and decision-making rather than act as guaranteed execution instructions.
Key Inputs
EMA Fast Length / EMA Mid Length / EMA Slow Length
These define the trend stack used to frame directional bias.
Swing Pivot Length
Controls the swing-structure sensitivity used in secondary trend detection.
Max Pullback Depth (%)
Defines how strict the script is when assessing whether a retracement remains healthy relative to the prior trend leg.
Min Pullback Bars / Max Pullback Bars
Controls the acceptable pullback duration window.
Volume Decline Ratio
Helps determine whether the retracement is occurring on lighter activity relative to the prior directional leg.
Minimum Score to Display
Filters weaker continuation events from the chart.
Label Size / Label Offset / Reduce Label Overlap
Lets the user adapt chart readability to their own zoom level and instrument volatility.
Panel Position / Panel Font Size / Panel Theme
Allows the continuation dashboard to be integrated into different chart layouts without dominating screen space.
Limitations & Transparency
This script does not know future market intent. It evaluates observable price and volume behavior after conditions form on the chart.
A high score does not guarantee continuation. It only indicates that the completed pullback meets the script’s internal definition of stronger continuation quality relative to other pullbacks.
The model is also sensitive to market regime. Trend continuation behavior tends to be clearer in directional markets and less reliable in highly compressed, erratic, or news-driven conditions.
Volume behavior can vary across instruments and data feeds. On some assets, especially where volume data is synthetic, limited, or structurally uneven, the volume component should be interpreted with caution.
Like other structure-based tools, this script can produce different practical usefulness depending on timeframe, instrument, volatility regime, and chart cleanliness. Users should calibrate inputs based on the market they are studying rather than treating defaults as universal settings.
This script should not be viewed as:
- a prediction engine,
- a standalone trade system,
- a replacement for risk management,
- or a guarantee that a bounce will develop into a full continuation leg.
Risk Disclosure
This script is for chart analysis and educational use. It is designed to help users study pullback quality inside established trends, not to provide financial, investment, or trading advice.
All trading and investing involve risk. Market conditions can change quickly, and even high-quality continuation structures can fail. Users should apply their own confirmation process, position sizing rules, and risk controls before acting on any market observation.
Use the script as a structured continuation framework, not as certainty.
Indicator

AG Pro Ichimoku Cloud Equilibrium Map [AGPro Series]AG Pro Ichimoku Cloud Equilibrium Map
Overview / What it does
AG Pro Ichimoku Cloud Equilibrium Map is an Ichimoku-based overlay designed to map balance, displacement, and return-to-balance behavior around a dynamic equilibrium core. Instead of using Ichimoku primarily as a traditional bullish/bearish checklist, this script reorganizes the framework around one structural question: where is price trading relative to its current equilibrium, and is that position balanced, expanding, overstretched, or reclaiming balance?
The script blends Kijun-Sen with the cloud midpoint to build an equilibrium core, then expands that core into an adaptive equilibrium band using ATR and cloud thickness. From there, it classifies how price is behaving around that band and displays the result through chart states, optional labels, and a compact information panel.
This script is intended as a chart analysis tool. It is built to help users read structure more efficiently, especially when standard Ichimoku layouts feel visually dense or interpretation-heavy.
Unique Edge
The main difference is that this script does not treat Ichimoku as a simple trend confirmation overlay. It converts the Ichimoku framework into an equilibrium map.
Rather than focusing only on whether price is above or below the cloud, this script asks:
- Is price still near structural balance?
- Is price moving away from equilibrium in a controlled way?
- Has the move become stretched?
- Is price returning back into equilibrium after displacement?
That makes it different from a standard Ichimoku presentation, where the raw components are visible but the user must do most of the structural interpretation manually.
It is also different from other AG Pro scripts built around breakout quality, oscillator pressure, compression behavior, or reversion frameworks. This tool is specifically centered on equilibrium, extension, and reclaim behavior using an Ichimoku-derived structure model.
Methodology
The script uses the following structure:
1. Kijun-Sen
Kijun-Sen is used as one of the main balance anchors.
2. Cloud midpoint
The midpoint between Span A and Span B is used as a second structural reference.
3. Equilibrium core
The script combines Kijun-Sen and the cloud midpoint into a dynamic equilibrium core.
4. Equilibrium band
An adaptive band is built around the equilibrium core using ATR and cloud thickness. This allows the model to respond differently in quieter and more volatile conditions.
5. Stretch zones
Beyond the equilibrium band, the script defines stretch areas that help distinguish normal directional expansion from more extended displacement.
6. Reclaim logic
When price moves back into the equilibrium region after being outside it, the script can classify that transition as a reclaim state.
This methodology is designed to make Ichimoku structure more explicit without removing the original context of the cloud framework.
States / Signals & Alerts
The script classifies chart behavior into the following states:
Balanced
Price is trading inside the equilibrium band.
Bullish Expansion
Price is trading above the equilibrium band with supportive directional structure.
Bearish Expansion
Price is trading below the equilibrium band with supportive directional structure.
Overstretched Bullish
Price is extended above the stretch threshold.
Overstretched Bearish
Price is extended below the stretch threshold.
Bullish Reclaim
Price has returned into the equilibrium region after trading below it.
Bearish Reclaim
Price has returned into the equilibrium region after trading above it.
Available alert conditions:
- Bullish Expansion
- Bearish Expansion
- Overstretched Bullish
- Overstretched Bearish
- Bullish Reclaim
- Bearish Reclaim
These states and alerts are descriptive tools for chart analysis. They are not a complete trade plan and should be interpreted in context.
Key Inputs
Ichimoku settings
Users can adjust Tenkan length, Kijun length, Senkou Span B length, and displacement.
Equilibrium engine settings
Users can control ATR length, equilibrium band sensitivity, cloud-thickness contribution, stretch sensitivity, and chop lookback.
Visual settings
Users can control cloud visibility, Kijun visibility, equilibrium band visibility, stretch zones, state labels, label density, and panel appearance.
These inputs allow the script to be tuned for different symbols, volatility conditions, and chart preferences.
Limitations & Transparency
This script is an indicator, not a strategy.
It does not place trades, manage positions, calculate performance, or guarantee outcomes.
The Equilibrium Score is an internal structure summary built from distance, alignment, cloud thickness, Tenkan/Kijun spread, reclaim contribution, and chop penalty. It is not a probability model, not a forecast, and not a standalone decision engine.
Overstretched conditions do not automatically imply reversal.
Reclaim conditions do not automatically imply continuation.
Expansion conditions do not automatically imply strength will persist.
As with any chart tool, interpretation depends on market regime, timeframe, volatility, and the user’s broader workflow. In noisy environments, state changes can occur more frequently. The script includes filters to reduce clutter, but no indicator removes uncertainty completely.
Risk Disclosure
This script is provided for research and chart analysis only.
It is not financial advice. Users should evaluate any signal, state change, or alert within their own process, risk framework, and market context before making decisions.
Indicator

Pulse Trend Radar [WillyAlgoTrader]⦿ Pulse Trend Radar is an overlay indicator built on a Kaufman Adaptive Moving Average (KAMA) core with median-ATR volatility bands — producing an adaptive trend system that speeds up in trending markets and slows down in noise. Every trend flip generates a signal scored by a 4-factor quality engine (0–100) with letter grades (A+ through C). The indicator also detects and visualizes liquidity zones from pivot highs/lows, marks order blocks from the last opposite candle before each trend flip, tracks real-time P&L with a live trade tracker, and monitors win/loss outcomes — creating a complete trend-following framework with Smart Money context.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A trend indicator alone tells you direction — but not whether the entry is near a liquidity pool (where stops cluster), not whether there's institutional supply/demand nearby (order blocks), not how strong the signal is (all flips treated equally), and not how the system performs over time (no feedback).
This indicator layers four analysis dimensions onto the adaptive trend core:
KAMA adaptive trend + median ATR bands → Trend direction and flip detection
Liquidity zones from pivots → Where stop-hunts and liquidity grabs are likely
Order blocks from pre-flip candles → Where institutional supply/demand was established
4-factor signal scoring → Quality filtering — not all flips are equal
Win/loss tracker → Performance feedback on this instrument and timeframe
The KAMA core adapts its speed via the Efficiency Ratio — in a strong trend, the MA tracks price closely and the bands tighten, producing early signals. In choppy conditions, the MA barely moves and the bands widen, filtering out noise. The liquidity zones show where clusters of stops sit (above pivot highs, below pivot lows) — entries near these zones have higher follow-through because the liquidity grab fuels the move. The order blocks mark the institutional footprint before each trend change — these zones often act as support/resistance on retests. And the signal score combines trend strength, volume delta, efficiency acceleration, and liquidity proximity into a single quality metric — letting you prioritize A+ setups over C-grade ones.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Kaufman Adaptive Moving Average (KAMA) trend core.
The KAMA computes a smoothing constant from the Efficiency Ratio:
ER = |price − price | / sum(|price − price |, N)
fastSc = 2 / (fastLen + 1), slowSc = 2 / (slowLen + 1)
sc = (ER × (fastSc − slowSc) + slowSc)²
KAMA = KAMA + sc × (price − KAMA )
When ER → 1 (pure trend): sc approaches fastSc² → KAMA tracks price tightly. When ER → 0 (pure noise): sc approaches slowSc² → KAMA barely moves. This produces a line that accelerates into trends and goes flat in chop — without any manual period switching.
2️⃣ Median ATR volatility bands.
Instead of standard ATR (arithmetic mean of true ranges), the indicator uses a median of recent true ranges computed via a ring buffer over the volatility lookback (default 50 bars). The median is more robust to outlier spikes (gap bars, flash wicks) than the mean — producing smoother, more stable band widths.
Bands: upper = KAMA + medianATR × multiplier, lower = KAMA − medianATR × multiplier. Trend flips when the previous bar's source price crosses beyond a band: source > upper → bullish, source < lower → bearish. The active band (lower in uptrend, upper in downtrend) is plotted as the trend line.
3️⃣ Displacement-based gradient fill.
The fill between the trend line and price is not a fixed transparency — it scales with displacement: displacement = |price − KAMA| / (medianATR × multiplier). The further price stretches from KAMA, the more intense the fill becomes (transparency decreases from 95 to 60). This creates a visual "heat map" effect: faint fill near KAMA (low extension), bright fill far from KAMA (overbought/oversold). This gives immediate visual feedback on how extended the current move is without needing a separate oscillator.
4️⃣ Liquidity zone detection and sweep tracking.
Pivot highs and lows (configurable lookback, default 4 bars) are marked as liquidity zones:
— Above pivot highs → bearish liquidity (buy stops cluster above swing highs — potential sell-side liquidity)
— Below pivot lows → bullish liquidity (sell stops cluster below swing lows — potential buy-side liquidity)
Each zone extends rightward as a thin box (height = 0.15× medianATR). Zones are automatically removed when price sweeps through them (high crosses above bearish zone top, or low crosses below bullish zone bottom) — representing the liquidity grab event. Up to 15 zones per side (configurable).
The signal scoring engine measures the nearest liquidity zone distance on each trend flip — entries closer to a liquidity pool receive a higher quality score because the stop-hunt provides fuel for the ensuing move.
5️⃣ Order block detection on trend flips.
When the trend flips, the previous bar is marked as an order block:
— Bullish flip → demand order block (the last bearish candle before the reversal — where institutional buying absorbed selling pressure)
— Bearish flip → supply order block (the last bullish candle before the drop — where institutions distributed)
Each OB is drawn as a box from the previous candle's high to low, extending rightward. OBs are automatically invalidated (deleted) when price closes beyond the opposite edge after 3+ bars — indicating the zone has been broken. Up to 10 OBs per side (configurable).
6️⃣ 4-factor signal quality scoring (0–100).
Each trend flip is scored on four factors:
— 📐 Trend strength (25 pts) : combined from ER (directional efficiency) and displacement from KAMA — measures how strong the trend is at the moment of the flip
— 📊 Volume delta alignment (25 pts) : buy volume vs sell volume accumulated during the previous trend leg — bullish flip with positive volume delta scores higher (smart money was accumulating)
— ⚡ Efficiency acceleration (25 pts) : current ER minus previous ER — positive acceleration means the trend is gaining momentum, not losing it
— 💧 Liquidity proximity (25 pts) : distance to the nearest liquidity zone — closer = higher score (the flip is near a liquidity grab point)
Grades: A+ (≥ 80), A (≥ 60), B (≥ 40), C (< 40). Signal labels display "Long A+" / "Short B" etc.
7️⃣ OBV-based volume regime detection.
On Balance Volume (OBV) delta = OBV − SMA(OBV, 20). Classified as:
— Accumulation : OBV delta > 0 — more volume on up-moves than down-moves (institutional buying)
— Distribution : OBV delta < 0 — more volume on down-moves (institutional selling)
Displayed in the dashboard with directional coloring. Auto-displays "N/A" on instruments without volume data.
8️⃣ Live trade tracker with P&L.
On each signal: a dashed entry line extends horizontally, a vertical connector line tracks from entry to current price, and a P&L label updates in real-time showing percentage gain/loss. Green = profit, red = loss. Replaced on each new signal.
9️⃣ Win/loss markers + win rate tracking.
Each signal is tracked as a mini-trade: entry at signal close, SL at entry ± medianATR × SL multiplier, TP1 at entry ± risk × TP1 multiplier. If TP1 is reached before SL → green ● marker at the signal bar (win). If SL is reached first → red ● marker (loss). Running win rate displayed in the dashboard as "67% (4W/2L)".
🔟 ATR-based TP/SL with hit tracking.
Three take-profit levels as risk multiples (default 1.0/2.0/3.0 × risk) plus SL (default 3× medianATR from entry). Lines extend rightward with labels showing price + percentage. Labels update with ✓ on hit (green) or ✗ on SL hit (red). Active until the next signal replaces them.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — KAMA: Efficiency Ratio from configurable lookback → adaptive smoothing constant → KAMA line that accelerates in trends, goes flat in chop.
Step 2 — Median ATR bands: True ranges stored in ring buffer → median computed → upper/lower bands = KAMA ± median × multiplier.
Step 3 — Trend detection: Previous bar's source > upper band → bullish flip. Source < lower band → bearish flip. Active band plotted as trend line. Gradient fill scales with displacement.
Step 4 — Liquidity zones: Pivot highs/lows → boxes above/below. Swept zones auto-deleted.
Step 5 — Order blocks: On flip → previous candle becomes OB. Invalidated when price closes beyond opposite edge.
Step 6 — Signal scoring: 4 factors (trend strength, volume delta, ER acceleration, liquidity proximity) → 0–100 → A+/A/B/C grade.
Step 7 — Trade tracking: SL/TP placed, lines extend, win/loss evaluated per trade.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — adaptive trend line, liquidity zones, and order blocks appear
2. "Long A+" / "Short B" labels = trend flip signals with quality grade
3. Green/red liquidity zone boxes = where stops cluster (potential sweep targets)
4. Green/red order blocks = institutional supply/demand zones
5. SL/TP lines auto-appear with P&L tracker
👁️ Reading the chart:
— 🟢 Green trend line = bullish (lower band active)
— 🔴 Red trend line = bearish (upper band active)
— 🟢/🔴 Gradient fill = displacement from KAMA (brighter = more extended)
— 🟢 Small boxes below price = bullish liquidity zones (buy-side stops)
— 🔴 Small boxes above price = bearish liquidity zones (sell-side stops)
— 🟢 Larger boxes = demand order blocks (institutional buying zone)
— 🔴 Larger boxes = supply order blocks (institutional selling zone)
— 🟢 ● = win (TP1 reached), 🔴 ● = loss (SL hit)
— Dashed line + PnL label = live trade tracker
📊 Dashboard fields:
— Trend: ▲ Bullish / ▼ Bearish
— Last Signal: BUY/SELL with grade
— Score: 0–100 quality rating
— Strength: trend strength percentage
— P&L: current trade percentage
— Win Rate: wins/losses with percentages
— SL / TP1: current trade levels with ✓/✗ status
— Vol Regime: Accumulation / Distribution
— Vol Delta: buy vs sell volume percentage
— Efficiency: current ER percentage
🔧 Tuning guide:
— Too many signals: increase Band Multiplier (2.0–2.5) or ER Length (15–20)
— Too few signals: decrease Band Multiplier (1.2–1.5) or ER Length (8–10)
— Signals too late: decrease Slow Smoothing (15–20), decrease Volatility Length (20–30)
— Stops too tight: increase SL ATR Multiplier (2.5–4.0)
— Want only A+/A signals: monitor grades in dashboard, skip B/C entries
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Efficiency Ratio Length (default 13): KAMA lookback — higher = smoother
— Fast/Slow Smoothing (default 2/30): KAMA acceleration/deceleration
— Band Multiplier (default 1.8): band width in median ATR
— Volatility Length (default 50): median ATR ring buffer size
🎯 SL/TP:
— SL (× ATR) (default 3): stop distance in median ATR
— TP1/TP2/TP3 (× risk) (default 1.0/2.0/3.0): R:R multiples
💧 Liquidity:
— Pivot Lookback (default 4) / Max Zones (default 15)
🟧 Order Blocks:
— Max Order Blocks (default 10)
🎨 Visual:
— Gradient fill, trade tracker, win/loss markers (all toggleable)
— Configurable signal label size (Tiny–Large)
— Configurable dashboard font size (Tiny–Normal)
— Auto / Dark / Light theme
🔔 Alerts
— 🟢 BUY / 🔴 SELL — ticker, price, TF, SL, TP1, TP3
All support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. Trend flips use the previous bar's source vs the previous bar's band value — the signal fires on the bar after the crossing bar closes. KAMA and band values are deterministic once a bar is confirmed.
— 📐 The median ATR is more robust than standard ATR . A single flash wick or gap bar shifts the mean (standard ATR) significantly but barely affects the median. This produces more stable band widths and fewer false flips during anomalous bars.
— 📊 Volume delta is accumulated within each trend leg and resets on every trend flip. It represents the buy/sell balance during the specific move — not the overall volume profile. The pre-reset delta value is used for the signal score (capturing the exiting leg's character).
— 💧 Liquidity zones are automatically swept and removed when price touches them. This prevents stale zones from cluttering the chart. If a zone disappears, it means price swept through it — the liquidity has been taken.
— 🟧 Order blocks are invalidated after 3+ bars if price closes beyond the opposite edge. This prevents old OBs that have clearly failed from persisting.
— ⚖️ The 4-factor score uses the volume delta from before the trend reset (preResetVolDelta) — not the current leg's delta, which would be zero at the moment of the flip. This correctly captures whether the previous leg had accumulation or distribution behind it.
— 📏 Win/loss tracking evaluates TP1 vs SL only — if TP1 is reached before SL, it's a win. The trade closes on the first event and is not re-evaluated.
— 🛠️ This is a trend-following signal and analysis tool , not an automated trading bot. It provides adaptive trend detection, liquidity context, order block zones, and signal quality grading — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Volume features auto-adapt to instruments without volume data (OBV and volume delta show "N/A"). Indicator

Breakout Pattern Setup [WillyAlgoTrader]📐 Breakout Pattern Setup is an overlay indicator that automatically detects converging price channels (wedges, triangles, pennants) by fitting trendlines to confirmed pivot points using a boundary-fit algorithm, then monitors for breakouts confirmed by a 5-factor strength scoring engine — with directional probability scoring while price is inside the channel, volume contraction verification, and automatic TP/SL placement based on the measured move (channel width projected from breakout). Once a breakout fires, the trade stays open until TP3 (full measured move) or SL is reached — with trailing to breakeven after TP1.
The core concept: converging channels compress volatility — when price breaks out of a narrowing range, the ensuing move tends to be proportional to the channel's maximum width. This indicator automates the entire workflow: detect pivots, fit upper and lower trendlines, verify convergence and volume contraction, score the breakout quality when it occurs, set targets based on the measured move, and track the trade to completion.
🧩 WHY THESE COMPONENTS WORK TOGETHER
Manual channel drawing is subjective — two traders will draw different trendlines from the same pivots. A breakout without strength scoring treats strong and weak breaks equally. Targets without measured-move anchoring are arbitrary.
This indicator chains each component into a sequential pipeline:
Pivot detection → Boundary-fit algorithm (best trendline pairs) → Convergence + width + volume contraction verification → Channel visualization → Directional probability scoring → Breakout detection + 5-factor strength scoring → TP/SL from measured move → Trailing SL to breakeven after TP1 → Trade outcome tracking (win rate)
The pivot detection feeds raw swing points to the boundary-fit algorithm. The algorithm tests all pivot pair combinations and selects the lines with the most touches and least deviation — producing objective, reproducible trendlines. The convergence filter ensures only narrowing channels qualify (not parallel channels or expanding formations). Volume contraction confirms the volatility squeeze is genuine. The directional score gives real-time probability before the breakout occurs. The 5-factor strength score evaluates the breakout candle itself. And the measured-move TP/SL system manages the trade from entry through breakeven trail to final outcome.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Boundary-fit trendline algorithm.
The algorithm finds optimal upper and lower trendlines by exhaustive search over confirmed pivots:
Upper boundary: For every pair of pivot highs (A, B) within the lookback window:
— Project a line through A and B
— Check all other pivot highs: none may exceed the line by more than deviationMax × ATR (no overshoots beyond tolerance)
— Count how many pivot highs fall within touchTolerance × ATR of the line (touches)
— Keep the pair with the most touches
Lower boundary: Same process for pivot lows — no undershoot beyond tolerance, maximize touches.
A trendline is projected via: y = y1 + (y2 − y1) × (x − x1) / (x2 − x1). The touch tolerance (default 0.15× ATR) and deviation maximum (default 0.3× ATR) are both ATR-normalized, adapting to the instrument's volatility.
The scan runs on new pivots and every 10 bars (configurable interval), testing up to 15 recent pivots per side — producing the objectively best-fitting converging channel from available data.
2️⃣ Multi-criteria channel validation.
A detected channel must pass all five checks:
— 📏 Convergence : the channel is narrowing — current width < starting width. Convergence rate = 1 − (widthNow / widthStart) ≥ minConvergence (default 0.02 = at least 2% narrower)
— 📐 Width range : current width ≥ minChannelWidth × ATR (not too thin) AND < 10× ATR (not too wide)
— 📊 Volume contraction (when enabled): average volume inside the channel < 85% of average volume before the channel — confirms the volatility squeeze is accompanied by declining participation
— 📍 Price position : previous bar's close is inside the channel (not already broken out)
— ⚡ No inversion : upper boundary > lower boundary at the current bar
3️⃣ 5-factor breakout strength scoring (0–100).
When price closes beyond a channel boundary:
— 📏 Penetration depth (25%) : (close − boundary) / ATR, normalized to 0–1 (capped at 2× ATR). Deeper penetration = stronger commitment.
— 📊 Body ratio (15%) : candle body / candle range. Full-body candles (small wicks) indicate conviction. Doji/pin bars = weak.
— 📍 Body commitment (15%) : body midpoint beyond the boundary = 1.0, inside channel = 0.3. Full body commitment means the entire candle moved through, not just a wick.
— 📈 Volume confirmation (25%) : volume > SMA(20) × volumeSpikeMult = 1.0, otherwise 0.4. Above-average volume on the breakout bar confirms institutional participation.
— 💪 Momentum confirmation (20%) : RSI(14) > 50 for bullish (or < 50 for bearish) = 1.0, otherwise 0.4.
Classification: Strong (≥ 65), Medium (35–65), Weak (< 35). The strength is displayed on the breakout label and in the dashboard.
4️⃣ Directional probability scoring (0–100) while inside channel.
Before the breakout occurs, the indicator provides a real-time directional score:
— 📐 Channel slope bias (35%) : midline slope normalized by ATR — upward-sloping channels bias bullish, downward bias bearish
— 📊 RSI bias (35%) : (RSI − 50) / 50 — momentum direction
— 📍 Position in channel (30%) : (close − lower) / width — price near upper boundary biases bullish, near lower biases bearish
Score > 60% = bullish lean, < 40% = bearish lean, 40–60 = neutral. Displayed in the dashboard as "Bull Prob" — gives you a heads-up before the breakout direction is confirmed.
5️⃣ Measured-move TP/SL with trailing to breakeven.
On breakout:
— Target = breakout boundary + channel maximum width (the classic measured-move projection)
— TP1 = entry + fullMove / 3
— TP2 = entry + fullMove × 2/3
— TP3 = entry + fullMove (full measured move)
— SL = opposite channel boundary ± ATR padding (configurable, default 0)
After TP1 is hit, the SL moves to breakeven (entry price) — the entry label updates to show "(SL → BE)" and the original SL label dims. Trade stays open until TP3 (full measured move) or SL is reached. TP/SL labels show percentage distance from entry and update with ✓ / ✗ markers on hit. SL has priority on same-bar conflicts (SL checked before TPs).
6️⃣ Win/loss tracking with historical statistics.
The indicator tracks: total patterns detected, bull/bear breakout counts, wins (TP1 hit before SL), losses (SL hit before TP1), and win rate — all displayed in the dashboard. Two display modes: "All" (full history of all channels and trades) or "Last Only" (clean chart showing only the most recent pattern + trade, automatically cleaned up when a new pattern is detected).
7️⃣ Channel visualization with breakout color shift.
Before breakout: neutral channel lines (configurable color, default yellow) with optional fill. On bullish breakout: lines and fill shift to green. On bearish breakout: lines shift to red. Channel timeout (max width bars with no breakout) resets the scanner to look for new patterns.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Pivot detection: ta.pivothigh/ta.pivotlow with configurable lookback. Pivots stored in arrays (up to 60 recent, capped).
Step 2 — Boundary-fit scan: On new pivot or every 10 bars (if no active channel and no open trade): test all pairs of pivot highs for upper boundary, all pairs of pivot lows for lower boundary. Select best-fit lines by maximum touches.
Step 3 — Channel validation: Convergence rate ≥ minimum, width within range, volume contraction passes, price is inside, no inversion → channel activated.
Step 4 — Inside-channel monitoring: Directional probability score updated each bar. Channel lines extend. Background optional.
Step 5 — Breakout detection: Close beyond boundary + bar confirmed → 5-factor strength scoring → signal + TP/SL placement → channel lines recolored.
Step 6 — Trade tracking: TP1/TP2/TP3 and SL hit detection with SL priority. TP1 hit → trailing SL to breakeven. TP3 or SL → trade closed, channel reset, scanner resumes.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — it scans for converging channels automatically
2. Yellow channel lines appear when a valid pattern is detected
3. Dashboard shows "Active" + "Bull Prob" percentage
4. On breakout → "Long"/"Short" label + Entry/SL/TP1–TP3 lines appear
5. TP1 hit → SL moves to breakeven. TP3 → trade complete.
👁️ Reading the chart:
— 🟡 Channel lines = active converging pattern (pre-breakout)
— 🟢 Channel turns green = confirmed bullish breakout
— 🔴 Channel turns red = confirmed bearish breakout
— 🟢 "Long" / 🔴 "Short" label = confirmed breakout signal with strength
— 🔵 Blue line = entry, 🔴 red = SL, 🟢 green dashed = TP1/TP2/TP3
— ✓ on TP labels = target hit, ✗ on SL = stopped out
📊 Dashboard fields:
— Pattern: Active / Bull Break / Bear Break / Scanning
— Strength: Strong / Medium / Weak (5-factor score)
— Trade: Active / TP1 ✓ (BE) / TP2 ✓ / TP3 ✓ / SL Hit
— Bull Prob: directional probability (0–100%) while inside channel
— R:R (TP1): risk-to-reward ratio
— Touches: upper/lower boundary touch counts
— Vol Contraction: in-channel vs pre-channel volume ratio
— Convergence: narrowing rate percentage
— Patterns / Breaks / Win Rate: cumulative statistics
🔧 Tuning guide:
— No patterns found: decrease Min Touches (2), increase Max Channel Width (150+), decrease Min Convergence (0.01)
— Too many weak patterns: increase Min Touches (3), increase Min Channel Width ATR (0.7+)
— Weak breakouts: increase Volume Spike Mult (1.5+), enable Momentum Confirmation
— SL too tight: increase SL Padding (0.2–0.3 ATR)
— Want clean chart: set Pattern History to "Last Only"
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Pivot Detection Length (default 5): swing lookback
— Min Touches (default 2): pivots per boundary
— Max Channel Width (default 120 bars): lookback limit
— Min Convergence Rate (default 0.02): narrowing threshold
🔍 Filters:
— Volume Spike Mult (default 1.2): breakout bar volume requirement
— Volume Contraction (default On): require declining volume in channel
— Momentum Confirmation (default On): RSI alignment
🛡️ Risk:
— SL Padding (default 0 ATR): buffer beyond opposite boundary
— Label Offset (default 20 bars): right-side level label distance
🔧 Advanced:
— Touch Tolerance (default 0.15 ATR): pivot proximity to trendline
— Max Deviation (default 0.3 ATR): maximum pivot overshoot
— Min Channel Width (default 0.5 ATR): filter out thin channels
📐 Channel Lines:
— Show Channel Fill (default On), color and width configurable
🔔 Alerts
— 🟢 BUY / 🔴 SELL — breakout with strength, entry, SL, TP1–TP3
— 🟡 PATTERN DETECTED — new channel found
— 🎯 TP1 / TP2 / 🏆 TP3 HIT — trade progress
— 🛑 SL HIT — stopped out
All support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All breakout signals require barstate.isconfirmed. Channel detection runs on confirmed pivots (equal left/right lookback). The boundary-fit algorithm selects the best trendlines from historical pivots — the resulting lines are objective and reproducible.
— 📐 The boundary-fit algorithm tests all valid pivot pairs (up to 15 per side) and selects the combination with the most touches that satisfies the deviation constraint. This is an exhaustive search, not a linear regression — it produces the tightest-fitting boundary lines possible from the data.
— ⚖️ The measured-move target (channel width projected from breakout) is the classic technical analysis projection for converging patterns. TP1/TP2/TP3 divide this move into thirds: TP1 = 33%, TP2 = 67%, TP3 = 100% of the projected move.
— 📊 Volume contraction compares average volume inside the channel vs before the channel over the same number of bars. A ratio below 85% confirms genuine volatility compression.
— 🔒 Once a breakout fires, the trade stays open until TP3 or SL is reached — there is no intermediate invalidation. The channel remains active while the trade is open. Channels without a breakout timeout after the max channel width in bars.
— 📏 SL priority: on a bar where both SL and TP are touched, SL is checked first . After TP1, SL moves to breakeven (entry price).
— 🛠️ This is a pattern detection and breakout scoring tool , not an automated trading bot. It identifies converging channels, scores breakouts, and sets measured-move targets — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Volume features auto-adapt to instruments without volume data. Indicator

AG Pro Position Planner [AGPro Series]AG Pro Position Planner
OVERVIEW
AG Pro Position Planner is a structured trade-planning and risk-organization tool designed for traders who want to map a position before execution. It focuses on four core elements of trade preparation: entry location, stop placement, target mapping, and position sizing. Instead of trying to predict direction or generate automated entries, the script helps organize a plan around levels that the user defines manually.
The purpose of this tool is not to tell the user what to buy or sell. Its purpose is to turn a discretionary plan into a visible, measurable framework on the chart. By combining entry, stop, risk budget, capital usage, and target structure in one view, the script helps reduce planning ambiguity and makes the trade idea easier to review before any order is placed.
The script supports both long and short planning. It can also operate in two different target modes. In R-Based mode, targets are derived from the distance between entry and stop. In Manual mode, the user can input exact target prices directly and the script will convert those targets into their implied R-multiples. This allows the same tool to support both systematic planning and discretionary scenario mapping without changing the underlying workflow.
The visual design is intentionally restrained. The chart shows entry, stop, and target levels, along with optional reward and risk zones. A compact panel summarizes the key planning information, including direction, mode, risk per unit, risk budget, sizing, exposure, and target statistics. The result is a planning layout that remains readable on both light and dark themes while keeping the focus on structure rather than decoration.
WHAT THIS SCRIPT DOES
This script helps the user:
• define a planned entry price
• define a planned stop price
• convert account risk into a position size estimate
• map one to three targets on the chart
• compare manual targets to the initial risk distance
• review exposure before execution
• validate whether a manual target structure is logically ordered
• visualize the reward zone above entry and the risk zone below entry for long scenarios, or the inverse logic for short scenarios
The script is designed as a planning layer. It does not attempt to replace the user’s analysis process. It assumes the user already has a trade idea and needs a cleaner way to structure and review that idea.
UNIQUE EDGE
The distinguishing feature of this script is not signal generation. Its edge is organizational clarity.
Many tools focus on entries, signals, or directional interpretation. This one focuses on plan construction. The user chooses the key prices, and the script translates them into a coherent risk model. That distinction matters. The script does not present itself as a forecasting engine, a market-timing system, or an automated decision model. It is a position-planning framework.
A second differentiator is the dual target workflow. Some users think in fixed R-multiples. Others think in exact price objectives. AG Pro Position Planner supports both approaches in the same interface. In Manual mode, the script still reports the effective R-value of each target, which helps the user compare discretionary targets against the initial stop distance without losing consistency.
A third differentiator is the built-in validation behavior. The script checks whether the trade structure is logically valid for the chosen direction. In Manual mode, it also checks whether the targets are placed in the correct direction and in the correct order. This helps the user detect plan errors before execution rather than after the fact.
METHODOLOGY
The planning model is straightforward by design.
1) Entry and stop define the base risk distance.
The script measures the absolute distance between entry and stop. That distance becomes the reference risk per unit.
2) Account risk defines the risk budget.
The user enters an account size and a percentage risk per trade. The script converts this into a monetary risk budget.
3) Position size is estimated from the risk budget.
The script divides the risk budget by effective risk per unit and rounds the resulting quantity down to the selected quantity step.
4) Optional fee adjustment can be included.
An estimated fee percentage can be added to the per-unit risk as a conservative sizing buffer.
5) Targets are then mapped in one of two ways.
In R-Based mode, each target is calculated from the entry-to-stop distance using the selected R-multipliers.
In Manual mode, the user provides exact target prices and the script calculates the implied R-value of each target relative to the original stop distance.
6) Exposure statistics are summarized in the panel.
The panel shows stop distance, capital usage, risk budget, and sizing information so the trade can be evaluated as a complete plan rather than as isolated levels.
This methodology is intentionally transparent. The script is not using hidden directional filters, prediction logic, or undisclosed entry models. The calculations are derived from the user’s own inputs.
TARGET MODES
R-Based Mode
R-Based mode is intended for users who want a consistent structure around initial risk. The user defines entry and stop, then sets target multipliers such as 1R, 2R, or 3R. The script projects those levels automatically from the base risk distance. This is useful when the user wants standardized scenario planning and fast comparison between multiple setups.
Manual Mode
Manual mode is intended for users who work with exact price objectives. In this mode, the user enters target prices directly. The script then converts those levels into implied R-values. This allows discretionary targets to be measured against the same initial risk model.
To reduce planning mistakes, the script validates whether manual targets are placed in the correct direction and in the correct order for the chosen trade direction. Invalid target structures are flagged in the panel instead of being silently accepted.
PANEL AND VISUAL STRUCTURE
The chart can display:
• entry line
• stop line
• target lines
• reward zone
• risk zone
• right-side labels for entry, stop, and targets
• a compact summary panel
The panel is designed to keep the most useful information visible without taking over the chart. Its goal is to support review, not to dominate the screen.
The compact panel includes:
• plan summary
• validation badge
• entry and stop
• risk per unit
• risk budget
• sizing
• exposure
• target statistics
This structure is meant to help the user answer practical questions quickly:
How much is being risked?
How large is the position?
How much capital is being used?
How far is the stop?
What does each target represent in both price and R terms?
KEY INPUTS
Trade Setup
• Trade Direction
• Target Mode
• Entry Price
• Stop Price
• R-based targets
• Manual targets
Risk Model
• Account Size
• Risk Per Trade (%)
• Estimated Fees (%)
• Quantity Step
Visual Settings
• Panel visibility
• Panel position
• Panel theme
• Panel text size
• Level label size
• Label offset
• Risk/reward zone visibility
• Zone transparency
• Individual target visibility
These inputs are separated by function so the planning workflow stays readable and predictable.
VALIDATION AND SAFETY LOGIC
The script validates several conditions before presenting a plan as valid.
For direction:
• Long plans require stop below entry
• Short plans require stop above entry
For base structure:
• Entry must be positive
• Stop must be positive
• Account size must be positive
• Risk percentage must be positive
• Quantity step must be positive
• Entry and stop must not be identical
For manual targets:
• Targets must be in the correct direction relative to entry
• Targets must be logically ordered for the selected direction
If the structure is invalid, the panel reflects that status instead of presenting the setup as a clean plan. This behavior is intentional. The script is designed to help organize decisions, but also to prevent simple construction errors from being overlooked.
WHO THIS SCRIPT IS FOR
This script is intended for users who already make their own directional decisions and want a cleaner way to structure position plans on the chart.
It may be useful for:
• discretionary traders
• swing traders
• intraday traders
• users who plan entries and stops manually
• users who prefer fixed-R target mapping
• users who want manual targets translated into risk terms
• users who want better visual discipline before execution
It is less relevant for users who are looking for:
• automated entries
• hidden directional logic
• predictive signals
• scanner behavior
• portfolio automation
• strategy backtests
SIGNALS AND ALERTS
This script does not generate buy signals or sell signals.
This script does not publish automated trade calls.
This script does not attempt to identify market direction.
This script does not include alert logic for execution decisions.
Its purpose is planning, visualization, and risk organization.
LIMITATIONS AND TRANSPARENCY
This script is a planning tool, not an execution engine.
It does not know whether the selected entry will be filled.
It does not know whether slippage will occur.
It does not know whether the market will reach the defined targets.
It does not account for instrument-specific margin rules, liquidation mechanics, funding costs, or exchange-specific order behavior unless the user adjusts inputs manually.
The sizing output is an estimate based on the values entered into the script. Real-world execution may differ due to slippage, fees, order type, spread, partial fills, and instrument-specific trading conditions.
In Manual mode, the script evaluates the price structure entered by the user, but it does not claim that those targets are likely to be reached. It only expresses them relative to the initial risk distance.
The chart zones are visual planning aids. They are not probability forecasts and should not be interpreted as predictive boundaries.
WHAT THIS SCRIPT IS NOT
This script is not:
• a strategy tester
• a signal service
• an automated trade system
• a forecasting model
• a promise of profitability
• a replacement for independent analysis
• a substitute for execution judgment
• a guarantee of risk control in live market conditions
It is a structured chart tool for planning and reviewing position scenarios.
RISK DISCLOSURE
Trading and investing involve risk. Any planned setup can fail, and losses can exceed expectations due to slippage, volatility, or execution conditions. This script is provided as an organizational and visualization tool only. Users remain fully responsible for their own analysis, trade selection, order placement, and risk management decisions.
No indicator can remove market risk. A visually clean plan is still only a plan. Position sizing, stop placement, and target mapping should always be reviewed in the context of the instrument, timeframe, liquidity conditions, and the user’s own trading process.
FINAL NOTE
AG Pro Position Planner is built around a simple idea: a trade plan should be measurable before it is actionable. By turning entry, stop, risk budget, sizing, and targets into a single visible structure, the script aims to make discretionary planning more disciplined, more transparent, and easier to review.
The script does not attempt to decide for the user. It helps the user define the plan clearly enough to evaluate it. Indicator

StealthTrail SuperTrend ML Pro [WillyAlgoTrader]🤖 StealthTrail SuperTrend ML Pro is an overlay indicator that builds on the adaptive SuperTrend core from StealthTrail and adds three layers of intelligence: an instrument profiling engine that classifies the market into Trending, Ranging, or Volatile regimes and auto-tunes all SuperTrend parameters accordingly; a 13-feature machine learning scoring system that evaluates every candidate signal on momentum, trend, volatility, structure, volume, HTF alignment, divergence, session quality, and regime context — producing a 0–100 confidence score; and a self-learning mechanism that tracks signal outcomes over time and dynamically adjusts the confidence gate to optimize signal quality. The result is a SuperTrend that configures itself, scores its own signals, and learns from its results.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A standard SuperTrend has fixed parameters that work well in one market regime and fail in another. Manually tuning ATR length, multiplier, and filters for each instrument and timeframe is time-consuming and becomes outdated when conditions change.
This indicator solves the problem through a three-layer intelligence stack:
Layer 1 — Regime classification → Auto-tuning: The instrument profiler continuously measures efficiency ratio (trend strength), autocorrelation (serial dependence), volatility clustering, and normalized volatility — classifying the market into TRENDING, RANGING, or VOLATILE. Each regime produces different optimal SuperTrend parameters. The auto-tuner interpolates ATR length, multiplier, cushion, cooldown, and RSI threshold using regime-weighted blending — so the SuperTrend self-configures for current conditions.
Layer 2 — ML signal scoring: Even with auto-tuned parameters, not every SuperTrend flip is a good trade. The 13-feature ML engine evaluates each flip against momentum, volume, trend efficiency, volatility shock, band distance, MACD, price structure, regime confidence, MTF alignment, ADX strength, RSI divergence, volume profile zone, and session quality. Each feature is normalized to 0–100, weighted, passed through a sigmoid function, and combined into a single confidence score. Signals below the confidence gate are rejected — they pass the classic SuperTrend logic but fail the multi-dimensional quality check.
Layer 3 — Self-learning gate: The ML confidence gate itself adapts over time. The system tracks each signal's outcome (win/loss evaluated after N bars using the ATR at entry for fair comparison). When the win rate exceeds 70%, the gate lowers (allowing more signals). When it drops below 50%, the gate raises (becoming stricter). A decay factor prevents old signals from dominating. This creates a feedback loop: the indicator learns which confidence level produces profitable signals on this specific instrument and timeframe.
Without auto-tuning, the SuperTrend uses static parameters. Without ML scoring, good and bad flips are treated equally. Without self-learning, the confidence gate is a fixed guess. Each layer eliminates a specific category of bad signals that the previous layer can't catch.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Instrument profiling and regime classification.
The profiler computes four metrics over a configurable lookback (default 100 bars):
— 📐 Efficiency Ratio : ER = |close − close | / sum(|close − close |, N). Measures net directional movement vs total path. ER → 1.0 = pure trend, ER → 0.0 = pure chop.
— 🔄 Autocorrelation : correlation between return and return over a sliding window. High positive autocorrelation = trending persistence. Near-zero = random. Negative = mean-reverting.
— 📏 Volatility Clustering : ratio of short-term ATR (20 bars) to long-term ATR (lookback). Values > 1.0 indicate a volatility spike (breakout or crash). Values < 1.0 indicate compression.
— 📈 Normalized Volatility : ATR / close × 100. Measures absolute volatility as percentage of price — allows cross-instrument comparison.
These are smoothed with EMA and combined into three regime scores:
— trendScore = ER × regimeSensitivity
— rangeScore = (1 − ER) × (1 − |autocorrelation|) × regimeSensitivity
— volatScore = clamp(volClustering − 1, 0, 2) × regimeSensitivity
The highest score determines the regime: TRENDING, RANGING, or VOLATILE. Regime confidence = highest_score / total_scores × 100%.
2️⃣ Regime-weighted auto-tuning (6 parameters).
Each SuperTrend parameter is computed as a weighted blend of regime-optimal values:
effectiveParam = wT × trendOptimal + wR × rangeOptimal + wV × volatileOptimal
Where wT, wR, wV are the normalized regime weights. The parameters and their regime-optimal ranges:
— ATR Length: Trending=10, Ranging=16, Volatile=21 (further scaled by normalized volatility)
— Base Multiplier: Trending=2.0, Ranging=3.2, Volatile=3.8 (scaled by normalized vol)
— Flip Cushion: Trending=0.05, Ranging=0.25, Volatile=0.15
— Signal Cooldown: Trending=2, Ranging=5, Volatile=3
— RSI Threshold: Trending=40, Ranging=52, Volatile=45
— RSI Length: derived as ATR Length × 0.9
— Adaptive Smoothing: ATR Length × 4.0
This means in a trending regime, the SuperTrend uses shorter ATR, lower multiplier (tighter bands), minimal cushion, and permissive RSI — catching trends early. In a ranging regime: longer ATR, wider multiplier, large cushion, strict RSI — avoiding chop. In volatile conditions: intermediate settings with wider bands to accommodate spikes.
3️⃣ 13-feature ML scoring engine.
Each feature is normalized to 0–100, multiplied by its weight, summed, normalized by total weight, and passed through a sigmoid function to produce the final 0–100 confidence score.
Features and their weights:
— 💪 F1: Momentum (RSI alignment with trend) — w=0.15
— 📈 F2: Volume Surge (volume / SMA ratio) — w=0.08
— 📐 F3: Trend Efficiency (ER × 100) — w=0.15
— ⚡ F4: Volatility Shock (inverted vol clustering) — w=−0.08 (negative = penalizes vol spikes)
— 📏 F5: Band Distance (sigmoid of close-to-band ATR distance) — w=0.10
— 📊 F6: MACD (normalized histogram vs ATR) — w=0.08
— 🏗️ F7: Price Structure (HH/HL for bull, LL/LH for bear over 10 bars) — w=0.08
— 🧠 F8: Regime Confidence (% confidence in current regime) — w=0.04
— 🌐 F9: MTF Confluence (aligned with HTF = 100, not = 0) — w=0.12
— 💪 F10: ADX Strength (ADX × 2.5, capped at 100) — w=0.10
— 🔀 F11: RSI Divergence (aligned div = 100, counter div = 10) — w=0.08
— 📊 F12: Volume Profile Zone (proximity to highest-volume bar) — w=0.06
— 🕐 F13: Session Quality (hour-based scoring for optimal trading sessions) — w=0.04
The raw weighted sum is normalized, then passed through: mlScore = 100 / (1 + exp(−0.08 × (normalizedScore − 50))). This sigmoid compresses extreme values and centers the output around 50.
All 13 weights plus the bias term are user-configurable — you can adjust how much each factor contributes. Negative weights penalize a factor (e.g., W4 = −0.08 means high volatility shock reduces the score).
4️⃣ Self-learning confidence gate.
The system maintains 5 pending signal slots. Each stores the entry price, direction, bar index, and ATR at entry. After the evaluation horizon (default 15 bars), the outcome is assessed:
win = (close − entryPrice) × direction > 0.5 × entryATR (profitable by at least half an ATR, using the ATR at entry time — not current ATR — for fair comparison)
A decay factor (0.98) is applied to historical totals before adding new results, preventing stale data from dominating. When total tracked signals ≥ 8:
— Win rate > 70% → gate decreases by 1.5 (more permissive)
— Win rate < 50% → gate increases by 1.5 (more restrictive)
— Gate is clamped to
The dashboard shows the current gate value, whether it's auto-adjusted, and the tracked win rate with sample size.
5️⃣ Multi-timeframe confluence with auto-HTF selection.
The indicator automatically selects the appropriate higher timeframe based on your current TF: 1M→15M, 5M→30M, 15M→1H, 1H→4H, 4H→D, D→W. Or you can manually specify the HTF.
Three strictness levels:
— Loose: MTF misalignment adds negative ML score but doesn't block
— Moderate: MTF misalignment reduces signal quality
— Strict: MTF misalignment hard-blocks the signal entirely
HTF trend is determined by EMA(20) vs EMA(50) on the higher timeframe.
6️⃣ Adaptive SuperTrend core (from StealthTrail).
The band calculation uses pre-computed interpolated ATR values (ATR bank at 9 fixed periods with lerp interpolation) for smooth adaptation to any auto-tuned ATR length. Same mechanics as StealthTrail: adaptive multiplier (ATR / SMA ratio), band ratcheting, flip cushion, and cooldown — but now all parameters are regime-driven.
7️⃣ Three-mode trailing TP/SL system.
Three SL modes: ATR (entry ± mult × ATR), Band (SuperTrend band as SL), Fixed % (percentage from entry).
Three trailing modes:
— ATR : trail at fixed ATR distance from price — simple, consistent
— Band : use the SuperTrend band itself as trailing stop — structurally anchored
— ATR → Band (hybrid) : start with tight ATR trail, switch to band when it catches up — best of both
The trail only ratchets in the profit direction (never moves away from price). TP1/TP2/TP3 hit markers (✓) appear on the chart. On TP3 or SL hit, the trade closes and lines are removed.
8️⃣ RSI divergence detection.
Scans for bullish divergence (price lower low, RSI higher low, RSI < 40) and bearish divergence (price higher high, RSI lower high, RSI > 60). Divergences aligned with the signal direction boost the ML score (F11 = 100). Counter-divergences penalize it (F11 = 10). Optional visualization as dots on the chart.
9️⃣ Volume profile zone proximity.
Tracks the highest-volume bar in the last 50 bars. Proximity to this bar's price level is scored: within 1.5× ATR = 100 (near institutional activity), further = proportionally lower. Signals near high-volume zones tend to have more follow-through.
🔟 Session quality scoring.
For intraday timeframes, each hour receives a quality score based on typical institutional activity: London/NY overlap (13–17 UTC) = 100, European session (8–12) = 80, US afternoon (18–20) = 70, Asian session (0–7) = 30. An optional kill zone filter suppresses all signals during specified hours.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Instrument profiling: ER, autocorrelation, vol clustering, normalized vol → EMA-smoothed → regime classification (TRENDING / RANGING / VOLATILE) with confidence %.
Step 2 — Auto-tuning: Regime weights blend optimal parameters for ATR length, multiplier, cushion, cooldown, RSI threshold/length.
Step 3 — SuperTrend calculation: Interpolated ATR from pre-computed bank → adaptive multiplier (ATR/SMA ratio) → upper/lower bands → ratcheting → flip detection with cushion + cooldown.
Step 4 — Classic filters: Momentum (RSI), volume, session, MTF hard-block (if strict).
Step 5 — ML feature extraction: 13 features normalized to 0–100 from current market state.
Step 6 — ML scoring: Weighted sum → weight normalization → sigmoid → 0–100 confidence score.
Step 7 — Signal decision: Classic filters pass AND (ML disabled OR mlScore ≥ gate) → confirmed signal.
Step 8 — Self-learning: Signal stored in pending slot → evaluated after horizon bars → win rate updated → gate adjusted.
Step 9 — TP/SL placement: SL from band/ATR/fixed% → TPs as ATR multiples → trailing stop ratchets per mode.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — Auto-Tune is ON by default, parameters self-configure
2. The SuperTrend band and Long/Short labels appear
3. Dashboard shows: trend, strength, regime, ML score, gate, win rate, TP/SL status
4. Enable ML Filter for quality scoring (off by default — enable after reviewing signal quality)
5. Self-Learning auto-adjusts the gate over time
👁️ Reading the chart:
— 🟢 Green band + "Long" label = confirmed bullish signal
— 🔴 Red band + "Short" label = confirmed bearish signal
— ⚫ Gray dot = classic filter blocked the flip
— 🟡 Yellow triangle = ML rejected the signal (score below gate)
— 🟢 Green dot below bar = bullish RSI divergence
— 🔴 Red dot above bar = bearish RSI divergence
— 📈 Regime badge = current market classification (📈 TRENDING / 📊 RANGING / ⚡ VOLATILE)
— 🟢 Green dashed = TP1/TP2/TP3, 🔴 Red dashed = SL, 🔵 Blue dotted = entry
— "TP1 ✓" / "SL ✗" labels = outcome markers
📊 Dashboard sections:
— Main: trend, signal, strength, ADX, HTF alignment
— 🤖 ML Engine: ML score, confidence gate (fixed or auto), win rate with sample size
— 🎯 Position: status (LONG/SHORT/FLAT), entry, SL (with trail mode icon), TP levels (✓ for hit), R:R ratio
— 🧠 Regime: classification + confidence %
🔧 Tuning guide:
— Start simple: Auto-Tune ON, ML OFF — let the regime engine handle parameters
— Add ML: Enable ML Filter after 50+ signals to see which score level produces winners
— Enable Self-Learning: after 100+ bars of ML being active — let the gate auto-calibrate
— Adjust weights: if you know your market (e.g., volume is unreliable on forex → set W2 to 0)
— Strict MTF: for higher-timeframe alignment — reduces signals, increases quality
— Trail Mode: Band for trend-following, ATR for scalping, ATR→Band for hybrid
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Auto-Tune (default On): regime-driven parameter self-configuration
— ATR Length / Base Multiplier : manual overrides when auto-tune is off
🧠 Adaptive Engine:
— Profiling Lookback (default 100): bars for regime classification
— Regime Sensitivity (default 1.0): scaling factor for regime scores
📐 Multi-Timeframe:
— MTF Confluence (default On): Auto/Manual HTF selection
— Strictness (default Moderate): Loose / Moderate / Strict
🤖 ML Signal Filter:
— Enable ML (default Off): activate 13-feature scoring
— Confidence Gate (default 21): minimum ML score to pass
— Self-Learning (default On): auto-adjust gate from tracked outcomes
— Evaluation Horizon (default 15 bars): outcome assessment window
— 13 individual weights + bias : fully configurable feature importance
🔍 Filters:
— Flip Cushion, Cooldown, RSI Momentum, Volume, Session Kill Zone
🎯 TP/SL:
— SL Mode (default Band): ATR / Band / Fixed %
— Trail Mode (default Band): ATR / Band / ATR → Band
— TP Levels (1–3): ATR multipliers (default 1.5 / 2.5 / 4.0)
🔔 Alerts
— 🟢 LONG / 🔴 SHORT — ticker, price, TF, band, ML score, ADX, HTF, SL, TP1, regime
— 🎯 TP1 / TP2 / TP3 HIT — trade progress
— 🛑 SL HIT — stopped out
All support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. The confirmed trend direction is stored separately from the real-time calculation — signals only fire on closed bars. HTF data uses lookahead_off. A warmup period (max of profiling lookback and 55 bars) prevents signals during insufficient data.
— 🤖 The ML scoring is not machine learning in the neural network sense . It's a weighted linear model with sigmoid activation — a logistic regression analog. The 13 features are hand-crafted from market microstructure, and the weights are configurable by the user. There is no gradient descent, backpropagation, or training phase. The "self-learning" adjusts only the confidence gate threshold, not the feature weights.
— 📐 Auto-tuning produces different parameters on every bar as the regime shifts. The ATR length and multiplier change continuously — this is by design. If you prefer fixed parameters, disable Auto-Tune.
— ⚖️ The self-learning gate requires at least 8 tracked signals before it begins adjusting. With the decay factor (0.98), the effective sample is weighted toward recent signals. The gate moves slowly (±1.5 per adjustment) and is clamped to .
— 📊 Win rate evaluation uses ATR at entry time , not current ATR. A signal is a "win" if price moves > 0.5× entry ATR in the signal direction within the evaluation horizon. This prevents volatile periods from inflating win counts.
— 🔄 The pre-computed ATR bank (9 fixed periods with lerp interpolation) is a performance optimization that allows smooth ATR adaptation to any auto-tuned length without calling ta.atr() dynamically — which Pine Script doesn't support with variable-length arguments.
— 📏 Volume Profile Zone tracks the single highest-volume bar in the last 50 bars, not a full volume profile. It decays after 50 bars with no new volume peak.
— 🕐 Session scoring uses UTC-based hours. On daily or higher timeframes, session quality defaults to 50 (neutral) as intraday session distinctions don't apply.
— 🛠️ This is a signal scoring and analysis tool , not an automated trading bot. It classifies regimes, scores signals, tracks outcomes, and manages TP/SL — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Volume features auto-adapt to instruments without volume data. Indicator

Adaptive Ichimoku Nexus [WillyAlgoTrader]☁️ Adaptive Ichimoku Nexus — a modern approach to the legendary all-time indicator Ichimoku Kinko Hyo. This overlay indicator replaces the fixed periods of the classic Ichimoku system with a volatility-adaptive engine that dynamically scales Tenkan-Sen, Kijun-Sen, and Senkou Span B lookback periods based on current market conditions. Every TK cross signal is scored by an 8-factor confluence engine (0–100) that combines all five Ichimoku dimensions with volume, momentum pulse, and momentum acceleration. The indicator also includes a dedicated Kumo breakout engine with retest detection, three Ichimoku-anchored SL modes with R:R-based TP levels, and a multi-timeframe Ichimoku alignment panel — creating a complete trading system built entirely on Ichimoku principles enhanced with adaptive intelligence.
Ichimoku Kinko Hyo was designed in the 1930s with fixed periods (9/26/52) calibrated for the Japanese trading week. These periods remain the default worldwide, but modern markets are faster, more volatile, and trade 24/7. A fixed 26-period Kijun-Sen responds identically whether the market is in a tight range or a momentum breakout — producing late signals in trends and whipsaws in consolidation.
This indicator preserves the complete Ichimoku structure — all five lines, the cloud, and the displacement — while making the periods responsive to current volatility. In high-volatility environments, all three Donchian-based periods shorten → the Tenkan reacts faster, the Kijun adapts sooner, the cloud thins and pivots quicker. In low-volatility consolidation, the periods lengthen → noise is filtered, fewer false TK crosses, thicker cloud provides stronger S/R. The entire Ichimoku system breathes with the market.
🧩 WHY THESE COMPONENTS WORK TOGETHER
Classic Ichimoku already integrates five components into one system: Tenkan-Sen (momentum), Kijun-Sen (trend), Senkou Span A/B (future S/R), and Chikou Span (lagging confirmation). The genius of Ichimoku is that these five dimensions are designed to confirm each other — a "5/5 alignment" is one of the strongest signals in technical analysis.
This indicator enhances the system at three levels:
Level 1 — Adaptive periods: The volatility engine scales all three Donchian-based components (Tenkan, Kijun, Span B) proportionally, preserving the Ichimoku ratios while adapting the speed. This means the relationship between Tenkan and Kijun (the core signal mechanism) stays consistent — they just both become faster or slower together.
Level 2 — Confluence scoring: Instead of manually checking "Is Tenkan above Kijun? Is price above cloud? Is Chikou confirming?" — the 8-factor engine quantifies every Ichimoku dimension plus volume and momentum into a single 0–100 score. A score of 85 means virtually every Ichimoku component plus momentum and volume agrees. A score of 35 means the signal is conflicted — skip it.
Level 3 — Structural TP/SL: The Kumo edge and Kijun-Sen are natural Ichimoku support/resistance levels. Using them as stop-loss anchors (instead of arbitrary ATR multiples) produces structurally meaningful stops that respect the same framework generating the signals.
Level 4 — Momentum Pulse: Classic Ichimoku has no built-in momentum acceleration measure. The Momentum Pulse engine quantifies how fast the TK spread is changing and which direction the future cloud is rotating — capturing the urgency behind each signal.
Without adaptive periods, the system is rigid. Without scoring, you must manually assess 5+ factors. Without structural SL, your risk management ignores Ichimoku's own S/R levels. Without the Momentum Pulse, you can't distinguish between a strong and a fading TK cross. Each layer adds a dimension that classic Ichimoku lacks.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Volatility-adaptive Ichimoku periods.
When Adaptive mode is on, each Donchian midline (Tenkan, Kijun, Span B) uses a volatility-scaled period:
adaptedPeriod = basePeriod × (1 + strength × (1 − 2 × volRatio))
Where volRatio = (currentATR − lowestATR) / (highestATR − lowestATR) over the volatility lookback (default 50 bars), normalized to 0–1.
When volRatio → 1 (high volatility): adaptedPeriod = basePeriod × (1 − strength) — periods shorten
When volRatio → 0 (low volatility): adaptedPeriod = basePeriod × (1 + strength) — periods lengthen
The Adapt Strength parameter (default 0.4 = ±40%) controls the range of scaling. With basePeriod=26 and strength=0.4: periods range from 16 (high vol) to 36 (low vol). Each adapted period is clamped to a valid range and fed into the standard Donchian midline formula: (highest(high, period) + lowest(low, period)) / 2.
This means all five Ichimoku lines (Tenkan, Kijun, Senkou A, Senkou B, Chikou) adapt proportionally — the system remains internally consistent. In Classic mode, the standard fixed periods are used unchanged.
2️⃣ 8-factor confluence scoring engine (0–100).
Every bar computes both a bullish and bearish score from 8 factors:
— 📐 Price vs Cloud (20 pts) : above cloud = 20, inside = 8, below = 0 (bull). Symmetric for bear. The cloud is the strongest S/R in Ichimoku.
— ⚡ TK alignment (15 pts) : Tenkan > Kijun = 15 (bull). The core Ichimoku momentum signal.
— 👁️ Chikou confirmation (15 pts) : Chikou Span above price at displaced position = 15 (bull). The lagging confirmation.
— ☁️ Cloud direction (10 pts) : Span A slope > Span B slope = 10 (bull). Future cloud turning bullish indicates trend momentum.
— 📏 Kumo thickness (8 pts) : thick cloud = 8, thin cloud = 2. Thick cloud provides stronger S/R backing.
— 📈 Volume (10 pts) : volume > SMA(20) × 1.2 = 10. Confirms institutional participation.
— 💪 Momentum alignment (12 pts) : Momentum Pulse > 20 = 12, > 0 = 6. Strong momentum behind the signal.
— 🚀 Momentum acceleration (10 pts) : Momentum Pulse rising = 10. Trend is accelerating, not fading.
Max score = 100. Signals require score ≥ Min Confluence Score (default 50). Grades: Strong (≥ 80), Standard (≥ 50), Weak (< 50).
3️⃣ Momentum Pulse engine (−100 to +100).
A composite momentum measure built from three Ichimoku-derived components:
— TK spread normalized by ATR (weight 40): tkSpreadNorm = (Tenkan − Kijun) / ATR. Measures how far apart the momentum and trend lines are relative to volatility.
— TK spread acceleration (weight 100): tkSpreadNorm − tkSpreadNorm . Measures how fast the spread is changing — captures momentum buildup.
— Cloud slope differential (weight 30): (ΔSpanA − ΔSpanB) / ATR over 5 bars. Measures whether the future cloud is rotating bullish or bearish.
Combined: momentumPulse = tkSpread×40 + tkAcceleration×100 + cloudSlope×30, clamped to , smoothed with EMA(5). States: Accelerating (rising + positive), Bull Fading (falling + positive), Bear Accelerating (falling + negative), Bear Fading (rising + negative).
4️⃣ Three Ichimoku-anchored SL modes.
Stop-loss placement uses Ichimoku structure:
— Kumo Edge (default): SL at the nearest cloud boundary (kumoBot for longs, kumoTop for shorts) + ATR buffer. The cloud is Ichimoku's primary S/R — placing the stop here means your stop is at the strongest structural level in the framework.
— Kijun : SL at the Kijun-Sen ± ATR buffer. The Kijun is Ichimoku's equilibrium line — price tends to return to it.
— ATR : SL at entry ± 2× ATR. Pure volatility-based fallback.
TP1/TP2/TP3 are R:R multiples of the risk distance (default 1.5/2.5/4.0). A minimum risk distance of 0.5× ATR is enforced.
5️⃣ Kumo breakout engine with retest detection.
Detects when price closes above the cloud (was below or inside on the previous bar) with volume confirmation:
— kumoBreakUp: close > kumoTop AND previous close ≤ kumoTop AND volume > SMA(20) × breakoutMultiplier
— kumoBreakDown: close < kumoBot AND previous close ≥ kumoBot AND same volume condition
After a breakout, a retest signal fires if within 10 bars, price touches the cloud edge and closes back on the breakout side — confirming the cloud has flipped from resistance to support (or vice versa). Retest signals appear as small circles distinct from the larger diamond breakout markers.
6️⃣ Kijun-Sen S/R zone detection.
When the Kijun-Sen has been flat for 4+ consecutive bars and then starts moving, the flat level is marked as a support/resistance zone (shaded box ± 0.15× ATR). Flat Kijun is a well-known Ichimoku S/R concept — price tends to be attracted to flat Kijun levels. The indicator automates this detection and visualization.
7️⃣ Multi-timeframe Ichimoku alignment panel.
Three configurable timeframes (default 15M/1H/4H) each compute a full Ichimoku state using the classic periods:
— Bull ● : close > cloud AND Tenkan > Kijun
— Bear ● : close < cloud AND Tenkan < Kijun
— Neutral ○ : anything else
The panel shows per-TF alignment plus a summary: ALL BULL ✓ (all 3 TFs bullish), ALL BEAR ✓ (all 3 bearish), or Mixed. All MTF data uses + lookahead_on for non-repainting.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Volatility measurement: ATR(14) is normalized to 0–1 by its position within the recent high-low range over the volatility lookback.
Step 2 — Period adaptation: Each base period (9/26/52) is scaled by the adapt strength and vol ratio. High vol → shorter periods, low vol → longer. Classic mode bypasses this.
Step 3 — Ichimoku calculation: Tenkan = Donchian midline (adapted period). Kijun = Donchian midline (adapted period). Senkou A = avg(Tenkan, Kijun). Senkou B = Donchian midline (adapted period). Chikou = source price. Cloud displaced forward by displacement bars.
Step 4 — Kumo at current bar: Span A and Span B are read at displacement offset to get the current cloud boundaries. Thickness, price position (above/below/inside), and thin-cloud status are computed.
Step 5 — Momentum Pulse: TK spread, spread acceleration (vs 3 bars ago), and cloud slope differential — combined and EMA-smoothed.
Step 6 — Confluence scoring: 8 factors evaluated. Bull and bear scores computed independently.
Step 7 — Signals: TK cross + score threshold + enabled filters (Kumo thickness, volume, Chikou) → confirmed buy/sell. Kumo breakout: cloud boundary cross + volume surge → breakout signal. Retest: cloud edge touch within 10 bars of breakout.
Step 8 — TP/SL: SL from Kumo edge / Kijun / ATR mode. TPs as R:R multiples. TP/SL hits tracked per trade.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — the Ichimoku cloud and lines appear (adaptive by default)
2. "Long 78%" / "Short 65%" labels = TK cross signals with confluence score
3. ☁▲ / ☁▼ diamonds = Kumo breakout signals
4. Entry, SL, TP1–TP3 lines appear on each signal
5. Check the MTF panel for multi-timeframe alignment
👁️ Reading the chart:
— 🔵 Blue line = Tenkan-Sen (conversion, fast)
— 🔴 Pink line = Kijun-Sen (base, slow)
— 🟠 Orange line (displaced back) = Chikou Span
— 🟩🟥 Cloud fill = Kumo (green bullish, red bearish)
— 🟢 "Long XX%" label = confirmed bullish TK cross with score
— 🔴 "Short XX%" label = confirmed bearish TK cross with score
— 💎 Cyan diamond = Kumo breakout (☁▲ up / ☁▼ down)
— ⚫ Small circle = Kumo edge retest
— 🟪 Shaded zone = flat Kijun S/R area
— 🔵 Blue line = entry, 🔴 red = SL, 🟢 green = TP1/TP2/TP3
📊 Dashboard fields:
— Mode: Adaptive / Classic
— Trend: Bullish / Bearish / Neutral (price vs cloud + TK alignment)
— Signal: last signal with bars elapsed
— Score: confluence percentage with color grade
— Momentum: Pulse state + value (Accelerating / Bull Fading / Bear Accel / etc.)
— Cloud: price position (Above / Below / Inside / Thin)
— Trade: TP/SL progress (→ TP1, TP1 ✓ → TP2, TP3 ✓ Closed, SL ✗ Closed)
— MTF: 3-timeframe Ichimoku alignment + summary (ALL BULL / ALL BEAR / Mixed)
— Version
🔧 Tuning guide:
— Too many weak signals: increase Min Score (60–80), enable all filters
— Missing signals: decrease Min Score (30–40), disable Chikou filter
— Adaptive too aggressive: decrease Adapt Strength (0.2–0.3) or increase Volatility Lookback (100+)
— Want classic Ichimoku: switch to Classic mode — pure 9/26/52 with scoring and TP/SL
— Stops too tight: increase SL ATR Buffer (0.7–1.0) or switch to ATR SL mode
— Scalping: Conversion 5, Base 13, Span B 26, Displacement 13, Min Score 40
— Swing: Conversion 12, Base 34, Span B 68, Displacement 34, Min Score 65
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Calculation Mode (default Adaptive): Adaptive / Classic
— Conversion/Base/Span B/Displacement (default 9/26/52/26)
🔄 Adaptive Engine:
— Volatility Lookback (default 50): ATR normalization window
— Adapt Strength (default 0.4): period scaling range (±40%)
🔍 Filters:
— Min Confluence Score (default 50): 0–100 threshold
— Kumo Thickness Filter (default On): suppress in thin cloud
— Volume Filter (default On): auto-disabled on forex
— Chikou Confirmation (default On): require lagging span alignment
🎯 Smart TP/SL:
— SL Mode (default Kumo Edge): Kumo Edge / Kijun / ATR
— SL ATR Buffer (default 0.5): padding beyond SL level
— TP1/TP2/TP3 R:R (default 1.5/2.5/4.0)
💥 Kumo Breakout:
— Breakout Vol Mult (default 1.3): volume surge requirement
— Show Retest Signals (default On): cloud edge retest detection
🔄 Multi-Timeframe:
— TF 1/2/3 (default 15/60/240): configurable timeframes
🔔 Alerts
— 🟢 BUY / 🔴 SELL — TK cross with score, SL, TP1–TP3
— ☁️▲ KUMO BREAK UP / ☁️▼ KUMO BREAK DOWN
— 🎯 TP1 HIT / 🛑 SL HIT
All support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All TK cross signals and Kumo breakouts require barstate.isconfirmed. MTF data uses + lookahead_on. A warmup period (Span B + displacement, minimum 80 bars) prevents signals during insufficient data.
— ☁️ This preserves the complete Ichimoku structure. All five lines, the cloud, displacement, and Chikou are computed exactly as Ichimoku specifies — the only change is that in Adaptive mode, the three Donchian periods scale with volatility. Switching to Classic mode produces a standard Ichimoku with no modifications.
— 📐 The adaptive engine scales all three periods proportionally using the same vol ratio and strength. The relationship between Tenkan (fast) and Kijun (slow) is preserved — they don't drift independently.
— ⚖️ The confluence score is Ichimoku-native . Six of eight factors (price vs cloud, TK alignment, Chikou, cloud direction, Kumo thickness, momentum) are derived directly from Ichimoku components. Only volume and momentum acceleration are external additions.
— 📊 The Momentum Pulse is not a standalone oscillator — it's derived from TK spread dynamics and cloud rotation, both Ichimoku-native measurements. It quantifies what experienced Ichimoku traders assess visually: "Is this TK cross strong and accelerating, or weak and fading?"
— 🔄 Kumo breakout retest detection uses a 10-bar window after the initial breakout. Retests beyond 10 bars are not tracked.
— 🛠️ This is a signal and analysis tool , not an automated trading bot. It enhances Ichimoku with adaptive periods, scoring, and risk management — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Volume filter auto-disables on instruments without volume data. Indicator

Precision Sniper [WillyAlgoTrader]🎯 Precision Sniper is an overlay indicator that generates entry signals only when a 10-factor confluence scoring engine reaches a configurable threshold — combining EMA alignment, RSI momentum, MACD direction, VWAP position, volume confirmation, ADX trend strength, DI directional pressure, and higher-timeframe bias into a single composite score (0–10). Every signal comes with automatic TP/SL placement using either ATR-based or structure-based stops, plus a progressive trailing stop system that ratchets the stop to breakeven after TP1 and to TP1 level after TP2.
The core principle: instead of using a single crossover or oscillator reading to trigger a signal, this indicator requires multiple independent market dimensions to agree simultaneously. An EMA crossover alone can produce false signals in choppy markets. RSI confirmation alone can be early or late. Volume alone doesn't tell you direction. But when EMA alignment + RSI momentum + MACD direction + VWAP position + volume + ADX + DI + HTF trend all point the same way — and the composite score exceeds your threshold — the probability of a genuine directional move is significantly higher than any single factor alone.
🧩 WHY THESE COMPONENTS WORK TOGETHER
Each factor in the scoring engine measures a different market dimension:
— EMA Fast/Slow crossover → detects the momentum shift that initiates the signal (trigger)
— EMA Trend → confirms the macro direction (structural filter)
— RSI → confirms momentum is in the non-extreme zone (avoids overbought entries)
— MACD histogram + MACD vs signal → confirms momentum is accelerating, not decelerating (2 factors)
— VWAP position → confirms price is on the right side of institutional fair value
— Volume → confirms market participation (not a low-liquidity wick)
— ADX + DI → confirms the market is trending AND directional pressure aligns (not ranging)
— HTF EMA bias → confirms the higher-timeframe trend agrees with the entry direction
These factors are deliberately orthogonal: EMA alignment can occur without volume, MACD can be bullish without RSI confirming, price can be above VWAP while ADX shows no trend. The scoring engine counts how many factors agree — only when enough dimensions align does the signal pass.
The entry signal feeds into the risk management system: structure-based SL provides a structurally meaningful stop (recent swing low/high), the R:R-based TPs create consistent reward targets, and the progressive trailing stop automatically manages the trade after entry — ratcheting protection as each target is hit. Without the trailing system, a signal that hits TP1 can still reverse to SL for a full loss. With it, after TP1 the worst case is breakeven.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ 10-factor confluence scoring engine (0–10 scale).
Every bar, both a bullish and bearish score are computed from 10 independent factors:
Bullish score calculation:
— 📐 EMA Fast > EMA Slow → +1.0 (short-term momentum is upward)
— 📏 Close > EMA Trend → +1.0 (price is above macro trend)
— 📊 RSI > 50 AND RSI < 75 → +1.0 (momentum is bullish but not overbought)
— 📈 MACD Histogram > 0 → +1.0 (momentum is positive)
— 📈 MACD Line > Signal Line → +1.0 (MACD has bullish crossover)
— ⚖️ Close > VWAP → +1.0 (price above institutional fair value)
— 📊 Volume > SMA(20) × 1.2 → +1.0 (above-average participation)
— 💪 ADX > 20 AND +DI > −DI → +1.0 (trending market with bullish pressure)
— 🌐 HTF EMA Fast > HTF EMA Slow → +1.5 (higher timeframe confirms direction)
— ✅ Close > EMA Fast → +0.5 (price is above the fast MA — minor confirmation)
Maximum bullish score: 10.0. Bearish score uses symmetric conditions (< instead of >, −DI > +DI, etc.). The HTF factor carries 1.5× weight because higher-timeframe alignment is the single strongest predictor of signal quality. The close > EMA Fast factor carries 0.5× because it's partially redundant with the crossover — it adds a minor confirmation that price didn't just touch the crossover but is clearly above it.
A signal fires when: EMA crossover occurs + price is on the correct side of both EMAs + RSI is not extreme + composite score ≥ Min Confluence Score (default 5 out of 10).
2️⃣ Structure-based stop loss with ATR fallback.
When enabled (default on), the stop loss is placed at the most structurally meaningful level:
For long trades:
— structureStop = recent swing low (over configurable lookback, default 10 bars) − 0.2× ATR padding
— atrStop = entry − ATR × SL multiplier
— finalStop = max(structureStop, atrStop) — the HIGHER (tighter) of the two
This "pick the tighter stop" logic ensures the SL is always at a meaningful structural level but never further than the ATR-based maximum. A minimum distance of 0.5× ATR is enforced to prevent unrealistically tight stops when the swing low is very close to entry.
For short trades: symmetric logic with min() instead of max(), swing high + padding.
When structure SL is disabled, the stop uses pure ATR: SL = entry ± ATR × multiplier.
3️⃣ Progressive trailing stop system.
After entry, the stop ratchets progressively as targets are hit:
— Initial state : SL at structure/ATR level
— After TP1 hit : SL moves to entry price (breakeven) — worst case is now 0 loss
— After TP2 hit : SL moves to TP1 level — worst case is now TP1 profit locked
— After TP3 hit : SL moves to TP2 level — TP2 profit locked, runner continues
The trailing stop line updates dynamically on the chart (orange dotted line with label). The SL hit check uses the pre-update trail value to prevent same-bar conflicts: if TP1 and the trail are both touched on the same candle, the TP1 hit processes first, then the trail is checked against its PRE-move value.
This progressive system means that once a trade reaches TP1, it can only end in breakeven or profit — never a loss. After TP2, the minimum outcome is TP1 profit locked.
4️⃣ Four presets with parameter scaling.
Each preset adjusts two key parameters:
— Conservative : min score floor 7/10, SL floor 2.0× ATR — requires strong consensus, wider stop
— Default : uses your manual settings
— Aggressive : min score ceiling 3/10, manual SL — accepts lighter consensus
— Scalping : min score ceiling 4/10, SL ceiling 1.0× ATR — lower bar, tighter stop
The preset modifies the effective score threshold and SL multiplier — the underlying 10 factors don't change, only how many must agree and how wide the stop is.
5️⃣ Volatility regime detection.
The dashboard displays the current volatility regime: volRatio = ATR(14) / SMA(ATR, 42). High (ratio > 1.3) = volatility above average — consider wider stops. Low (ratio < 0.7) = volatility compressed — watch for breakout. Normal = standard conditions. This provides at-a-glance context for how the current environment affects your settings.
6️⃣ EMA ribbon with macro trend overlay.
Three EMAs create a visual trend system:
— EMA Fast (default 9) = short-term momentum direction
— EMA Slow (default 21) = medium-term trend
— EMA Trend (default 55) = macro trend filter (shown as dot-style line)
The fast/slow ribbon fills green when fast > slow (bullish momentum) and red when fast < slow. Signals only fire when the EMA crossover occurs AND price confirms by closing on the correct side of both EMAs.
7️⃣ RSI extreme avoidance.
The signal engine requires RSI to be in a non-extreme zone: bullish signals require RSI > 50 AND < 75 (not overbought). Bearish signals require RSI < 50 AND > 25 (not oversold). This prevents the most common failure mode of momentum-based entries: buying into an already overbought market or selling into an oversold bounce.
8️⃣ Direction lock — one signal per trend leg.
After a buy signal fires, the next signal can only be a sell (and vice versa). This prevents signal clustering during strong trends where the confluence score might cross the threshold multiple times. If both buy and sell trigger on the same bar (rare edge case), buy takes priority (mutual exclusion).
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Core indicators: EMA Fast(9), EMA Slow(21), EMA Trend(55), RSI(13), MACD(12/26/9), VWAP(hlc3), Volume SMA(20), ADX/DI(14), HTF EMAs via request.security with + lookahead_on.
Step 2 — Confluence scoring: 10 factors evaluated independently for both bullish and bearish directions. Each factor adds its weight (1.0, 1.5, or 0.5) to the composite score. Max score = 10.0 per direction.
Step 3 — Signal trigger: EMA crossover (fast crosses slow) + price above/below both EMAs + RSI not extreme + composite score ≥ threshold + direction lock → confirmed signal on barstate.isconfirmed.
Step 4 — SL calculation: Structure mode: recent swing low/high ± 0.2× ATR padding, then pick the tighter of structure vs ATR stop. Minimum distance enforced at 0.5× ATR. Risk = |entry − SL|.
Step 5 — TP placement: TP1 = entry ± risk × tp1RR, TP2 = entry ± risk × tp2RR, TP3 = entry ± risk × tp3RR.
Step 6 — Trade monitoring: Each bar: check TP1/TP2/TP3 hits → ratchet trailing stop. Check SL hit against pre-ratchet trail value. Update visual lines and labels.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — the EMA ribbon appears showing current trend
2. Select a preset (Conservative for swing, Scalping for 1–5M)
3. Wait for a "Long" or "Short" label — check the dashboard for score
4. Entry, SL, TP1, TP2, TP3 lines appear automatically
5. After TP1 → orange trailing stop line moves to breakeven
6. After TP2 → trail moves to TP1 level. After TP3 → trail moves to TP2.
👁️ Reading the chart:
— 🟢 Green EMA ribbon fill = bullish momentum (fast > slow)
— 🔴 Red EMA ribbon fill = bearish momentum
— ⚫ Dot-style line = EMA Trend (55) — macro direction filter
— 🟢 "Long" label below bar = confirmed buy signal
— 🔴 "Short" label above bar = confirmed sell signal
— 🔵 Blue solid line = entry price
— 🔴 Red solid line = stop loss
— 🟢 Green dashed lines = TP1, TP2, TP3
— 🟠 Orange dotted line = trailing stop (updates after each TP hit)
📊 Dashboard fields:
— Trend: current EMA alignment (Bullish / Bearish / Neutral)
— Score: confluence score (e.g., "7.5 / 10")
— Status: trade state (Active / TP1 ✓ — Trail / TP2 ✓ — Trail / No Trade)
— HTF Bias: higher-timeframe trend (Bullish / Bearish / Neutral)
— Volatility: regime (High / Normal / Low)
— RSI, ADX: current values
— Timeframe, preset, version
🔧 Tuning guide:
— Too many signals: increase Min Score (6–8), use Conservative preset, set HTF filter to a higher TF
— Too few signals: decrease Min Score (3–4), use Aggressive preset
— Stops too tight: increase SL ATR Multiplier (2.0–2.5), increase Swing Lookback (12–20)
— Stops too wide: decrease SL ATR Multiplier (1.0), enable Structure-Based SL
— Scalping 1–5M: Scalping preset, EMA Fast 5/Slow 13/Trend 34, TP1 0.75/TP2 1.5/TP3 2.5
— Swing 4H–1D: Conservative preset, EMA Fast 12/Slow 26/Trend 100, TP3 5.0+
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— HTF Trend Filter (default current TF): higher timeframe for bias. Leave empty = disabled.
— Preset (default Default): Conservative / Default / Aggressive / Scalping
🎯 Entry Engine:
— EMA Fast (default 9) / Slow (default 21) / Trend (default 55)
— Min Confluence Score (default 5): minimum score out of 10 to trigger signal
— RSI Length (default 13)
🛡️ Risk Management:
— ATR Length (default 14) / SL ATR Multiplier (default 1.5)
— TP1/TP2/TP3 R:R (default 1.0 / 2.0 / 3.0)
— Trailing Stop (default On): ratchets SL to BE after TP1, to TP1 after TP2
— Structure-Based SL (default On): recent swing low/high as stop anchor
— Swing Lookback (default 10): bars for structure SL detection
🎨 Visual:
— EMA ribbon, TP/SL lines, trailing stop line, background tint (all toggleable)
— Configurable signal label size (Tiny–Huge)
— Auto / Dark / Light theme
🔔 Alerts
— 🟢 BUY / 🔴 SELL — ticker, price, SL, TP1, TP2, TP3, score, timeframe
— 🎯 TP1 HIT / TP2 HIT / 🏆 TP3 HIT — trade progress
— 🛑 SL HIT — stopped out
All support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. HTF data uses + lookahead_on for non-repainting values. TP/SL hits are checked only on bars after the entry bar (canCheckTPSL = bar_index > entryBar). A warmup period (max of EMA Trend length and 50 bars) prevents signals during insufficient data.
— 📐 The confluence score is not a win-rate predictor . A score of 8/10 means eight market dimensions agree on direction — it measures consensus quality. Higher scores correlate with stronger setups but do not guarantee outcomes.
— ⚖️ Structure-based SL picks the tighter of structure vs ATR stop — not the wider one. This means your actual risk per trade may be less than SL ATR Multiplier × ATR. Check the SL label on each trade for the actual stop level.
— 🔒 The trailing stop uses pre-update values for SL hit detection. If TP1 is hit and the trail moves to breakeven on the same bar, the SL check uses the old trail value — preventing false same-bar stop-outs.
— 📊 VWAP factor auto-falls back to close on instruments where ta.vwap returns na. Volume factor auto-passes (returns true) on instruments without volume data.
— 🔄 If buy and sell trigger simultaneously (extremely rare edge case), buy takes priority and the sell is suppressed.
— 🛠️ This is a signal and risk management tool , not an automated trading bot. It scores confluence, generates signals, places targets, and trails stops — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. All factors auto-adapt to available data. Indicator

Smart Breakout Targets [WillyAlgoTrader]📡 Smart Breakout Targets is an overlay indicator that detects volatility squeezes using a dual-engine system (Bollinger Band Width compression + ATR contraction), builds adaptive consolidation range boxes, waits for a confirmed impulse candle to break the range, and then automatically places entry, stop-loss, and three take-profit levels based on the breakout's risk distance — with full trade lifecycle tracking that monitors TP/SL hits and marks the outcome directly on the chart.
The core concept: volatility compression precedes expansion. When price coils into a tight range, a breakout from that range tends to produce a directional move proportional to how compressed the range was. This indicator automates the entire workflow: detect the compression, define the range, confirm the breakout, calculate the targets, track the outcome.
Most breakout indicators on PulseWire use a single volatility measure (typically Bollinger Band Width or Keltner Channel squeeze) to detect compression. A single measure can produce false positives — BB Width can narrow during a one-directional drift without true consolidation, or ATR can compress during a holiday session without tradeable structure. This indicator requires both engines to agree: BB Width must be below its threshold AND ATR must be below its compression ratio simultaneously. This dual confirmation eliminates the majority of false squeezes.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A squeeze detector alone tells you volatility is low — but it doesn't give you a range to trade against. A range box alone tells you where support and resistance are — but it doesn't confirm whether the breakout is genuine. An impulse filter alone measures candle quality — but without knowing the range boundaries, it doesn't know what's being broken. And TP/SL levels without range context have no structural anchor.
This indicator connects them into a complete breakout workflow:
BB Width squeeze + ATR compression → Range duration check → Adaptive Donchian range → Resistance/Support zones → Impulse candle confirmation → Filter gate (volume + HTF) → Entry at breakout → SL at opposite boundary + ATR buffer → TP1/TP2/TP3 as R:R multiples → Trade lifecycle tracking → Outcome labeling
The dual squeeze engine defines WHEN compression exists. The minimum squeeze duration confirms the consolidation is established, not momentary. The adaptive Donchian tracks the range boundaries DURING the squeeze (expanding with each new high/low). The impulse filter confirms the breakout candle has sufficient body size relative to ATR. The volume and HTF filters add optional quality gates. And the R:R-based targets anchor to the actual risk distance (entry to opposite range boundary), not to arbitrary ATR multiples.
Removing the dual engine reintroduces single-measure false squeezes. Removing the minimum duration allows momentary vol dips to create ranges. Removing the impulse filter lets weak candles trigger breakouts. Removing the ATR-buffered SL places stops too close to range boundaries. Each component solves a specific failure mode.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Dual-engine squeeze detection (BB Width + ATR compression).
Two independent volatility measures must agree before a squeeze is confirmed:
Engine 1 — Bollinger Band Width:
bbWidth = (upperBB − lowerBB) / basisBB, where upperBB = SMA(close, len) + mult × stdev(close, len). The BB Width is compared to its own SMA: bbSqueeze = bbWidth < SMA(bbWidth, len) × squeezeThreshold (default 0.6). This detects when the bands are significantly tighter than their recent average.
Engine 2 — ATR Compression:
atrVal = ATR(len/2), atrSma = SMA(ATR, len). Compression = atrVal < atrSma × atrCompressRatio (default 0.75). This detects when absolute volatility (measured by ATR) has contracted below its recent average. The ATR period is half the squeeze length for faster response to volatility changes.
Combined: isSqueeze = bbSqueeze AND atrCompress. Both engines must agree simultaneously. BB Width can narrow during a drift (price moving slowly but directionally) while ATR remains normal — the ATR engine blocks this false squeeze. Conversely, ATR can compress during a holiday while BB Width is normal — the BB engine blocks this. Dual agreement ensures genuine consolidation.
2️⃣ Minimum squeeze duration filter.
A squeeze counter tracks consecutive bars where both engines agree. The range box is only created when the squeeze has lasted at least minSqueezeBars (default 5). This prevents momentary dips in volatility (single-bar BB Width contraction during a large candle, for example) from creating spurious ranges. The counter resets to zero when either engine disagrees.
3️⃣ Adaptive Donchian range boundaries.
When a squeeze begins, the indicator initializes squeezeHigh and squeezeLow from the first bar. On each subsequent bar during the squeeze, the boundaries expand: squeezeHigh = max(squeezeHigh, high), squeezeLow = min(squeezeLow, low). This creates an adaptive Donchian channel that captures the full consolidation range — not just a fixed lookback but the exact range from squeeze start to squeeze end.
If the resulting range exceeds 6× ATR (extreme outlier), it's clamped to 3× ATR above and below the range center. This prevents excessively wide ranges from producing unreachable targets.
The range box also includes a resistance zone (top half-ATR, red-tinted) and a support zone (bottom half-ATR, green-tinted), highlighting the areas where price is most likely to be rejected on a false breakout.
4️⃣ Impulse candle breakout confirmation.
A breakout requires more than just closing beyond the range — the breakout candle must be an impulse candle:
Bullish breakout: close > rangeTop AND close > open AND |close − open| > ATR × impulseMultiplier (default 0.8)
Bearish breakout: close < rangeBottom AND close < open AND |close − open| > ATR × impulseMultiplier
This body size filter ensures the breakout candle has genuine momentum behind it — not a thin wick that barely clips the boundary. The impulse multiplier is configurable: lower values (0.3–0.5) accept weaker candles, higher values (1.0–1.5) require strong conviction bars.
5️⃣ R:R-based TP/SL with ATR-buffered stop.
On breakout, the indicator calculates:
— Entry = close of breakout candle
— Stop Loss = opposite range boundary ± ATR × slBuffer (default 0.5). For a bullish breakout: SL = rangeBottom − ATR × 0.5. The buffer prevents the stop from sitting exactly at the range boundary where it would be clipped by a retest wick.
— Risk distance = |entry − SL|
— TP1 = entry ± risk × tp1RR (default 1.0 = 1:1 R:R)
— TP2 = entry ± risk × tp2RR (default 2.0 = 1:2 R:R)
— TP3 = entry ± risk × tp3RR (default 3.0 = 1:3 R:R)
All levels are drawn as extending lines with price labels, plus linefill zones (red = risk area from entry to SL, green = reward area from entry to TP3).
6️⃣ Trade lifecycle tracking with outcome labels.
After a breakout fires, the indicator actively monitors whether price hits TP1, TP2, TP3, or SL:
TP hit detection: for long trades, high ≥ TPx AND high < TPx (first touch). For short trades, low ≤ TPx AND low > TPx. This ensures each TP is counted exactly once.
Trade close conditions:
— TP3 hit → trade marked as "Win (TP3)" → ✔ label placed on chart → all target lines removed
— SL hit → trade marked as "Loss (SL)" → ✘ label placed on chart → all target lines removed
— New breakout while trade active → previous trade replaced
The dashboard shows: Active / Win (TP3) / Loss (SL) with the last P&L in price units. Close labels include tooltips with full trade details (entry, TP3/SL level, P&L).
7️⃣ Overlap prevention for range boxes.
When enabled (default on), the indicator prevents a new range box from overlapping with an existing one. The squeezeStartBar of a new range must be after the right edge of the most recent existing box. This prevents cluttered, overlapping consolidation zones that would create confusing breakout levels.
8️⃣ Signal strength scoring (0–4).
Each breakout receives a strength score based on how many quality factors are present:
— +1 for impulse candle (always true on breakout, baseline)
— +1 for volume surge (if volume filter enabled and passed)
— +1 for HTF alignment (if HTF filter enabled and aligned)
— +1 for extended squeeze (squeeze duration ≥ 2× minimum)
Classification: Strong (≥3), Medium (≥2), Normal (<2). Displayed in the dashboard.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Volatility measurement: BB Width = (upperBB − lowerBB) / basis. ATR computed with period = squeezeLenght / 2. Both compared to their SMAs.
Step 2 — Squeeze detection: isSqueeze = (bbWidth < bbWidthSMA × threshold) AND (ATR < atrSMA × compressionRatio). Counter tracks consecutive squeeze bars.
Step 3 — Range construction: When squeeze starts, init boundaries from first bar's high/low. Each bar during squeeze: boundaries expand to include new highs/lows. Range capped at 6× ATR.
Step 4 — Range box creation: When squeeze ends (isSqueeze transitions from true to false) AND duration ≥ minimum bars AND not overlapping → create range box with resistance/support zones and centerline.
Step 5 — Breakout scan: On each confirmed bar, iterate through existing range boxes. If close > rangeTop with bullish impulse + filter pass → bullish breakout. If close < rangeBottom with bearish impulse + filter pass → bearish breakout. The broken range box is removed.
Step 6 — Target placement: Entry = close. SL = opposite boundary ± ATR buffer. TP1/TP2/TP3 = entry ± risk × R:R multipliers. Lines, labels, and fill zones are drawn.
Step 7 — Trade monitoring: Each bar, check if price touched TP1/TP2/TP3 or SL (first-touch detection using current vs previous bar comparison). On TP3 or SL → close trade, label outcome, remove visuals.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — gray range boxes appear at detected consolidation zones
2. Red-tinted zone at top = resistance, green-tinted at bottom = support
3. When price breaks out with an impulse candle → "Long" or "Short" label appears
4. Entry, SL, TP1, TP2, TP3 lines are automatically drawn
5. When price reaches TP3 → ✔ label. When SL hit → ✘ label. Trade auto-closes.
👁️ Reading the chart:
— ⬜ Gray box = consolidation range (detected squeeze zone)
— 🟥 Red-tinted top zone = resistance area within range
— 🟩 Green-tinted bottom zone = support area within range
— ➖ Dashed centerline = range midpoint
— 🟢 "Long" label below bar = confirmed bullish breakout
— 🔴 "Short" label above bar = confirmed bearish breakout
— Green solid line = entry price
— Red dashed line = stop loss
— Green dotted lines = TP1, TP2, TP3 levels
— 🟩 Green fill = reward zone (entry to TP3)
— 🟥 Red fill = risk zone (entry to SL)
— ✔ TP3 label = trade closed at target (win)
— ✘ SL label = trade stopped out (loss)
— 🟡 Yellow background (optional) = active squeeze
📊 Dashboard fields:
— Status: Active / Win (TP3) / Loss (SL)
— Signal: last breakout direction with bars elapsed
— Strength: signal quality (Strong / Medium / Normal)
— Trend: current trade direction
— Squeeze: active status with bar count
— Entry / Stop Loss: current trade levels
— Last P&L: profit/loss of last completed trade
— HTF Bias: higher-timeframe trend direction
— Version / TF
🔧 Tuning guide:
— Too many false squeezes: decrease Squeeze Threshold (0.4–0.5), decrease ATR Compression Ratio (0.6–0.7), increase Min Squeeze Bars (8–12)
— Missing squeezes: increase Squeeze Threshold (0.7–0.8), increase ATR Compression Ratio (0.8–0.9), decrease Min Squeeze Bars (3–4)
— Breakouts too weak: increase Impulse Body Threshold (1.0–1.5), enable Volume Filter
— Stops too tight: increase SL ATR Buffer (0.7–1.0)
— Want only trend-aligned breakouts: enable HTF Trend Filter
— Scalping 1–5M: Squeeze Length 15, Min Squeeze 3, Impulse 0.5, TP1 0.75
— Swing 4H–1D: Squeeze Length 30, Min Squeeze 8, Impulse 1.0, TP3 5.0
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Squeeze Detection Length (default 20): lookback for BB Width and ATR baseline
— BB Multiplier (default 2.0): standard deviation multiplier for Bollinger Bands
— Squeeze Threshold (default 0.6): BB Width must be below this fraction of its SMA
— ATR Compression Ratio (default 0.75): ATR must be below this fraction of its SMA
— Min Squeeze Bars (default 5): minimum consecutive squeeze bars for valid range
— Impulse Body Threshold (default 0.8): breakout candle body ≥ ATR × this value
— Prevent Overlap (default On): no overlapping range boxes
🎯 Targets:
— SL ATR Buffer (default 0.5): extra ATR distance beyond range boundary for stop
— TP1 R:R (default 1.0) / TP2 R:R (default 2.0) / TP3 R:R (default 3.0): risk-to-reward multiples
🔍 Filters:
— Volume Filter (default Off): breakout volume > SMA(20) × multiplier (default 1.5×)
— HTF Trend Filter (default Off): align breakouts with SMA(50) trend on HTF (default Daily)
🎨 Visual:
— Range boxes, resistance/support zones, centerline (all toggleable)
— Breakout signals, target levels, close labels (all toggleable)
— Squeeze background highlight (default Off)
— Configurable label sizes (signal, target, close — separate controls)
— Auto / Dark / Light theme
🔔 Alerts
— 🟢 BULL BREAKOUT / 🔴 BEAR BREAKOUT — ticker, price, SL, TP1, timeframe
— ✅ TP1 HIT / TP2 HIT / TP3 HIT — trade progress
— ✅ TP3 TRADE CLOSED — full win with P&L
— ❌ SL TRADE CLOSED — stopped out with P&L
All support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All breakout signals require barstate.isconfirmed. Range boxes are created on the bar after the squeeze ends (confirmed transition). TP/SL hit detection uses first-touch logic (current bar vs previous bar comparison). HTF filter uses + lookahead_on for non-repainting. A warmup period (max of squeeze length and 50 bars) prevents signals during insufficient data.
— 📐 The dual-engine squeeze is not a standard Bollinger/Keltner squeeze . It combines BB Width percentile compression with ATR contraction ratio — both must agree. This is stricter than a single-measure approach and produces fewer but higher-quality consolidation zones.
— ⚖️ The trade is tracked until TP3 or SL — there is no partial close logic. TP1 and TP2 are marked as they're hit (for visual reference and alerts) but the trade remains open until the final outcome. You can manage partial closes manually using the TP1/TP2 alerts.
— 📊 Signal strength reflects how many quality factors aligned at the time of breakout. A "Strong" signal had volume surge, HTF alignment, AND extended squeeze — but strength does not predict outcome.
— 🔄 If a new breakout occurs while a trade is active, the previous trade is replaced. The indicator tracks one trade at a time.
— 📏 Range box boundaries are adaptive Donchian — they expand during the squeeze to capture every high and low. They do not contract. This means the range can be wider than the BB Width suggests if a spike occurred during the squeeze.
— 🛠️ This is a breakout detection and target visualization tool , not an automated trading bot. It identifies squeeze zones, confirms breakouts, and places structural targets — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Volume filter auto-adapts to instruments without volume data. Indicator

StealthTrail SuperTrend [WillyAlgoTrader]📡 StealthTrail SuperTrend is an overlay indicator that takes the classic SuperTrend concept and adds five layers of noise reduction: an adaptive multiplier that scales bands to current volatility, a flip cushion that requires price to push beyond the band by a configurable ATR distance before confirming a trend change, a cooldown timer that enforces a minimum gap between flips, an RSI momentum filter that blocks trend changes without directional confirmation, and a composite trend strength score (0–100) that quantifies how committed the current trend is. The result is a SuperTrend that stays in trends longer, flips less often in chop, and gives you a real-time confidence reading on every trend leg.
🧩 WHY THESE COMPONENTS WORK TOGETHER
The standard SuperTrend has one well-known problem: whipsaws. In ranging or choppy markets, price repeatedly crosses the band boundary, triggering rapid bullish→bearish→bullish flips that produce losing signals. The root causes are:
1. Fixed multiplier — the band width doesn't adapt when volatility contracts or expands, so the same multiplier is too tight in high-vol and too wide in low-vol
2. Instant flip — a single close beyond the band triggers a trend change, even if it's a minor wick-driven overshoot
3. No recovery time — the indicator can flip back on the very next bar, creating same-bar or next-bar whipsaws
4. No momentum context — the flip happens regardless of whether momentum actually supports the new direction
StealthTrail addresses each root cause with a dedicated mechanism:
Adaptive multiplier → solves #1 : bands automatically widen when ATR is above its average (high volatility) and tighten when below (low volatility), keeping the band distance proportional to current market conditions.
Flip cushion → solves #2 : price must close beyond the band by an additional cushion (configurable fraction of ATR) before the flip is accepted, filtering out marginal crossovers.
Cooldown timer → solves #3 : after a flip, the indicator ignores further flip attempts for N bars (default 3), preventing rapid back-and-forth in chop.
Momentum filter → solves #4 : a bullish flip requires RSI above a threshold, a bearish flip requires RSI below the symmetric threshold, confirming that momentum actually supports the direction change.
Trend strength scoring → provides context : combines price distance from band + RSI alignment into a 0–100 score, so you know whether the current trend is strong, fading, or about to flip.
These five mechanisms work as a pipeline: the adaptive multiplier sets the right band width → the cushion prevents marginal crossovers → the cooldown prevents rapid reversals → the momentum filter confirms directional support → and the strength score tells you how committed the trend is. Removing any one layer reintroduces the specific whipsaw pattern it was designed to prevent.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Adaptive volatility multiplier.
Instead of using a fixed ATR multiplier (classic SuperTrend), StealthTrail scales the multiplier dynamically:
adaptiveMult = baseMultiplier × (currentATR / SMA(ATR, adaptationPeriod))
Where currentATR = ta.atr(atrLength), and SMA(ATR) is the volatility baseline over the adaptation smoothing period (default 55 bars). The ratio currentATR / averageATR measures whether volatility is currently above (ratio > 1.0) or below (ratio < 1.0) its recent norm.
The adaptive multiplier is clamped between configurable min (default 1.0) and max (default 5.0) to prevent extreme values. When volatility spikes (e.g., news event), the multiplier increases → bands widen → the trend doesn't flip on a volatility-driven spike. When volatility compresses (consolidation), the multiplier decreases → bands tighten → the indicator catches the breakout earlier.
This can be toggled off for classic fixed-multiplier behavior.
2️⃣ Flip cushion — requires extra ATR distance beyond the band.
A standard SuperTrend flips the moment close crosses the band. StealthTrail requires:
Bullish flip: close > upperBand + cushion × ATR
Bearish flip: close < lowerBand − cushion × ATR
The cushion (default 0.15× ATR) creates a dead zone around the band boundary. Price must push meaningfully beyond the band — not just touch it — before a flip is accepted. This single mechanism eliminates a large portion of marginal crossover whipsaws where price briefly clips the band before returning.
Setting the cushion to 0.0 restores classic SuperTrend behavior (flip exactly at the band).
3️⃣ Signal cooldown timer.
After every confirmed trend flip, a counter starts. No new flip can occur for N bars (default 3). This prevents the most destructive whipsaw pattern: a bearish flip immediately followed by a bullish flip on the next bar (or vice versa), which generates two consecutive losing signals.
The cooldown is tracked as barsSinceFlip, incremented each bar, and checked before any flip is processed. Only when barsSinceFlip ≥ cooldownInput can a new flip occur. This is independent of the cushion — both must pass.
4️⃣ RSI momentum filter.
On every raw trend flip (band crossed + cushion passed + cooldown passed), an additional RSI check is applied:
Bullish flip requires: RSI(rsiLength) ≥ rsiThreshold (default 45)
Bearish flip requires: RSI(rsiLength) ≤ (100 − rsiThreshold) = 55
This is deliberately asymmetric around the center by design (threshold 45, not 50): a bullish flip only needs RSI ≥ 45 (slightly below center), meaning it passes unless momentum is actively bearish. A bearish flip only needs RSI ≤ 55. This permissive threshold blocks the worst counter-momentum flips without being so strict that it delays legitimate trend changes.
When the filter blocks a flip, the trend direction does not change and the band continues ratcheting in the original direction. An optional "Show Filtered Flips" setting displays a muted dot where a flip was blocked — useful for understanding filter behavior.
5️⃣ Composite trend strength score (0–100).
On every bar, a strength score is calculated from two components:
Distance score (0–50): How far price is from the SuperTrend band, measured in ATR units:
distScore = min(|close − band| / ATR × 20, 50)
A large distance means price is well away from the band — the trend has room before a potential flip.
Momentum score (0–50): How well RSI aligns with the current trend direction:
For bullish: momScore = min(max(RSI − 50, 0), 50)
For bearish: momScore = min(max(50 − RSI, 0), 50)
RSI reading that confirms the trend direction contributes up to 50 points.
Total: strength = round(min(distScore + momScore, 100))
Classification: Strong ≥ 70, Medium ≥ 40, Weak < 40. Displayed in the dashboard and included in alert messages. This gives you a real-time confidence reading: a Strong reading means price is far from the band with confirming momentum — the trend is well-established. A Weak reading means price is near the band or momentum is fading — a flip may be imminent.
6️⃣ Filtered flip visualization.
When "Show Filtered Flips" is enabled, a muted gray dot appears on the band at every point where a raw flip occurred but was blocked by a filter (momentum or volume). This is a transparency feature: instead of silently suppressing signals, the indicator shows you exactly where it intervened and what it filtered out. You can evaluate whether the filter saved you from a bad signal or delayed a good one.
7️⃣ Gradient fill between price and band.
The space between close and the SuperTrend band is filled with a directional gradient: bullish trends fade from green (near band) to transparent (near price), bearish trends fade from red to transparent. The gradient uses fill() with top/bottom color mapping — the visual intensity naturally increases as the band is further from price, creating an intuitive "strength of trend" visual without needing to read the dashboard.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — ATR calculation: ta.atr(atrLength) with a high-low fallback for early bars where ATR is unavailable.
Step 2 — Adaptive multiplier: If adaptive mode is on: multiplier = baseMultiplier × (ATR / SMA(ATR, adaptSmoothing)), clamped to . If off: multiplier = baseMultiplier (fixed).
Step 3 — Band calculation: upperBand = hl2 + multiplier × ATR. lowerBand = hl2 − multiplier × ATR. Bands are calculated from hl2 (midpoint) for symmetry.
Step 4 — Band ratcheting: In an uptrend, the lower band can only rise — it is set to max(current_lowerBand, previous_band). In a downtrend, the upper band can only fall — min(current_upperBand, previous_band). This ratcheting prevents the band from retreating during a trend, which would prematurely trigger a flip.
Step 5 — Flip detection: In an uptrend: if close < band − cushion × ATR AND barsSinceFlip ≥ cooldown → raw bearish flip. In a downtrend: if close > band + cushion × ATR AND barsSinceFlip ≥ cooldown → raw bullish flip. On flip, the band resets to the opposite band value and barsSinceFlip resets to 0.
Step 6 — Filter gate: If RSI momentum filter is on: bullish flip requires RSI ≥ threshold, bearish requires RSI ≤ (100 − threshold). If volume filter is on: volume must exceed SMA(volume, 20) × multiplier. Both must pass for the flip to become a confirmed signal. If either fails, the flip is recorded as "filtered" (visualizable) but the trend direction reverts — no signal is emitted.
Step 7 — Signal emission: Confirmed flip + barstate.isconfirmed + warmup check → Buy (▲) or Sell (▼) label appears. Strength score is calculated and updated.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — the adaptive SuperTrend band appears immediately
2. Green band = bullish trend, red band = bearish trend
3. ▲ label below bar = confirmed buy (trend flipped bullish through all filters)
4. ▼ label above bar = confirmed sell (trend flipped bearish)
5. Check dashboard for strength score — Strong trends are more reliable
👁️ Reading the chart:
— 🟢 Green step-line = SuperTrend band in bullish mode (following lower band)
— 🔴 Red step-line = SuperTrend band in bearish mode (following upper band)
— 🟢 Large green dot on band = confirmed bullish flip
— 🔴 Large red dot on band = confirmed bearish flip
— ⚫ Gray dot on band (optional) = raw flip that was blocked by a filter
— 🟩🟥 Gradient fill = visual trend strength (denser = further from band = stronger trend)
— Background tint (optional) = overall trend direction shading
📊 Dashboard fields:
— Trend: current direction (Bullish / Bearish)
— Signal: last confirmed signal with bars elapsed
— Strength: 0–100 score with classification (Strong / Medium / Weak)
— Multiplier: current adaptive multiplier value (e.g., 2.83×)
— RSI: current RSI reading
— Timeframe and version
🔧 Tuning guide:
— Too many whipsaws: increase Flip Cushion (0.2–0.3), increase Cooldown (4–6), enable Momentum Filter
— Signals too late: decrease Flip Cushion (0.05–0.10), decrease Cooldown (1–2), lower Base Multiplier
— Bands too wide in low-vol: decrease Min Adaptive Mult (0.8), decrease Adaptation Smoothing (30–40)
— Bands too tight in high-vol: increase Max Adaptive Mult (5.0–6.0), increase Base Multiplier
— Ranging/choppy market: enable Momentum Filter, increase Cooldown, increase Cushion — all three work together to suppress chop signals
— Strong trending market: decrease Cushion (0.05), decrease Cooldown (1), disable Momentum Filter — let the indicator react faster to trend continuation
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— ATR Length (default 13): volatility measurement period
— Base Multiplier (default 2.5): base ATR multiplier for band width
— Adaptive Multiplier (default On): scale bands by current/average ATR ratio
— Adaptation Smoothing (default 55): SMA lookback for ATR baseline
🔍 Filters:
— Flip Cushion (default 0.15× ATR): extra distance beyond band required for flip
— Signal Cooldown (default 3 bars): minimum gap between flips
— Momentum Filter (default On): RSI confirmation for trend changes
— RSI Length (default 13) / RSI Threshold (default 45): momentum filter parameters
— Volume Filter (default Off): above-average volume confirmation
🔧 Advanced:
— Min Adaptive Mult (default 1.0): floor for adaptive scaling
— Max Adaptive Mult (default 5.0): ceiling for adaptive scaling
🎨 Visual:
— Band line, gradient fill, filtered flip dots, trend background (all toggleable)
— Auto / Dark / Light theme
🔔 Alerts
— 🟢 BUY — ticker, price, band level, timeframe, strength score
— 🔴 SELL — same fields
Both support plain text and JSON webhook format. Bar-close confirmed, filter-gated, cooldown-enforced.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. Band ratcheting is deterministic — the band value on a closed bar never changes retroactively. A warmup period (max of ATR length, adaptation smoothing, and 50 bars) prevents signals during insufficient data.
— 📐 This is not a standard SuperTrend. The adaptive multiplier, flip cushion, cooldown, and momentum filter fundamentally change the signal generation logic. A classic SuperTrend flip would occur significantly earlier (or later, depending on volatility) than a StealthTrail flip — they are not interchangeable.
— ⚖️ The flip cushion and cooldown work independently . Both must pass for a flip to occur. In chop, the cooldown may block a flip even after the cushion is satisfied, or the cushion may prevent a flip even after the cooldown expires. This dual-gate design is intentional.
— 📊 Trend strength is a real-time reading , not a prediction. A strength of 85 means price is far from the band with confirming momentum right now — it does not predict how long the trend will continue.
— 🔄 "Filtered Flips" (gray dots) show where a trend change would have occurred in a classic SuperTrend but was blocked by the momentum or volume filter. This transparency helps you understand the filter's impact and tune the threshold accordingly.
— 📈 Volume filter auto-disables on instruments without volume data (many forex pairs). On these instruments, only the momentum filter, cushion, and cooldown provide noise reduction.
— 🛠️ This is a trend-following signal tool , not an automated trading bot. It identifies trend direction, scores trend strength, and generates filtered signals — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. The adaptive multiplier self-calibrates to any instrument's volatility profile. Indicator

POC Sweep Reclaim [LuxAlgo]The POC Sweep Reclaim (PSR) model identifies a two-step "rejection then acceptance" price action pattern centered around the Point of Control (POC) of previous candles. By approximating volume-at-price data using lower timeframe (LTF) granularity, the tool highlights specific liquidity traps where price first fails to sustain a move beyond a high-volume level and subsequently reclaims it.
The PSR framework is built on the logic that a "Sweep" represents a failed probe of value, while the "Reclaim" represents a successful breach, signaling a potential shift in market dominance as price moves away from trapped participants.
🔶 USAGE
The indicator visualizes market microstructure dynamics through a sequence of two distinct events:
🔹 The Sweep (The Rejection)
A sweep occurs when a candle's wick trades through the previous bar's POC, but the candle body fails to close beyond it. This identifies a "Liquidity Grab" where price interacts with a high-volume node but fails to find acceptance, often trapping breakout traders.
Buyside Sweep: Price wicks above the previous POC but closes below it (Bearish Rejection). Sellside Sweep: Price wicks below the previous POC but closes above it (Bullish Rejection).
🔹 The Reclaim (The Acceptance)
A reclaim occurs when the candle immediately following a sweep successfully closes beyond the same POC level that was just rejected.
BSR (Buyside Reclaim): A bullish signal where price closes above a previously swept upper POC, suggesting the trap is resolved to the upside. SSR (Sellside Reclaim): A bearish signal where price closes below a previously swept lower POC, suggesting follow-through to the downside.
🔶 DETAILS
The script aims to bridge the gap between standard OHLCV analysis and order-flow dynamics. While a true footprint engine (available on higher PulseWire tiers) is more accurate, this script uses a proxy by aggregating volume from a lower timeframe (e.g., 1-minute) to estimate the POC of higher-timeframe bars.
🔹 Academic Intuition
Order-Flow Imbalance (OFI): Short-term price changes are strongly linked to the inability of one side to provide enough depth. A "reclaim" reflects a shift where the dominant side successfully absorbs the liquidity that caused the initial rejection. Salient Prices: High-volume nodes like the POC act as psychological and mechanical barriers. Research indicates that liquidity clusters around these prominent prices, making them significant areas for support/resistance. Stop-Loss Cascades: Sweeps often interact with clustered stop-loss orders. If price reclaims the level after clearing these stops, it can trigger a directional move as the market "clears" the liquidity hurdle.
🔹 Practical Limitations
Footprint Proxy: The POC is calculated by aggregating volume at the close of LTF bars. This is a noisy proxy compared to a true footprint, which tracks every tick. Data Snooping: Like all pattern-based indicators, the "Reclaim" logic should be verified with robust backtesting to ensure signals are not the result of random price noise. Repainting: Because the POC depends on LTF data, the values for the current developing bar may fluctuate until the candle closes.
🔶 SETTINGS
Lower Timeframe for POC: Sets the granularity for volume aggregation. A lower value (like 1m) provides a more precise POC proxy. Show POC: Toggles the visibility of the calculated Point of Control dots for every bar. Show Sweep Dots: Displays markers at the POC level when a wick interaction occurs without a body close. Show BSR (Buyside Reclaim): Highlights candles that successfully close above a swept buyside POC. Show SSR (Sellside Reclaim): Highlights candles that successfully close below a swept sellside POC. Indicator

PinBar Finder by cryptokazancevEnglish description:
This script helps traders identify high-probability reversal points based on price action, specifically Pin Bars — a well-known candlestick pattern used in technical analysis.
What does the indicator do?
It detects bullish and bearish Pin Bars using a custom method for wick-to-body ratio and filters based on historical volatility (pseudo-ATR). A label appears on the chart with detailed info on wick and body size when a valid signal is found.
How does it work?
- The indicator calculates a pseudo-ATR based on the percentage range of the last 1000 candles.
- It then multiplies this value by a user-defined factor (default: 1.1) to set a dynamic threshold for wick size.
- Bullish Pin Bars are detected when the lower wick is at least 1.1 times the body and greater than the dynamic ATR.
- Bearish Pin Bars are detected when the upper wick meets similar conditions.
- Signals are shown using chart labels with exact wick/body percentages.
- Alerts are included for automation or integration with trading bots.
How to use it?
- Add the indicator to any timeframe and asset.
- Use the alerts to notify you when a Pin Bar appears.
- Ideal for traders who use candlestick reversal strategies or combine price action with other confluence tools.
- You can adjust the wick length multiplier to fit the volatility of the instrument.
What makes it original?
Unlike many public scripts that use fixed ratios, this script adapts wick length detection based on recent volatility (pseudo-ATR logic). This makes it more dynamic and suitable for different markets and timeframes.
Описание на русском:
Этот скрипт помогает трейдерам находить точки потенциального разворота на основе прайс-экшена, а именно — свечного паттерна «Пин-бар». Индикатор автоматически определяет бычьи и медвежьи пин-бары с учетом адаптивных параметров волатильности.
Что делает индикатор?
Скрипт ищет свечи, у которых тень в несколько раз превышает тело (пин-бары), и отображает на графике точную информацию о длине тела и тени. Это полезно для трейдеров, использующих свечные сигналы на разворот.
Как работает?
- Рассчитывается псевдо-ATR по 1000 последним свечам на основе процентного диапазона high-low.
- Этот ATR умножается на заданный множитель (по умолчанию: 1.1), чтобы динамически задать минимальную длину тени.
- Бычий пин-бар определяется, когда нижняя тень больше тела в 1.1 раза и превышает ATR.
- Медвежий пин-бар — аналогично, но для верхней тени.
- Индикатор отображает лейблы с точными значениями тела и тени.
- Реализованы условия для оповещений (alerts).
Как использовать?
- Добавьте индикатор на нужный график и таймфрейм.
- Настройте alerts, чтобы не пропустить сигналы.
- Особенно полезен для трейдеров, работающих со свечным анализом, стратегиями разворота, а также в сочетании с другими индикаторами.
В чем оригинальность?
В отличие от многих скриптов, использующих фиксированные параметры, здесь используется динамический расчет длины тени на основе волатильности. Это делает скрипт адаптивным к рынку и таймфрейму. Indicator

Indicator

Indicator

Indicator

Indicator

Smart Money Setup 06 [TradingFinder] Liquidity Sweeps + OB Swing🔵 Introduction
Smart Money, managed by large investors, injects significant capital into financial markets by entering real capital markets.
Capital entering the market by this group of individuals is called smart money. Traders can profit from financial markets by following such individuals.
Therefore, smart money can be considered one of the effective methods for analyzing financial markets.
Sometimes, before a market movement, fluctuation movements that create price movement cause many traders' "Stop Loss" to be triggered. These movements are created in various patterns.
One of these patterns is similar to an "Expanding Triangle", which touches the stop loss of individuals who have placed their stop loss in the cash area in the form of 5 consecutive openings.
To better understand this setup, pay attention to the images below.
Bullish Setup Details :
Bearish Setup Details :
🔵 How to Use
After adding the indicator to the chart, wait for trading opportunities to appear. By changing the "Time Frame" and "Pivot Period", you can see different trading positions.
In general, the smaller the "Time Frame" and "Pivot Period", the more likely trading opportunities will appear.
Bullish Setup Details on Chart :
Bearish Setup Details on Chart :
🔵 Settings
You have access to "Pivot Period", "Order Block Refine", and "Refine Mode" through settings.
By changing the "Pivot Period", you can change the range of zigzag that identifies the setup.
Through "Order Block Refine", you can specify whether you want to refine the width of the order blocks or not. It is set to "On" by default.
Through "Refine Mode", you can specify how to improve order blocks.
If you are "risk-averse", you should set it to "Defensive" mode because in this mode, the width of the order blocks decreases, the number of your trades decreases, and the "reward-to-risk ratio "increases.
If you are on the opposite side and are "risk-taker", you can set it to "Aggressive" mode. In this mode, the width of the order blocks increases, and the likelihood of losing positions decreases.
Indicator

Smart Money Setup 05 [TradingFinder] Minor OB & Trend Proof🔵 Introduction
The "Smart Money Concept" transcends the realm of mere technical trading strategies to embody a comprehensive philosophy on the dynamics of market operations. It posits that key market participants engage in price manipulation, thereby complicating the trading landscape for smaller, retail traders.
Under this doctrine, retail traders are advised to tailor their strategies in alignment with the maneuvers of "Smart Money" - essentially, the capital operated by market makers.
To this end, one should endeavor to mirror the trading patterns of these influential market participants, who are adept at navigating through the nuances of supply, demand, and overall market structure. As a proponent of Smart Money trading, these elements are pivotal in your decision-making process for trade entries.
🟣 Key Insights
The core principle of this strategy hinges on misleading other traders. A sudden market movement against the prevailing trend that results in the formation of either a lower low or a higher high, followed by a pullback where a divergence pattern emerges, sets the stage.
Subsequently, the market may form another lower low or higher high. Traders, persuaded that the market will continue along the trajectory of the new movement, are caught off-guard when the price abruptly reverses direction. Following a "Stop Hunt" of the traders' open positions, the market resumes its initial trend.
To grasp the essence of this setup, observe the following illustrations.
"Bullish Setup" :
"Bearish Setup" :
🔵 How to Use
The setups can be customized based on the desired formation period. This adjustment can be made through the indicator's price setting options, where the default period is set at 2.
Upon configuring your preferred period, the signals become actionable. Once a setup forms, the subsequent step involves waiting for the price to reach the "Order Block".
"Bullish Setup" :
"Bearish Setup" :
Indicator

Alert Sender Library [TradingFinder]Library "AlertSenderLibrary_TradingFinder"
🔵 Introduction
The "Alert Sender Library" is a management and production program for "Alert Messages" that enables the creation of unique messages for any type of signal generated by indicators or strategies.
These messages include the direction of the signal, symbol, time frame, the date and time the condition was triggered, prices related to the signal, and a personal message from you. To make better and more optimal use of this "library", you should carefully study " Key Features" and "How to Use".
🔵 Key Features
Automatic Detection of Appropriate Type :
Using two parameters, "AlertType" and "DetectionType", which you must enter at the beginning into the "AlertSender" function, the type of the alert message is determined.
For example, if you select one of the "DetectionType"s such as "Order Block Signal", "Signal", and "Setup", your alert type will be chosen based on "Long" and "Short". Whether it's "Long" or "Short" depends on the "AlertType" you have set to either "Bullish" or "Bearish".
Automatic Symbol Detection :
Whenever you add an alert for a specific symbol, if you want the name of that symbol to be in your message text, you must manually write the name of the symbol in your message. One of the capabilities of the "Alert Sender" is the automatic detection of the symbol and adding it to the message text.
Automatic Time Frame Detection :
When adding your alert, the "Alert Sender" detects the time frame of the symbol you intend to add the alert for and adds it to the text. This feature is very practical and can prevent traders from making mistakes.
For example, a trader might add alerts for a specific symbol using a specific indicator in different time frames, taking the main signal in the 1-hour time frame and only a confirmation signal in the 15-minute time frame. This feature helps to identify in which time frame the signal is set.
Detection of Date and Time When the Signal is Triggered :
You can have the date and time at the moment the message is sent. This feature has various uses. For example, if you use the Webhook URL feature to send messages to a Telegram channel, there might be issues with alert delivery on your server, causing delays, and you might receive the message when it has lost its validity.
With this feature, you can match the sending time of the message from PulseWire with the receipt time in your messenger and detect if there is a delay in message delivery.
Important :
You can also set the Time Zone you wish to receive the date and time based on.
Display of "Key Prices" :
Key prices can vary based on the type of signals. For example, when the "DetectionType" is in "Order Block Signal" mode, the key prices are the "Distal" and "Proximal" prices. Or if the "DetectionType" is in "Setup" mode, the key prices are "Entry", "Stop Loss", and "Take Profit".
Receipt of Personal "Messages" :
You can enter your personal message using "input.string" or "input.text_area" in addition to the messages that are automatically created.
Beautiful and Functional Display of Messages :
The titles of messages sent by "AlertSender" are displayed using related emojis to prevent mistakes due to visual errors, enhancing beauty.
🔵 How to Use
🟣 Familiarity with Function and Parameters
AlertSender(Condition, Alert, AlertName, AlertType, DetectionType, SetupData, Frequency, UTC, MoreInfo, Message, o, h, l, c, Entry, TP, SL, Distal, Proximal)
Parameters:
- Condition (bool)
- Alert (string)
- AlertName (string)
- AlertType (string)
- DetectionType (string)
- SetupData (string)
- Frequency (string)
- UTC (string)
- MoreInfo (string)
- Message (string)
- o (float)
- h (float)
- l (float)
- c (float)
- Entry (float)
- TP (float)
- SL (float)
- Distal (float)
- Proximal (float)
To add "Alert Sender Library", you must first add the following code to your script.
import TFlab/AlertSenderLibrary_TradingFinder/1
🟣 Parameters
"Condition" : This parameter is a Boolean. You need to set it based on the condition that, when met (or fired), you want to receive an alert. The output should be either "true" or "false".
"Alert" : This parameter accepts one of two inputs, "On" or "Off". If set to "On", the alarm is active; if "Off", the alarm is deactivated. This input is useful when you have numerous alerts in an indicator or strategy and need to activate only a few of them. "Alert" is a string parameter.
Alert = input.string('On', 'Alert', , 'If you turn on the Alert, you can receive alerts and notifications after setting the "Alert".', group = 'Alert')
"AlertName" : This is a string parameter where you can enter the name you choose for your alert.
AlertName = input.string('Order Blocks Finder ', 'Alert Name', group = 'Alert')
"AlertType" : The inputs for this parameter are "Bullish" or "Bearish". If the condition selected in the "Condition" parameter is of a bullish bias, you should set this parameter to "Bullish", and if the condition is of a bearish bias, it should be set to "Bearish". "AlertType" is a string parameter.
"DetectionType" : This parameter's predefined inputs include "Order Block Signal", "Signal", "Setup", and "Analysis". You may provide other inputs, but some functionalities, like "Key Price", might be lost. "DetectionType" is a string parameter.
"SetupData" :
If "DetectionType" is set to "Setup", you must specify "SetupData" as either "Basic" or "Full". In "Basic" mode, only the "Entry" price needs to be defined in the function, and "TP" (Take Profit) and "SL" (Stop Loss) can be any number or NA. In "Full" mode, you need to define "Entry", "SL", and "TP". "Setup" is a string parameter.
"Frequency" : This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Frequency = input.string('Once Per Bar', 'Message Frequency', , 'The triggering frequency. Possible values are: All (all function calls trigger the alert), Once Per Bar (the first function call during the bar triggers the alert), Per Bar Close (the function call triggers the alert only when it occurs during the last script iteration of the real-time bar, when it closes). The default is alert.freq_once_per_bar.', group = 'Alert')
"UTC" : With this parameter, you can set the Time Zone for the date and time of the alert's dispatch. "UTC" is a string parameter and can be set as "UTC-4", "UTC+1", "UTC+9", or any other Time Zone.
UTC = input.string('UTC', 'Show Alert time by Time Zone', group = 'Alert')
"MoreInfo" : This parameter can take one of two inputs, "On" or "Off", which are strings. Additional information, including "Time" and "Key Price", is included. If set to "On", this information is received; if "Off", it is not displayed in the sent message.
MoreInfo = input.string('On', 'Display More Info', , group = 'Alert')
"Message" : This parameter captures the user's personal message through an input and displays it at the end of the sent message. It is a string input.
MessageBull = input.text_area('Long Position', 'Long Signal Message', group = 'Alert') MessageBear = input.text_area('Short Position', 'Short Signal Message', group = 'Alert')
"o" (Open Price): A floating-point number representing the opening price of the candle. This input is necessary when the "DetectionType" is set to "Signal". Otherwise, it can be any number or "na".
"h" (High Price): A float variable for the highest price of the candle. Required when "DetectionType" is "Signal"; in other cases, any number or "na" is acceptable.
"l" (Low Price): A float representing the lowest price of the candle. This field must be filled if "DetectionType" is "Signal". If not, it can be any number or "na".
"c" (Close Price): A floating-point variable indicating the closing price of the candle. Needed for "Signal" type detections; otherwise, it can take any value or "na".
"Entry" : A float variable indicating the entry price into a trading setup. This is relevant when "DetectionType" is in "Setup" mode. In other scenarios, it can be any number or "na". It denotes the price at which the trade setup is entered.
"TP" (Take Profit): A float that is necessary when "DetectionType" is "Setup" and "SetupData" is "Full". Otherwise, it can be any number or "na". It signifies the price target for taking profits in a trading setup.
"SL" (Stop Loss): A float required when "DetectionType" is "Setup" and "SetupData" is "Full". It can be any number or "na" in other cases. This value represents the price at which a stop loss is set to limit losses.
"Distal" : A float important for "Order Block Signal" detection. It can be any number or "na" if not in use. This variable indicates the price reaching the distal line of an order block.
"Proximal" : A float needed for "Order Block Signal" detection mode. It can take any value or "na" otherwise. It marks the price reaching the proximal line of an order block.
Library

Smart Money Setup 03 [TradingFinder] Minor OB & Trend Proof🔵 Introduction
The "Smart Money Concept" transcends mere technical trading strategies; it embodies a comprehensive philosophy elucidating market dynamics. Central to this concept is the acknowledgment that influential market participants manipulate price actions, presenting challenges for retail traders.
As a "retail trader", aligning your strategy with the behavior of "Smart Money," primarily market makers, is paramount. Understanding their trading patterns, which revolve around supply, demand, and market structure, forms the cornerstone of your approach. Consequently, decisions to enter trades should be informed by these considerations.
🟣 Important Note
In this setup, pattern formation revolves around the robustness of the "Stop Hunt" targeting retail traders.
When this stop hunt occurs, if the price tests below the minor pivot or above the minor pivot, a "Minor Order Block" is formed.
Similarly, if the price tests below the major pivot or above the major pivot, a "Major Order Block" is formed.
Since the price hasn't successfully broken the major pivots before breaking the Top or Bottom, it can be inferred that the minor pivots formed within a leg of price movement exhibit a "Range" structure.
For a deeper comprehension of this setup, refer to the accompanying visual aids below.
Bullish Setup Details :
Bearish Setup Details :
🔵 How to Use
Upon integrating the indicator into your chart, exercise patience as you await the evolution of the trading setup.
Experiment with different trading positions by adjusting both the "Time Frame" and "Pivot Period". Typically, setups materializing over longer "Time Frames" and "Pivot Periods" carry heightened validity.
Bullish Setup Details on Chart :
Bearish Setup Details on Chart :
Within the settings, you possess the flexibility to modify the "Pivot Period" input to tailor the indicator to your preferences.
Indicator

Entry FraggerEntry Fragger is a simple buy signal indicator.
It is most suitable for cryptocurrency, especially for altcoins on the 5 minute to daily timeframe and is based on simple volume calculations, in combination with EMA's.
Main Signal Logic explained:
A buy signal is generated by counting candles with an above average sell volume of 130% to 170%, taking into account the candles position below and above the 50 and 200 EMA.
If criteria meet, the first green candle above the 50 EMA's suggests upcoming higher prices.
The indicator has 2 input variables.
"Signal Confirmations (0 - 7):" Changes signal accuracy by a defining an ammount of high sell volume candles necessary below the 50 EMA.
"Volume Calculation Base (9 - 200):" Sets the exponential volume multiplier, this affects candle coloring and the volume calculation inside the candle.
"Style Settings": Turn ON/OFF Signals, Cloud, Bar Coloring, EMA's, etc...
There are no generally suitable default numbers for those 2 inputs, those have to be tested out, depending on cryptocurrency and timeframe.
The calculation is very basic, the underlying idea being, market maker initiating range breakouts through rapid increase of volume above or below the EMA's .
Example settings:
SOLUSDT: Signal Confirmations: 2, Volume Calculation Base 13.
SOLUSDT: Signal Confirmations: 0, Volume Calculation Base 20.
As you can see it affects signals quite a lot, but staying accurate.
Finetune the inputs to your preference.
Risk to Reward, Stoploss, Take Profit, position sizing, etc... is up to the user.
Recommended entry is to wait for following candle closes, entering half of the candle size and setting Stoploss outside the structure, like this:
Or right below the candles open, for safety.
Indicator

Indicator
