Gösterge

Alpha Forge Core v6.4.15Alpha Forge Core v6.4.15
Advanced trend, momentum, structure, trade-management, and webhook automation indicator.
This multi-layer decision-support tool is designed to help traders evaluate trend direction, momentum, market regime, price structure, entry conditions, and active trade management from one chart.
Rather than relying on a single crossover or isolated signal, the system combines several confirmation layers to assess whether conditions support a potential long or short setup.
It is intended for discretionary chart analysis, TradingView alerts, and compatible webhook-based automation.
What the indicator analyzes
The script evaluates:
Trend direction
Moving-average alignment
Momentum strength
Adaptive market regime
Higher-timeframe confirmation
Price structure
Breakout conditions
Pullback and reclaim behavior
Entry distance and price extension
Volatility
Signal quality
Active trade state
Protective stop placement
Profit-target progression
Breakeven protection
Trailing-stop protection
These components are combined into a single decision process rather than displayed as unrelated signals.
Automatic market detection
The system can detect the general symbol type using TradingView market information.
Supported categories include:
Stocks
ETFs
Crypto
Forex
Futures
Other supported symbols
When automatic behavior is enabled, the detected market can influence the effective operating configuration.
Crypto scalping behavior
When a crypto symbol is detected, the script can automatically apply its faster Crypto Scalping configuration.
This mode is designed for shorter-term crypto charts and removes higher-timeframe influence from the effective scoring process.
Recommended crypto timeframe:
5 minutes
Pine Script cannot automatically change the chart timeframe. When the current chart does not match the recommended timeframe, the Guide may display a reminder.
Operating presets
Scalping
Designed for shorter timeframes and faster-moving setups. This preset uses more responsive conditions and shorter trade-development windows.
Day
Designed for intraday trading with a balance between responsiveness and confirmation. This is the recommended starting point for many stock and ETF charts.
Swing
Designed for higher timeframes and slower-developing setups. This preset applies more selective confirmation and allows additional time for trades to develop.
Custom
Allows the available settings to be controlled manually.
Suggested starting points:
Stocks and ETFs: 15-minute chart with Day mode
Crypto: 5-minute chart with automatic Crypto Scalping
Short-term scalping: 3-minute to 5-minute charts
Swing trading: 30-minute to 4-hour charts
These are general starting points only. Settings should be evaluated on the intended symbol and timeframe.
Signal grades
Potential entries can be filtered by grade.
Available options include:
A Only
B Only
A and B
All Grades
A-grade setups represent stronger internal alignment.
B-grade setups may appear earlier or with fewer confirmation layers while still meeting the selected eligibility rules.
C-grade setups represent lower-confirmation conditions and are available when All Grades is selected.
Grades describe the amount of confirmation present at the time of the setup. They do not guarantee a particular outcome.
Entry behavior
The engine can identify several types of setup behavior.
Breakout entries
These occur when price moves through an important structure level with sufficient directional confirmation.
Impulse entries
These identify stronger directional expansion when momentum and price accelerate together.
Early reclaim entries
These occur when price briefly loses a key level and then reclaims it with confirmation.
Continuation entries
These identify opportunities within an established trend after a valid pullback or consolidation.
B-grade re-entry
When enabled, the system can permit a controlled re-entry after a valid pullback instead of repeatedly triggering during the same move.
Range and extension protection
The script includes filters intended to reduce weaker entries during unsuitable conditions.
These can include:
Blocking continuation setups in range conditions
Requiring trend-regime eligibility
Limiting entries when price is too far from its reference level
Avoiding repeated entries during an active trade
Waiting for candle-close confirmation
Requiring directional confirmation
These filters are designed to improve consistency, but they may also reduce signal frequency.
Higher-timeframe confirmation
Higher-timeframe alignment can be used as an additional confirmation layer.
The script supports both responsive and confirmed higher-timeframe behavior.
When higher-timeframe influence is disabled, scoring is normalized so that the missing HTF component does not unfairly reduce setup quality.
Trade lifecycle
The indicator tracks a complete trade state from entry through exit.
The lifecycle can include:
Entry confirmation
Protective stop placement
TP1
TP2
TP3
Breakeven activation
Trailing-stop activation
Stop-loss exit
Breakeven exit
Trailing-stop exit
Final target exit
Only one active position is tracked at a time. New entries are blocked until the current position is closed.
Protective stops
Stops can use a combination of structure and ATR-based distance.
Available controls may include:
ATR stop multiplier
Structure buffer
Maximum stop distance
Same-bar target and stop priority
Breakeven activation
Trailing-stop source
Trailing-stop distance
These settings should be matched to the symbol’s volatility and the trader’s risk plan.
Profit targets
The system supports three target levels:
TP1
TP2
TP3
Target progress is shown on the chart and in the dashboard.
Breakeven and trailing protection can be activated after a selected target is reached.
Forge Guide
The Guide has been rebuilt as a forward-looking coaching panel.
Instead of repeating dashboard information, it focuses on what matters next.
It can display:
What the system is waiting for
What to watch next
Whether a setup is armed
Trigger conditions
Invalidation conditions
Remaining setup window
Whether price is too extended
Current trade objective
Active protection
Target progression
Trailing-stop status
Typical Guide states include:
WAIT
WATCH LONG
WATCH SHORT
LONG NEAR READY
SHORT NEAR READY
STAND ASIDE
DO NOT CHASE
MANAGE LONG
MANAGE SHORT
PROTECT PROFIT
The Guide is intended to explain the current condition in plain language without replacing personal judgment.
Dashboard
The compact dashboard focuses on live decision information.
It may display:
Effective preset
Detected market
Trend
Adaptive regime
B eligibility
Momentum
Higher-timeframe state
Structure
Current decision
Active trade
Protection
Last exit
TP1, TP2, and TP3 status
Historical testing statistics and diagnostic counters are not shown in the public dashboard so the chart remains clean and easy to read.
Alerts and webhook automation
The script supports TradingView alerts and JSON webhook messages.
For long-only automation:
buy opens a long position
sell closes the long position
A sell action may be generated when the active long closes through:
TP3
Stop loss
Breakeven
Trailing stop
Another enabled long-exit condition
The JSON format includes fields for:
Secret token
Ticker
Asset type
Action
Price
Strategy
Timeframe
Order type
Stop loss
Take-profit levels
For webhook use:
Enter the secret token in the alert settings.
Enable bot JSON alerts.
Create one TradingView alert using Any alert() function call.
Enter the webhook URL supplied by the connected execution service.
Recreate alerts whenever the script or alert configuration is changed.
Existing alerts continue running the older saved script snapshot until they are recreated.
Important notes
This indicator is a chart-reading and decision-support tool.
It does not predict future price movement and does not guarantee profitable outcomes.
Historical chart behavior may differ from live execution because of:
Spread
Slippage
Liquidity
Latency
Broker rules
Order handling
Market gaps
Partial fills
Signals should be evaluated alongside personal risk management, position sizing, market conditions, and independent analysis. Gösterge

Reversal Confluence Sniper [JOAT]Reversal Confluence Sniper
Hunts exhaustion reversals by requiring several independent exhaustion signals to appear together, so it fades stretched moves with confirmation rather than hope.
What it is
Fading a trend is dangerous when done on a single cue. This indicator only flags a potential reversal when multiple, independent signs of exhaustion coincide at the same moment — turning a risky counter-trend guess into a confluence-gated setup. It is an original reversal engine, not a lone oscillator flip.
How it works
The engine looks for several exhaustion conditions and requires enough of them to align:
• Momentum extreme — an oscillator reaching and rolling over from an overextended level, showing the push is losing force.
• Volatility stretch — price extended a statistically large distance from a mean or band, marking an unsustainable move.
• Rejection candle — a wick or close that rejects the extreme, showing the aggressive side failed to hold new ground.
• Participation — a volume or effort read that flags climax or fade behaviour rather than steady continuation.
A Buy (bullish reversal) prints when enough downside-exhaustion factors align; a Sell when enough upside-exhaustion factors align. A minimum-gap control prevents repeated prints while a market chops around an extreme.
Trade levels
Each signal draws a red risk box to a stop placed beyond the exhaustion extreme and a green reward box to the third target, with inner dividers and right-edge labels for entry, stop and each take-profit at your R multiples. Placing the stop beyond the extreme respects the idea that if price makes a new extreme, the reversal thesis is wrong.
The dashboard
An adjustable sniper-scope panel shows which exhaustion factors are currently active, a combined conviction reading, the active signal, and a live first-target-before-stop tally from closed bars only, so you can see how much confluence backs each setup.
How to use it
• Works on any asset and timeframe.
• Most effective for timing entries at the end of a stretched move, ideally into a higher-timeframe level or zone.
• Because it fades momentum, pair it with structure or a level tool and keep stops disciplined — reversals that do not confirm should be cut quickly.
Settings
The exhaustion factor lengths and thresholds, the number of factors required to trigger, risk multiple and target R multiples, plus visual and dashboard controls.
Originality and usefulness
The contribution is the confluence gate itself: several independent exhaustion measures that must agree before a counter-trend signal is allowed, with a transparent readout of which factors fired and integrated, non-repainting trade framing. It is designed to make fading safer by demanding evidence, not to promise reversals.
Notes and limitations
• Counter-trend trading is inherently higher risk; strong trends can stay stretched far longer than expected and overrun any reversal signal.
• Requiring more factors reduces false signals but also reduces frequency — this trade-off is yours to set.
• The tally reflects only past bars on the current chart and is not a forecast.
• Educational and analytical tool, not financial advice.
— made with passion by officialjackofalltrades
Gösterge

Gösterge

CandelaCharts - MTF FVG Alignment📝 Overview
The CandelaCharts - MTF FVG Alignment indicator detects Fair Value Gaps (FVGs) across up to four customizable timeframes and visualises them directly on the chart. A Fair Value Gap is a three-candle pattern where price moved so rapidly that an unfilled area remains between the high of the first candle and the low of the third candle, representing a price imbalance the market often returns to fill.
The core strength of this indicator is Confluence . An alignment signal is generated only when every enabled timeframe shows FVGs in the same direction (all Bullish or all Bearish), giving traders a powerful multi-timeframe confirmation before taking a position.
📦 Features
Four-Timeframe Analysis : Track up to four independent timeframes simultaneously with per-TF toggle and FVG count.
Confluence Alignment : Automatic detection of Bullish or Bearish alignment across all enabled timeframes.
Bias Filter : Filter displayed FVGs to show only Bullish, only Bearish, or both (Neutral).
FVG Mitigation : FVGs are automatically invalidated and removed from the chart once they are fully filled by price action.
Hide Overlapped : Clean up chart clutter by automatically hiding lower-timeframe or older FVGs that overlap with others.
Fibonacci Levels : Optional Fibonacci retracement levels (0.236, 0.382, 0.5, 0.618, 0.65, 0.705, 0.786) drawn inside each FVG with a highlighted Golden Pocket zone (0.705–0.786).
FVG Visuals : Semi-transparent boxes showing active FVGs for each timeframe, with configurable borders and midlines.
Status Dashboard : A clean table showing the current directional status (Bullish / Bearish / None) for each enabled timeframe.
⚙️ Settings
Timeframes
TF 1–4: Each timeframe row has a toggle (show/hide), a timeframe selector, and an FVG count (1–10) controlling how many recent FVGs are displayed for that timeframe. Defaults are 1D, 4H, 1H, and 15m.
Settings
Bias Filter: Filter displayed FVGs by direction — Neutral (show all), Bullish (show only bullish FVGs), or Bearish (show only bearish FVGs).
Bull / Bear Colors: Customise the colours used for bullish and bearish FVG zones.
Border: Toggle the FVG box border and configure its style (Solid, Dotted, Dashed) and width (1–5).
Midline: Toggle the Consequent Encroachment midline inside each FVG and configure its style and width. When enabled, the timeframe label moves outside the box.
Fibonacci: Toggle the drawing of Fibonacci retracement levels inside each FVG, including the highlighted Golden Pocket (0.705–0.786).
Hide Overlapped: Toggle whether to hide overlapping FVGs across different timeframes to keep the chart clean (prioritising higher timeframes).
Dashboard
Show: Toggle the multi-timeframe status dashboard.
Position: Choose the dashboard corner — Top Right, Top Left, Bottom Right, or Bottom Left.
⚡️ Showcase
Multi-Timeframe FVG Boxes
Fibonacci Levels & Golden Pocket
Status Dashboard
🔎 Usage
Trend Identification : Glance at the dashboard to see the current bias of each higher timeframe at a glance.
Confluence : When all enabled timeframes align in the same direction, it provides strong multi-timeframe confluence for a directional trade.
Fibonacci Entries : Use the Fibonacci levels inside each FVG — particularly the Golden Pocket (0.705–0.786) — for precise entries when price retraces into the gap.
Bias Filtering : Set the Bias Filter to Bullish or Bearish to remove counter-trend FVGs and keep the chart focused on your directional thesis.
Execution : Use the alignment as confirmation for your existing strategy. Bullish alignment suggests upward momentum; Bearish alignment suggests downward momentum.
⚠️ Disclaimer
Trading involves significant risk, and many participants may incur losses. The content on this site is not intended as financial advice and should not be interpreted as such. Decisions to buy, sell, hold, or trade securities, commodities, or other financial instruments carry inherent risks and are best made with guidance from qualified financial professionals. Past performance is not indicative of future results.
Gösterge

Devtrader - Chart Analysis# Devtrader – Chart Analysis
**Devtrader – Chart Analysis** is a multi-layer market-context indicator built to help discretionary traders read liquidity, market structure, session timing, higher-timeframe context, and fair value gaps from one chart.
The indicator follows a narrative-based workflow:
**liquidity location → raid or sweep → reclaim → structure confirmation → continuation or invalidation**
It is designed as an analysis and decision-support tool. It does not place orders, manage positions, promise future price direction, or generate automatic buy and sell signals.
## Main features
- **Liquidity map:** identifies and ranks buy-side liquidity (BSL) and sell-side liquidity (SSL) from confirmed swings, session levels, previous-period levels, and optional higher-timeframe levels.
- **Sweep engine:** evaluates liquidity raids using penetration, reclaim, rejection efficiency, sweep depth, volume, session context, and level quality filters.
- **Market structure:** displays confirmed swing points, Change of Character (CHoCH), Break of Structure (BOS), protected levels, and Inducement (IDM) events.
- **Session context:** tracks Asia, London, and New York windows, with optional developing session highs and lows.
- **Higher-timeframe context:** combines two configurable higher timeframes to provide directional context and inject confirmed HTF liquidity into the active chart.
- **Important market levels:** optionally displays the previous day, week, and month highs/lows, previous close, daily open, and New York midnight open.
- **Fair Value Gaps:** detects bullish and bearish FVGs on the chart timeframe or a configurable higher timeframe, tracks mitigation, and supports static or dynamic rendering.
- **Adaptive rendering:** offers full, compact, and right-side-only level layouts, together with label-clutter controls for cleaner charts.
- **Trader Dashboard:** summarizes current bias, nearby liquidity, the active event, structure state, session timing, and a plain-language contextual read.
## Understanding the dashboard
- **Bias** combines higher-timeframe context, current structure, and protected-level integrity.
- **Liquidity** highlights the most relevant BSL and SSL currently surrounding price.
- **Event** reports the active narrative, such as a pending raid, confirmed sweep, CHoCH, BOS, breakout, or failed reclaim.
- **Structure** describes the current market-structure condition and confirmation stage.
- **Timing** shows the active session context and whether a long or short narrative is being monitored.
- **Read** translates the current conditions into a scenario to monitor. It is contextual guidance, not an entry instruction.
## Suggested workflow
1. Start with the **Bias** and **Structure** rows to understand the broader directional context.
2. Use the liquidity map to identify the BSL or SSL that price may interact with next.
3. Wait for the sweep engine to distinguish a qualified reclaim from a simple breakout or failed rejection.
4. Look for post-sweep confirmation through an internal shift, CHoCH, BOS, or damage to the opposing protected level.
5. Use FVGs, session timing, and important market levels as additional confluence for your own execution and risk plan.
No single label should be used in isolation. A sweep is an event, not automatically a trade, and a directional dashboard read is not a guarantee that price will continue in that direction.
## Key settings
- Use **External Liquidity Only** for a stricter view focused on major, session, and HTF liquidity. Disable it to include more internal structure.
- Choose **Aggressive**, **Balanced**, or **Conservative** market-structure confirmation according to the amount of confirmation you want.
- Adjust the reclaim, rejection, penetration, depth, volume, and timeout controls to suit the instrument and timeframe.
- Configure the session times for the exchange, instrument, and timezone you trade.
- Use the rendering and clutter settings to control how much historical and right-side chart information is displayed.
## Alerts
The script provides alert conditions for:
- confirmed liquidity sweeps;
- market-structure confirmation after an active sweep;
- new bullish and bearish FVGs;
- bullish and bearish FVG mitigation.
For stable alert behavior, consider configuring alerts **Once Per Bar Close**.
## Important behavior
Market-structure swings are based on confirmed pivots. They are plotted on the historical pivot bar only after the required right-side bars have completed, so they intentionally appear with a confirmation delay. Higher-timeframe context uses previous confirmed candles and confirmed pivots without future lookahead. Developing levels, FVGs, and conditions evaluated on the current real-time candle can still change before their source candle closes.
Results will vary by market, timeframe, session configuration, liquidity, and volatility. Users should validate their settings and interpretation through replay, forward observation, and independent testing.
## Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. Trading involves substantial risk, and past market behavior does not guarantee future results. You are solely responsible for your trading decisions and risk management.
Gösterge

Uptrick: Vector Trail TrendIntroduction
Uptrick: Vector Trail Trend (VTT) is an overlay tool that combines a velocity-projected trend line with an ATR-based adaptive trailing band to identify directional bias and trend reversals. A secondary momentum module layered on top flags statistically extreme momentum conditions that traders can use as dynamic take-profit references within the prevailing trend. The script also includes a configurable overlay presentation and an on-chart dashboard summarizing current trend state.
Originality
This script combines three distinct calculation layers that are not typically merged in a single publication, and each is included for a specific reason.
The first layer builds a trend center from a smoothed moving average of price, then projects that line forward using a smoothed rate of change of the trend center itself, scaled by a user-defined projection factor. This produces a trend reference that leans in the direction of recent acceleration rather than simply lagging price, which is the basis used for the trailing band below it.
The second layer wraps that projected trend center in an ATR-based band that only trails in the favorable direction and resets on a confirmed close beyond the opposite band, similar in mechanism to a ratcheting stop line. This layer is responsible for the directional flips and the up and down signals plotted on the chart.
The third layer is independent of the first two and evaluates RSI relative to its own rolling mean and standard deviation, expressed as a Z-score. This is used to flag when momentum has reached a statistically extreme reading relative to its recent history, which the script surfaces as separate dynamic take-profit markers. This layer exists because trend direction and momentum exhaustion are different pieces of information, and combining them gives traders both a directional read and a separate overextension read without conflating the two into a single signal.
The overlay is user-selectable between a gradient fill between price and the trail, a dual EMA trend ribbon, both together, or neither, so the visual presentation can be adjusted without changing the underlying trend or TP logic.
Features
Velocity-projected trend center using a smoothed moving average and a smoothed rate of change projection
ATR-based adaptive trailing band with directional flip logic
Confirmed-bar trend state calculation to avoid intrabar repainting of the trend flip
Dynamic take-profit engine based on a Z-score of RSI relative to its own rolling mean and standard deviation
Selectable TP marker style, cross or circle
Up and down trend signal labels plotted at the trail
Selectable overlay mode: vector gradient fill, trend ribbon, both, or none
Adjustable gradient and ribbon transparency
Optional candle coloring based on active trend direction
Adjustable trail line width
On-chart dashboard showing trend, signal, Z-score, TP state, distance from trail in ATR units, and active overlay mode
Nine selectable dashboard positions
Seven alert conditions: up signal, down signal, long dynamic TP, short dynamic TP, any trend signal, any dynamic TP, and all VTT signals combined
Inputs
Trend Settings: source, trend length, velocity smoothing length, vector projection factor.
Trail Settings: ATR length, ATR multiplier.
Dynamic TP Settings: show/hide dynamic TPs, TP marker style, momentum (RSI) length, Z-score length, TP extreme level threshold.
Overlay: overlay style selection, gradient transparency, ribbon fast length, ribbon slow length, ribbon transparency.
Visuals: show/hide up and down signals, candle coloring toggle, trail width.
Dashboard: show/hide dashboard, dashboard position.
How It Works / How to Use
The trend center is calculated from a moving average of the chosen source, then projected forward using a smoothed measure of its own rate of change. An ATR-based band is built around this projected line and only moves in the direction favorable to the current trend, flipping only on a confirmed close beyond the opposite band. This flip is what produces the up and down signals and the trend color change.
Once a trend is established, the script tracks RSI relative to its own recent mean and standard deviation. When this Z-score reaches the user-defined extreme level and then crosses back toward normal, a dynamic take-profit marker is plotted for the active trend, using the opposite color for visual distinction, indicating that momentum has cooled from an extreme reading.
Traders can use the trail flips for directional bias and entries, and the dynamic TP markers as a secondary reference for potential exhaustion points within that trend. The overlay mode, transparency, candle coloring, and dashboard are all cosmetic and can be adjusted without affecting the underlying calculations.
Conclusion
Uptrick: Vector Trail Trend combines a velocity-projected trend line, an adaptive ATR trailing band, and a momentum Z-score take-profit layer into a single overlay tool, giving traders both a directional trend read and a separate momentum-exhaustion reference from one indicator.
Disclaimer
This script is provided for informational and educational purposes only and does not constitute financial advice. Past performance, whether shown historically or implied through the script's logic, does not guarantee future results. Always perform your own due diligence and risk management before making trading decisions.
Gösterge

KC Sessions PRO [Asia, London & New York High/Low]Description
KC Sessions PRO is a clean session-structure indicator designed to display the active trading ranges of the Asia, London, and New York sessions.
The indicator tracks each enabled session’s developing high and low and presents the information using lightweight session boxes, high/low lines, compact labels, and a dashboard. Its main objective is to provide session context while keeping the chart readable and reducing unnecessary historical clutter.
HOW IT WORKS
During an active session, the script continuously updates that session’s high and low.
When the session closes, its completed range can either be removed or retained temporarily, depending on the selected display mode.
DISPLAY MODES
• Clean — Displays active sessions only and removes completed session objects.
• Standard — Displays active sessions and retains limited recent session history.
• Pro — Displays active sessions with additional completed-session context.
MAIN FEATURES
• Asia, London, and New York session tracking
• Developing session high and low
• Optional session range boxes
• Solid session-high lines
• Dashed session-low lines
• Compact A, L, and NY labels
• Clean, Standard, and Pro display modes
• Automatic removal of older chart objects
• Adjustable completed-level extension
• Configurable session time zone and hours
• Compact active-session dashboard
• Session open and close alert conditions
DASHBOARD
The dashboard displays:
• Current active session
• Active session high
• Active session low
• Selected display mode
• Timeframe suitability status
DEFAULT SESSION HOURS
The default hours use the selected time zone:
• Asia: 00:00–08:00
• London: 08:00–16:00
• New York: 13:00–21:00
Users should adjust these hours and the time zone where necessary for their instrument, broker, location, and daylight-saving requirements.
RECOMMENDED USE
This indicator is most useful on intraday charts, particularly:
• 1-minute
• 5-minute
• 15-minute
• 30-minute
• 1-hour
• 4-hour
PRACTICAL APPLICATIONS
KC Sessions PRO may be used to study:
• Session range expansion
• Intraday support and resistance
• Breaks of session highs or lows
• Volatility changes between trading sessions
• London and New York overlap
• Session-based market structure
• Intraday liquidity context
IMPORTANT LIMITATIONS
• Session times depend on the selected time zone and user-defined session hours.
• Different brokers and instruments may use different trading-day structures.
• The displayed session high and low continue developing until the session closes.
• Session levels should not be treated as automatic trade-entry signals.
• The script does not predict future price direction or guarantee trading outcomes.
This indicator is intended for educational and informational analysis only. It is not financial advice, a trading recommendation, or a guarantee of performance. Users should conduct their own analysis and apply appropriate risk management.
Short Description:
A clean intraday indicator that tracks Asia, London, and New York session ranges, developing highs/lows, limited session history, and active-session context.
Release Notes
INITIAL RELEASE — VERSION 2.1
• Added Asia, London, and New York session tracking
• Added developing session highs and lows
• Added Clean, Standard, and Pro display modes
• Added session boxes and compact session labels
• Added automatic historical-object cleanup
• Added active-session dashboard
• Added configurable timezone and session hours
• Added session open and close alert conditions
• Optimized default settings for a cleaner chart
Gösterge

RSI Divergence + EMA Trend FilterDescription:
Divergence is one of the most discussed concepts in technical analysis and one of the most misapplied. The core idea is simple: when price makes a new high but the RSI makes a lower high, momentum is weakening even as price advances. That disconnect between price action and momentum is what divergence measures — and it often precedes reversals before price itself confirms the change in direction.
This strategy formalizes that concept into a rule-based, backtestable system with two components: RSI divergence detection and an EMA trend filter that determines which divergences to act on.
What divergence actually measures
RSI measures the speed and magnitude of price changes. When price reaches a new swing high but RSI fails to reach a correspondingly higher reading, it means the buying pressure behind the new high was weaker than the buying pressure behind the previous high. The market got to a higher price but required less momentum to do it — which suggests the move is losing conviction. Bearish divergence (price higher, RSI lower) signals potential exhaustion in an uptrend. Bullish divergence (price lower, RSI higher) signals potential exhaustion in a downtrend.
Important: divergence is a momentum signal, not a reversal guarantee. Price can continue making new highs with weakening RSI for a significant period before actually reversing. This is why divergence signals work best when combined with a trend filter that identifies the broader market context.
The EMA filter
The 200 EMA defines the dominant trend regime. Bearish divergence signals — where momentum is weakening on the upside — are only acted on when price is below the 200 EMA, meaning the broader trend is already bearish and divergence represents a potential resumption of that trend after a counter-trend bounce. Bullish divergence signals are only acted on when price is above the 200 EMA, where they represent potential continuations of the dominant uptrend after a pullback with improving momentum.
This filter deliberately reduces the total number of signals. Many valid divergences occur against the dominant trend and produce short-lived reversals that reverse again quickly. By requiring trend alignment, the strategy trades fewer setups but acts on the ones with a higher probability of following through.
How divergence is detected
The strategy identifies swing highs and swing lows using a lookback period — the number of bars on each side of a pivot that must be lower (for a high) or higher (for a low) to qualify as a genuine swing point. When two consecutive swing highs show price making a higher high but RSI making a lower high, bearish divergence is flagged. When two consecutive swing lows show price making a lower low but RSI making a higher low, bullish divergence is flagged.
The lookback length is the most important input to tune. A shorter lookback detects more swing points and generates more signals, but many will be minor pivots in the context of noise. A longer lookback requires more significant swing points and generates fewer, higher-quality signals. On daily charts, a lookback of 5 works well. On lower timeframes, 3 to 4 is more appropriate.
Exits
Positions exit at an ATR-based stop-loss and a fixed ATR-based take-profit. The stop is placed beyond the swing point that generated the divergence signal — for a bearish divergence, the stop sits above the swing high; for a bullish divergence, below the swing low. This is intentional: if price breaks through the very level that defined the divergence, the signal is invalidated regardless of what RSI was doing. The take-profit is set at 2x ATR to maintain a positive reward-to-risk ratio across the system.
What to evaluate in backtesting
Look at the signal distribution across different market environments. Divergence strategies tend to perform differently in trending versus ranging markets — in strong trending environments, bearish divergences against the dominant trend will produce many false signals even with the EMA filter. Look at whether the EMA filter is doing real work by temporarily disabling it and comparing signal quality. Check average trade duration — divergence signals that take too long to play out often give back open profit before the take-profit level is reached.
This is not a high-frequency strategy. On daily charts with a 5-bar lookback, signals may appear only a few times per month on a given instrument. That frequency is appropriate — divergence setups require specific conditions to form and should not be forced.
Shared for educational purposes and discussion. This is not investment advice. Backtest on your own instruments and timeframes before drawing conclusions about expected performance. Strateji

Intrabar Volume Profile [Order Flow]A volume profile answers one question: at which prices did the volume actually trade? The answer depends entirely on how you distribute each bar's volume across price. Intrabar Volume Profile does it by reading the lower-timeframe intrabars inside every chart bar and placing each intrabar's volume across its own high-low range — so a peak forms at the prices where the volume actually traded, and the Point of Control lands where trading concentrated. It also estimates the buy/sell split from intrabar direction, tells you on the chart that it is an estimate, and hides it when the resolution is too low to mean anything. It is an observation tool, not a signal service.
HOW IT WORKS
A chart bar only gives you one volume number for a whole price range. To place that volume at prices, you have to know where inside the bar it traded — and that is what the lower timeframe provides. The tool requests the intrabars of each chart bar and works from them.
Intrabar distribution — each intrabar's volume is spread across its own high-low range, proportionally to how much of each profile row that range covers. A 5-minute bar that only moved between 108 and 110 puts its volume at 108-110, not across the whole bar range. Rows are tick-aligned: the row height is a number of the symbol's minimum price ticks, and the row count follows the price range.
Buy/sell estimate — the intrabars this tool reads carry price and volume, but no bid/ask, so a true buy/sell split cannot be built from them. What can be done is an estimate: an intrabar that closes above its open counts to the buy side, below its open to the sell side. An intrabar that closes exactly at its open is neutral and is never forced onto a side.
Resolution gate — the estimate only carries information if there are enough intrabars per bar. Below roughly four intrabars per bar the split collapses toward simply restating the candle's direction, so the tool stops colouring by side, falls back to total volume, and says so on the chart.
Point of Control and Value Area — the POC is the row with the most total volume. The Value Area expands outward from the POC until it covers your chosen share of the range's volume (default 70%), giving VAH and VAL. Both are computed on total volume, so they stay valid whether or not the split is shown.
Display modes — Buy/Sell colours each row by its dominant side (length stays total volume). Total draws plain volume by price with no buy/sell claim at all. Delta draws the net buy-minus-sell imbalance. Optional shading makes strongly one-sided rows more saturated.
The profile is drawn in the right margin, to the right of the last bar and growing left, so it does not sit on top of the candles.
When the tool hits a limit, it says so instead of quietly degrading. A single factual line appears when — and only when — something applies: the split is unavailable at this resolution, the volume is tick volume, the range was capped by the lower-timeframe budget (with how many bars are actually covered), the row size was raised to fit a wide range, or there is no usable volume data. When nothing applies, there is no note on your chart.
The intrabars of each chart bar in the range are requested from a lower timeframe
Every intrabar's volume is distributed across the rows its own high-low range covers; direction (close vs open) assigns it to the buy or sell side, with doji intrabars left neutral
Rows, POC and Value Area are drawn from the accumulated totals; anything the tool cannot do at this resolution or data quality is stated on the chart rather than approximated silently
HOW TO READ
Long rows are prices that absorbed a lot of volume; short rows are prices the market passed through. The Point of Control is the single price row that traded the most.
The Value Area marks where the bulk of the volume changed hands — a common reference for the range the market accepted versus the edges it rejected.
Colour in Buy/Sell mode shows which side the estimate leans at that price, and the shading shows how one-sided it is. It describes what the intrabars did — it is not a forecast and not a buy or sell instruction.
Delta mode shows only the net imbalance per row, so balanced prices shrink toward nothing and one-sided prices stand out.
If you want no estimate at all in the picture, use Total mode: it is plain volume by price and makes no claim about who was buying.
The profile describes the data in the range you are looking at. In Visible Range mode it recomputes as you scroll or zoom; use Fixed Lookback if you want it pinned to the last N bars regardless of the view.
INPUTS
Range mode / Lookback bars — Visible Range follows what you are viewing; Fixed Lookback holds the last N bars.
Lower timeframe (Auto / Manual) — Auto picks a lower timeframe from the chart timeframe; Manual lets you set it. More intrabars per bar means a finer distribution and a more meaningful split.
Ticks per row — the row height, in the symbol's minimum price ticks. The row count follows the range; if the range is too wide for the chosen row size, the size is raised to fit and the chart says so.
Bar mode — Buy/Sell, Total, or Delta.
Value Area % / Show POC / Show VAH-VAL — the Value Area share and which levels to draw.
Profile width (% of chart) / Gap from price — the size of the profile and its distance from the last candle; reduce the width if it runs off the right edge.
Colours / Shade by imbalance strength — buy, sell, neutral, POC and Value Area colours; shading scales saturation with how one-sided a row is.
NOTES & LIMITS
This is an observation tool, not a forecast. The buy/sell split is an estimate derived from intrabar direction, not exchange bid/ask: the lower-timeframe intrabars this tool reads carry price and volume, not bid/ask, so a true split cannot be built from them; the tool says this on the chart when the split is shown, drops it when the resolution is too low to be meaningful, and leaves doji intrabars neutral rather than guessing a side. Everything rests on the volume feed underneath it: on instruments with genuine traded volume (futures, crypto) it is at its most reliable, while on forex and CFDs the volume is tick volume (the number of price updates, not contracts traded), so the readings there are looser — the chart tells you when that is the case. On a symbol with no usable volume, nothing is drawn and the reason is stated. The range depends on how far the lower-timeframe data reaches: if the requested range cannot be covered, it is not quietly shortened — the chart reports how many bars are actually included. POC, Value Area and row colour are a factual summary of what traded, not buy or sell instructions, and none of them says whether price will turn or continue. The profile describes the range you are viewing: in Visible Range mode it recomputes when you scroll or zoom, which is how a visible-range tool works; Fixed Lookback keeps it on the last N bars. Contributions from closed bars do not change once the range is set, the profile is drawn at the latest bar, and the lower-timeframe request reads completed intrabars and does not leak the future. No profit, win-rate, or guarantee claim. Open-source under CC BY-NC-SA 4.0 — non-commercial use, attribution to ElisTools required for reuse or derivatives. TradingView (Pine v6) only. Gösterge

Session Kill Zone Volume Map [StrixEDGE]Session Kill Zone Volume Map
A session-aware overlay that maps institutional kill zones — London, New York, and Asia — directly onto your chart with volume-weighted session boxes, Opening Range Breakout levels, and a unified analytics dashboard. Built to give intraday traders immediate visual context on where volume clusters, how sessions develop relative to their historical norms, and when a confirmed breakout is underway.
🔍 What This Indicator Does
The indicator automatically detects the three major forex/futures sessions based on UTC time and draws color-coded session boxes whose fill intensity scales dynamically with real-time volume. High-volume sessions appear visually heavier; low-volume sessions fade into the background. This gives you an instant read on whether today's session is running hotter or cooler than average — without checking a single number.
On top of each session, it tracks the Opening Range (first 15, 30, or 60 minutes) and plots ORB-High and ORB-Low levels as dashed reference lines extending through the session. When price breaks an ORB level with volume confirmation, a directional marker (▲ or ▼) prints on the chart and an alert fires.
▲
▼
A single unified dashboard panel consolidates everything: live session volume, percentage distribution with a visual bar, historical average range, ORB win rate, and session sample count — all in one clean table.
⚡ Key Features
Session Auto-Detection
London (08:00–17:00 UTC)
New York (13:00–22:00 UTC)
Asia (00:00–09:00 UTC)
are detected automatically. All session start and end times are fully customizable down to the minute, so you can adjust for DST shifts or align to your broker's server time.
Volume-Weighted Session Boxes
Each session box fills with the session's assigned color at a transparency that adjusts in real time based on cumulative volume relative to the historical session average. A session running at 2× its normal volume will render noticeably more vivid than one at 0.5×. The base transparency is user-controlled.
Opening Range Breakout (ORB) Levels
The indicator captures the high and low of the first N minutes of each session (configurable: 15 / 30 / 60 min) and draws them as horizontal reference lines. These extend through the rest of the session, serving as the breakout thresholds traders watch for directional continuation.
Volume-Confirmed Breakout Signals
When price closes beyond an ORB level and the breakout bar's volume exceeds the 20-period SMA × a user-defined multiplier (default 1.5×), a directional triangle prints on the chart. No volume confirmation = no signal. This filters out low-conviction breaks.
Unified Session Dashboard
A single professional table displays all session data at a glance:
- Live session volume (absolute + percentage share)
- Volume distribution bar per session
- Historical average session range over your chosen lookback
- ORB win rate (percentage of confirmed breakouts that held direction through session close)
- Session sample count
Table position, text size, and visibility are all input-controlled.
Session High/Low Break Alerts
Separate alert conditions fire when price crosses the previous session's high or low with volume confirmation, giving you an additional layer of inter-session breakout detection.
9 Alert Conditions
Individual bull/bear ORB break alerts per session, a unified "any ORB break" alert, and session high/low break alerts — all configurable in TradingView's alert manager.
⚙️ Inputs & Settings
| Group | Setting | Description |
|---|---|---|
| Session Times | Start/End Hour & Minute | Full control over each session's UTC boundaries |
| ORB Settings | Period (15/30/60 min) | Opening range duration |
| ORB Settings | Line Style / Width | Visual style of ORB levels |
| Display | Show/Hide Sessions | Toggle individual session boxes |
| Display | Base Box Transparency | Controls how transparent session boxes are at normal volume |
| Display | Dashboard Position | Table corner placement |
| Display | Dashboard Text Size | Tiny / Small / Normal / Large |
| Display | Stats Lookback | Number of past sessions for avg range and ORB win rate |
| Alerts | Volume Confirm Multiplier | How far above SMA(20) breakout volume must be |
| Colors | Session & Breakout Colors | Full color customization per session and direction |
📖 How To Use
Session Context
Load on a 5m–1H chart. The session boxes immediately frame where London, New York, and Asia operated. The fill intensity tells you which session carried the most conviction — use that to weight your analysis toward the active kill zone.
ORB Strategy
After the opening range completes, the ORB-H and ORB-L lines become your breakout thresholds. A volume-confirmed break (▲/▼ marker) signals directional intent. Traders often look for price to retest the broken ORB level as support/resistance before committing to a continuation trade.
▲
▼
Dashboard Read
Check the Vol % column to see which session is dominating flow. The ORB WR column tells you how reliable ORB breakouts have been historically for each session on the current instrument — if London shows 85% and Asia shows 50%, that's actionable edge for session selection.
Alerts
Set up any of the 9 alert conditions to get notified without watching the chart. Combine the unified "Any ORB Break" alert with a mobile notification for hands-free monitoring.
📋 Notes
- Designed for intraday timeframes (15m and below recommended for ORB accuracy). A warning displays if loaded on Daily or higher.
- During the London/NY overlap window (13:00–17:00 UTC by default), volume is attributed to both sessions. The percentage distribution shows relative contribution, not mutually exclusive slices.
- ORB win rate is a binary metric: did price close beyond the broken ORB level at session end? It does not measure how far price traveled.
- The volume gradient uses transparency modulation, not a multi-stop color gradient, due to Pine Script rendering constraints.
- Works on any instrument with volume data (forex via tick volume, futures, crypto, equities). Gösterge

Buyers/Sellers Trapped V2This spots the bar where price spikes hard one way, then reverses and closes back against the spike. Whoever chased the move is trapped, and price usually keeps going the way it reversed.
I first published a version of this in 2017. This is the rebuild.
On the chart
*ST (green, up arrow): sellers trapped after a down spike. Bullish continuation cue.
*BT (red, down arrow): buyers trapped after an up spike. Bearish continuation cue.
*Trend filter (EMA + slope) highlights signals that line up with the trend and fades or hides the rest. The trend-aligned ones are the setups that matter.
*ATR-buffered stop just beyond the spike, so invalidation isn't sitting on the wick.
*Exit marker when the trend flips (price closes back through the MA) or the stop gives out.
How I use it
*Trade it with the trend, not against it. A trap in the direction of an established trend is a continuation entry, or a spot to add to a position you already hold.
*Stop goes an ATR beyond the spike.
Don't cap it with a tight target. The spike makes the stop wide, so a small fixed target pays you badly for the risk. Let it run and exit on the trend flip. In my own testing across crypto, riding to the trend flip beat every fixed target, and the long side carried most of the edge.
*Strongest in trending markets, noisy in chop, so lean on the trend filter. Alerts are built in for the entries, the trend-aligned entries, and the exit.
Free to use, feedback welcome.
Cheers,
Ivan Labrie. Gösterge

Ichimoku Cloud Thickness SpectrumOverview
Ichimoku Cloud Thickness Spectrum is an overlay for studying the geometry and relative thickness of the projected Ichimoku cloud. It plots the classical Tenkan-sen, Kijun-sen, Senkou Span A, Senkou Span B, and an optional Chikou Span, then adds a configurable research layer derived only from the distance and relationship between the two Senkou spans.
The script is designed to make three questions easier to inspect:
- How wide is the projected cloud in a unit suited to the current instrument?
- How unusual is that width compared with the cloud's own recent history?
- Is the smoothed cloud thickness expanding, contracting, or comparatively stable?
This is a context and visualization tool. It does not generate buy or sell instructions, forecasts, targets, stops, position sizing, or performance claims.
Original contribution
Cloud thickness is a known Ichimoku concept. The original contribution of this implementation is the integrated workflow used to transform raw Span A/B distance into a configurable research display:
1. Selectable ATR, percentage, or raw-price normalization.
2. Rolling empirical percentile ranking of the selected thickness measure.
3. Percentile-weighted cloud opacity and an optional dense inner core.
4. A stabilized expansion/contraction spine with a near-zero denominator floor and release-ratio hysteresis.
5. Confirmed thin-cloud seams filtered by thin-state membership, two-sided prominence, and minimum spacing.
6. Directional projected-cloud twist markers.
7. Separate handling of the newly calculated forward cloud and the historically shifted cloud aligned with the current price bar.
8. A bilingual confirmed/live readout, confirmed-bar alerts, and Data Window diagnostics.
The classical Ichimoku formulas are standard, widely known calculations. The percentile, motion-state, seam-filtering, visualization, readout, and alert logic were implemented for this script. No source code from another Community Script is reused.
Core calculations
- Tenkan-sen: midpoint of the highest high and lowest low over the Conversion length.
- Kijun-sen: midpoint of the highest high and lowest low over the Base length.
- Senkou Span A: average of Tenkan-sen and Kijun-sen.
- Senkou Span B: midpoint of the highest high and lowest low over the Span B length.
- Raw cloud thickness: absolute distance between Senkou Span A and Senkou Span B.
- Cloud midpoint: average of Senkou Span A and Senkou Span B.
Thickness modes and percentile ranking
- ATR: raw cloud thickness divided by ATR. This is the default and relates cloud width to recent price range.
- Percent: raw cloud thickness divided by the absolute close, multiplied by 100.
- Raw: the unnormalized price distance between Span A and Span B.
The selected measure is ranked against its own rolling history with a percent-rank calculation. A reading near 10 is relatively thin within the selected lookback, while a reading near 90 is relatively thick. The result is specific to the symbol, timeframe, settings, and available history; it is not a universal market-strength score.
Stabilized expansion and contraction
The selected thickness measure is smoothed with an EMA. A one-bar percentage change is then calculated. Near a cloud twist, Span A and Span B can converge and the previous thickness can approach zero, which can make an unrestricted percentage change unstable. To reduce this effect, the denominator cannot fall below a configurable fraction of a slower EMA baseline.
The state classifier also uses release-ratio hysteresis. Entry into expansion or contraction requires the main sensitivity threshold, while release from an existing state uses a smaller configurable threshold. This reduces bar-to-bar color chatter. The state uses the previous bar and does not rely on intrabar-only persistent memory.
Visual interpretation
- Teal cloud: Senkou Span A is at or above Senkou Span B.
- Red cloud: Senkou Span A is below Senkou Span B.
- More transparent cloud: lower thickness percentile.
- More visible cloud: higher thickness percentile.
- Dense inner core: optional emphasis when thickness percentile is above the selected threshold.
- Blue midpoint spine: thickness is in an expanding state.
- Purple midpoint spine: thickness is in a contracting state.
- Gray midpoint spine: thickness motion is inside the release threshold.
- Yellow upward/downward triangle: confirmed bullish/bearish projected-cloud twist.
- Small pink X: confirmed local thin-cloud seam that passed the thin-state, prominence, and spacing filters.
The cloud opacity and inner core encode relative thickness only. They do not guarantee support, resistance, continuation, reversal, or breakout behavior.
Filtered thin-cloud seams
A thin seam is not every low-thickness bar. It must be a confirmed local minimum in the thickness percentile, remain at or below the user-defined thin threshold, rebound by at least the selected prominence on both sides, and pass the minimum-spacing filter.
The pivot becomes known only after the selected number of right-side bars has closed. By default, a marker is not placed to the left of the bar where confirmation became available. The optional Allow seam placement before confirmation setting can place the marker at the original pivot-projected cloud position after confirmation. This changes the visual location only and does not make the event available earlier.
Projected cloud versus current aligned cloud
The newly calculated Span A and Span B values are displayed forward by the selected displacement. This positive offset shifts calculations made from current and historical bars into future chart positions; it does not access future market data.
Price-context calculations use a different alignment. They reference the historically shifted spans that are actually visible at the current price bar. Optional inside-cloud highlighting and current-cloud transition alerts therefore do not compare current price with the newly calculated cloud plotted in the future.
Forward readout, alerts, and research outputs
The three-line readout displays the thickness state and percentile, the selected normalized thickness value and motion state, and the future-cloud direction with Live or Confirmed status. English is the default. Japanese changes the readout, hover tooltip, and combined dynamic alert messages; input names and tooltips are bilingual.
Use confirmed values in readout is enabled by default. While the latest realtime bar is open, the label uses the previous closed bar. Once the latest bar is confirmed, it uses that bar. Users can disable the setting to inspect the open realtime bar, in which case the label shows Live and may change until close.
Confirmed-bar alert conditions are available for projected twists, thin/thick state transitions, current-cloud position transitions, expansion/contraction changes, and filtered thin seams. A combined bilingual alert is also available through Any alert() function call. Additional raw, normalized, percentile, motion, seam, current-cloud, direction, and state values are provided in the Data Window.
Realtime behavior and limitations
The script does not use request.security(), lookahead, or future bars. On an open realtime bar, Tenkan-sen, Kijun-sen, the projected spans, cloud opacity, and motion state can update as the bar's high, low, and close change. Confirmed historical values do not use intrabar-only memory. The supplied alert conditions are evaluated on confirmed bars, and the combined alert() call uses once-per-bar-close frequency.
Percentile readings require sufficient history and can show a warming-up state. Results depend on the symbol, timeframe, Ichimoku lengths, normalization basis, percentile lookback, and available data. Non-time-based charts and sparse datasets may behave differently from standard time-based candles.
A thick cloud is not automatically strong support or resistance. A thin or contracting cloud is not a breakout prediction. This script provides research context and should be combined with the user's own analysis and risk process.
日本語概要
Ichimoku Cloud Thickness Spectrumは、一目均衡表の将来雲について、方向だけでなく、厚み、履歴内の相対順位、拡大・収縮状態を研究するためのオーバーレイ型インジケーターです。転換線、基準線、先行スパン1・2、任意の遅行スパンを表示し、追加分析はすべて先行スパン1と2の距離および関係から算出します。
主な特徴
- 雲の厚みをATR比率、価格比率、価格差から選択可能。
- 選択した厚みを直近履歴内のパーセンタイルへ変換。
- 厚み順位を雲の透明度と任意の高密度インナーコアへ反映。
- ゼロ近傍の分母下限とヒステリシスを備えた拡大・収縮中心線。
- 薄い状態、左右プロミネンス、最小間隔を満たした確認済み局所薄化点。
- 上向き・下向きを分けた確認済み将来雲ツイスト。
- 将来へ描画する新規計算雲と、現在価格バーへ整列した過去計算雲を分離。
- 英語・日本語を切り替えられる将来ラベル、確定足アラート、データウィンドウ研究値。
雲の厚みという概念自体は既知です。本実装の差異は、生の雲幅を正規化し、履歴順位化し、厚みの動きを安定化し、薄化点を確認・選別し、それらを一貫した視覚表現と研究出力へ統合している点です。標準一目均衡表の計算式は広く知られた古典計算であり、追加した順位化、状態判定、薄化点フィルター、表示、ラベル、アラートのロジックは本スクリプト用に実装しています。他のCommunity Scriptのソースコードは再利用していません。
表示の読み方
- 青緑の雲: 先行スパン1が先行スパン2以上。
- 赤の雲: 先行スパン1が先行スパン2未満。
- 透明度が高い雲: 厚み順位が低い。
- 濃い雲とインナーコア: 厚み順位が高い。
- 青の中心線: 厚みが拡大状態。
- 紫の中心線: 厚みが収縮状態。
- 灰色の中心線: 安定状態。
- 黄色の三角: 確認済みの上向き・下向き将来雲ツイスト。
- 小さなピンクのX: 条件を満たした確認済み局所薄化点。
厚み順位は銘柄、時間足、設定、参照期間、利用可能な履歴に依存する相対値です。雲の濃さやインナーコアは支持抵抗の保証ではありません。
確認、シフト、ライブ動作
将来雲は、現在および過去バーから計算した先行スパンを正のoffsetで将来位置へ描画したもので、未来データを取得していません。現在価格との関係には、現在バー上に実際に整列している過去計算の先行スパンを使用します。
薄化点は右側に指定本数の確定バーを必要とするため、認識に意図的な遅延があります。初期設定では確認可能になったバーより左側へ表示しません。任意設定で元の投影位置へ表示する場合も、認識自体は確認後です。
未確定リアルタイムバーでは、高値・安値・終値の更新に伴い、転換線、基準線、先行スパン、雲の透明度、拡大・収縮状態が終値確定まで変化する場合があります。将来ラベルは初期設定で確定値を使用し、用意したアラートは確定足で判定します。
本インジケーターは研究・可視化ツールです。売買指示、将来予測、目標価格、損切り、ポジションサイズ、成績統計、投資助言を提供しません。厚い雲を必ず強い支持抵抗、薄い雲や収縮中の雲を必ずブレイクする状態とは定義していません。 Gösterge

Gösterge

Gösterge

Auto Trend Channel & Breakout Expectancy in ROVERVIEW
An auto-drawn trend channel is easy. Knowing whether breaking it has ever paid on YOUR symbol is not — and it is the only thing that matters.
This tool draws the channel objectively and then does the part nobody else does: it forward-resolves every historical break through a real target and stop, and reports, in R, what breaks like the current one have actually returned. Not a prediction. A track record.
Expectancy exp +1.24R · need 15% @ RR 6.0
HV win/loss 38/59% n400 ✓
MV win/loss 32/65% n150 ✓
LV win/loss 17/83% n55
Null / net net 1.29R t=3.1 ✓
It is a research and framing tool. NOT a strategy, NOT a signal service, NOT a validated edge.
HOW THE CHANNEL IS BUILT — objectively, no hand-placed anchors
The support and resistance lines come from a CONVEX HULL over confirmed pivots, not from two points a human chose. The opposite boundary is drawn parallel, and the channel WIDTH becomes the measured-move target. Because the construction is mechanical, the same rule produces the same channel on every symbol and every timeframe — there is nothing to curve-fit.
HOW A BREAK IS GRADED — and why volume is split three ways
A break is a confirmed CLOSE beyond the boundary. Every break is then sorted by its break-bar volume percentile into HV / MV / LV (high / medium / low), and each tier is calibrated SEPARATELY.
That split is the point. "Breakouts need volume" is repeated everywhere and tested almost nowhere. Here you can read straight off the panel whether heavy breaks on your instrument actually pay more than thin ones — and often they do not, which is worth knowing before you wait for a volume confirmation that costs you the entry.
THE FORWARD TEST — expectancy in R, on identical geometry
Every break is resolved through a triple barrier: a target at the channel-width move, a stop at a fixed ATR distance, and a horizon. Win, loss, or chop. The expectancy is the exact realized R per trade — a win contributes +RR, a loss contributes −1, chop contributes 0 — so the win rate and the R:R are on the SAME footing, computed from the same resolved trades. There is no mixing of a win rate from one calculation with an R:R from another.
The R:R shown is the target-to-stop RATIO, and it is deliberately not the headline. A 6:1 target sounds wonderful and is reached maybe a third of the time; quoting it alone flatters a low-hit-rate system. So the panel leads with the realized EXPECTANCY, then states the breakeven win rate the geometry requires, then shows the win rate actually achieved. Expectancy first, because expectancy is the thing that is actually true.
Nothing is rated until a tier has at least 30 resolved trades. Below that, no checkmark, no verdict, no meta call — a Wilson floor on a dozen trials is too wide to certify anything, and pretending otherwise is how bad tiers get a green tick.
THE RANDOM-DIRECTION NULL — the honesty check
Here is the trap this defends against. A 6:1 target with a nearby stop is an asymmetric payoff, and on a drifting instrument an asymmetric payoff makes money in a RANDOM direction — the geometry earns, not the signal. So for every real break the script ALSO runs a coin-flip-direction trade with the identical target and stop, and reports its expectancy alongside.
If the null earns as much as the signal, the "edge" is just the geometry capturing drift, and you should believe the null. And it is now TESTED, not just displayed: a Welch t between the signal's realized-R distribution and the null's turns "net 1.29R" into "net 1.29R, t = 3.1, real" — or into "ns", not significant, which is the more common and more honest outcome.
THE OPTIONAL META-LABEL — a learned second opinion
An online logistic model trains on this script's own resolved outcomes and outputs a calibrated probability of follow-through for the current break. No hand-tuned weights; it self-corrects as more breaks resolve, and it reports its own reliability (the realized win rate inside each probability bin) so you can see whether its confidence is earned. It is off by default and it never overrides the forward test — it is a second opinion, not the verdict.
THE ANTI-BIAS GUARDS
ENTRY IS THE CLOSE (or, in retest mode, the line touch) — a break is a signal, not a fill, and entering at a better price than the trade actually offered would manufacture an edge.
Both barriers on one bar: the STOP is assumed first — conservative, and the only assumption that cannot flatter the result. Unresolved trades at the horizon are scored as chop (zero), not as wins.
THE NULL is direction-randomised on the same geometry, which is what isolates signal from payoff structure. Every rating is gated by a minimum sample and a Wilson lower bound, and the null gap is significance-tested. Nothing here is asserted that has not cleared a test.
NON-REPAINT
Confirmed pivots, confirmed-close breaks, and forward-resolved calibration that never looks ahead. The channel can extend and re-fit as new pivots confirm, but a resolved trade is never re-scored, and no barrier is evaluated on a bar that has not closed.
DATA AND SCOPE
Any symbol, any timeframe. ATR-normalised throughout. Volume is used for the tier split; without it the tiers collapse to one and everything else still works.
EXPORTS (Data Window — consume from other scripts via input.source())
Channel high, channel low, break direction, volume tier, entry, stop, target, per-tier expectancy, null expectancy, meta probability — see the Exports group.
CONCEPT CREDIT
The convex-hull approach to objective trendlines, the triple-barrier forward-labelling method and the meta-labelling idea are from Marcos Lopez de Prado ("Advances in Financial Machine Learning"). The trading-range break as a formal, testable rule was first studied at scale by Brock, Lakonishok and LeBaron (Journal of Finance, 1992); its vulnerability to data-snooping was shown by Sullivan, Timmermann and White (1999) — which is exactly why this tool measures the rule on your instrument instead of asserting it. Wilson score interval — E. B. Wilson (1927). Welch's t-test — B. L. Welch. ATR — J. Welles Wilder.
The convex-hull channel implementation, the volume-tier calibration, the random-direction null with its significance test, and the online meta-label are the author's own. Clean-room implementation; no third-party Pine code is reused. Not affiliated with, nor endorsed by, any of the above.
HONESTY AND LIMITATIONS
Calibration is IN-SAMPLE, fixed-barrier, and assumes idealised fills — no commission, no slippage, no partial fills. It describes the past; it does not predict the future. Real costs will reduce every number, and they reduce the low-hit-rate high-RR tiers most.
Overlapping windows mean the samples are not fully independent, so treat the t-stats as directional evidence, not exact p-values. A tier that is proven in-sample is not guaranteed out-of-sample.
The null being beaten is the single most important line on the panel, and on many instruments it will read "ns". That is a real result. A tool that cannot report "no edge here" is selling you something.
Nothing in this script predicts price.
DISCLAIMER
Research and educational tool only. NOT financial advice, NOT a recommendation, and NO guarantee of results. Entry, stop and target output is arithmetic, not advice. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use. Gösterge

Median Cascade Trend [BackQuant]Median Cascade Trend
Overview
Median Cascade Trend is a noise-resistant trend-following indicator that combines multiple causal median filters , an Ehlers-style two-pole Super Smoother , and a configurable chop-gating system .
Its purpose is to identify meaningful directional structure while rejecting the types of price movement that frequently cause conventional moving averages to whipsaw:
Single-bar spikes
Short-lived price shocks
Irregular wicks
Low-efficiency sideways movement
Weak slopes that do not represent genuine directional progress
The indicator processes price in three distinct stages:
A median-filter cascade removes impulsive and short-duration noise.
A two-pole low-pass filter smooths the remaining structural signal.
A chop gate decides whether a change in direction is strong enough to update the active trend state.
This creates a trend line that is intentionally more selective than a standard moving average. The line itself can continue evolving, but trend-state changes are only accepted when the underlying movement passes the chosen quality tests.
The result is a system that separates:
The estimated trend line
The raw direction of that line
The confirmed trend regime
That distinction is important. The indicator does not assume that every small turn in a smoothed line represents a valid trend reversal.
Core idea
Most trend filters are built around linear averaging. They combine historical prices using fixed or exponentially decaying weights.
Examples include:
SMA
EMA
WMA
HMA
DEMA
These filters are effective for general smoothing, but they have a weakness: a single extreme observation can influence the output immediately.
If one bar produces a large wick or temporary price shock, a moving average will usually be pulled toward that value because it includes the magnitude of every observation.
A median filter behaves differently.
Instead of averaging the values inside a window, it sorts them and selects the middle observation. This makes it highly resistant to isolated extremes.
Median Cascade Trend uses this property repeatedly before applying traditional low-pass smoothing.
The central idea is:
Remove impulsive noise first.
Smooth the cleaned signal second.
Confirm direction only when the movement is efficient or sufficiently steep.
This ordering is deliberate. Smoothing a noisy series and filtering noise before smoothing are not the same thing.
Where median filtering comes from
Median filters are widely used in digital signal processing, image processing, and engineering.
One of their best-known applications is the removal of impulse noise , sometimes called salt-and-pepper noise in image processing.
Impulse noise consists of isolated extreme observations that are not representative of the surrounding signal.
In market data, comparable events include:
Temporary liquidity gaps
Single-bar stop runs
Erroneous prints
Sharp wick reversals
News spikes that immediately retrace
A linear smoother such as an SMA or EMA cannot distinguish between an important sustained move and an isolated outlier. Both are included according to their numerical magnitude.
A median filter is nonlinear. It selects the central-ranked value rather than calculating an arithmetic mean.
For example, consider five observations:
100
101
102
103
140
The average is:
109.2
The median is:
102
The isolated value at 140 significantly distorts the average but has almost no effect on the median.
This is why median filtering is especially useful when the objective is to preserve structural turns while rejecting isolated noise.
What makes a median filter nonlinear
A normal moving average can be represented as a weighted sum of its inputs.
A median filter cannot.
Its output depends on the ordering of observations, not their arithmetic combination. This makes it a nonlinear filter.
That has several important consequences:
Outliers have limited influence.
Edges and structural shifts can be preserved more cleanly.
The response is not equivalent to ordinary low-pass averaging.
The filter may hold a value until enough observations confirm a change.
In trading terms, the median filter often behaves more like a structural selector than a conventional average.
What “causal” means
The median stages in this indicator are causal.
A causal filter uses:
The current bar
Past bars
It does not use future observations.
This matters because many visually smooth filtering methods can only produce their best result by centering the calculation around the current point, which requires future data.
This script does not do that.
Every value is calculated from information available at that bar, making the filter suitable for live use.
Why use a cascade of median filters
A single median filter can remove isolated spikes, but noise does not always occur as one extreme bar.
It can appear as:
Two-bar shocks
Short bursts of alternating movement
Small clusters of irregular candles
Residual distortion left after the first filtering pass
A cascade applies multiple median stages sequentially:
Stage 1 processes the original source.
Stage 2 processes the output of Stage 1.
Stage 3 processes the output of Stage 2.
Each stage removes a different layer of short-duration instability.
The process is similar to progressively cleaning a signal:
The first stage removes obvious impulse noise.
The second stage removes remaining short-term irregularity.
The third stage produces a more stable structural series before low-pass smoothing.
Median Stage 1
The first median stage is intended to reject isolated one-bar disturbances.
With a short setting such as 3:
The filter remains responsive.
Single-bar spikes are strongly suppressed.
Most genuine multi-bar movement remains visible.
This is the most tactical stage.
Median Stage 2
The second stage receives an already-cleaned input.
Its role is to remove:
Short-duration residual noise
Small alternating movements
Irregularity that survived the first stage
A slightly longer setting such as 5 creates stronger structural consistency.
Median Stage 3
The third stage provides the final nonlinear cleaning pass.
With a longer setting such as 7:
The output becomes more stable.
Short-lived reversals are reduced.
Only more persistent changes are passed into the low-pass stage.
This is the most conservative median stage.
Cascade Stages input
The user can select how many median stages are active:
1 stage: fastest and most responsive
2 stages: balanced noise rejection
3 stages: strongest impulse-noise suppression
The unused stages are still calculated internally, but the selected stage determines which output is sent into the Super Smoother.
Why cascade instead of one very long median
Applying several shorter filters is not always equivalent to applying one very long median filter.
A long median window can:
Delay structural changes heavily
Flatten shorter trend legs
Become insensitive to local turns
A cascade allows the filtering process to be distributed across stages.
This provides greater control over:
How aggressively isolated noise is removed
How much short-duration movement survives
How smooth the final structural input becomes
It also lets users build a progression such as 3, 5, and 7 rather than applying one blunt window.
The low-pass stage
After the median cascade, the signal is passed into a two-pole Super Smoother .
The median cascade removes nonlinear impulse noise, but its output can still contain:
Small step changes
Residual high-frequency movement
Sharp transitions caused by median replacement
The Super Smoother converts that cleaned but potentially stepped series into a smoother trend line.
This creates a hybrid filtering system:
Nonlinear median filtering for outlier rejection
Recursive low-pass filtering for smooth trend extraction
These components solve different problems.
Where the Super Smoother comes from
The Super Smoother is associated with John F. Ehlers’ application of digital signal processing techniques to financial markets.
It is based on the behavior of a two-pole low-pass filter and is designed to suppress high-frequency components more effectively than many conventional moving averages.
Traditional moving averages are simple smoothers, but they are not necessarily optimized as frequency-selective filters.
The Super Smoother uses recursively calculated coefficients derived from:
Exponential decay
Trigonometric terms
A selected cutoff period
The objective is to reduce high-frequency market noise while retaining lower-frequency directional structure.
What a low-pass filter does
A low-pass filter allows slow-moving components of a signal to pass while reducing fast-moving components.
In market terms:
Slow components represent broader trend structure.
Fast components represent short-term noise, rapid oscillation, and microstructure disturbance.
The Low-Pass Length determines the separation.
Lower values:
Allow more short-term movement through.
React faster.
Produce more turns.
Higher values:
Reject more high-frequency movement.
Produce a smoother trend line.
Respond later to structural changes.
Why use a two-pole filter
The number of poles broadly describes the order and steepness of a filter.
A two-pole filter generally provides:
Stronger attenuation of high-frequency noise than a one-pole filter.
A smoother output.
A more defined frequency response.
It also uses prior filter outputs recursively, allowing substantial smoothing without requiring an extremely long direct averaging window.
The full signal-processing chain
The calculation can be understood as:
Raw price source
Median Stage 1
Optional Median Stage 2
Optional Median Stage 3
Two-pole Super Smoother
Direction measurement
Chop-quality validation
Persistent trend state
Each layer has a distinct purpose.
Median cascade
Rejects isolated and short-lived noise.
Super Smoother
Reduces the remaining high-frequency variation.
Direction logic
Determines whether the final line is rising or falling.
Chop gate
Determines whether that directional change is trustworthy enough to update the confirmed trend.
Trend direction calculation
The raw direction is determined by comparing the current trend line with its value several bars ago:
Bullish if trendLine > trendLine
Bearish if trendLine < trendLine
Neutral if equal
The Direction Lookback controls how much movement is required before the line is classified as rising or falling.
A one-bar comparison is extremely responsive but can detect tiny slope changes.
A longer comparison:
Measures movement across a wider interval.
Reduces sensitivity to one-bar flattening.
Produces more stable raw direction.
Raw trend versus confirmed trend
One of the most important design choices is that the script separates:
Raw trend
Confirmed trend
The raw trend reflects the current direction of the filtered line.
The confirmed trend is persistent and changes only when:
The raw trend points in a new direction.
The chop gate is open.
If the line turns but the gate is closed:
The active trend state remains unchanged.
The attempted flip can optionally be displayed as blocked.
This prevents every small line turn from immediately becoming a regime reversal.
Why a chop filter is needed
Even an advanced smoother can turn repeatedly during sideways markets.
Smoothing reduces noise, but it does not determine whether movement is:
Directional
Efficient
Large enough relative to volatility
A line can move upward and downward in a range while making almost no net progress.
The chop gate addresses this by evaluating two separate properties:
Directional efficiency
ATR-normalized slope
Efficiency Ratio
The first gate component measures how efficiently the trend line has moved over a selected window.
The calculation compares:
Net movement
Total movement
Net movement is:
|trendLine - trendLine |
Total movement is:
Sum of |bar-to-bar changes in trendLine|
The Efficiency Ratio is:
Efficiency = Net Movement / Total Movement
The result ranges approximately from 0 to 1.
Efficiency near 1
The line has moved mostly in one direction.
Example:
It advanced 10 units.
Its total path was approximately 11 units.
This indicates a clean directional move.
Efficiency near 0
The line has moved back and forth without achieving much net progress.
Example:
It travelled 20 units in total.
But ended only 1 unit from where it started.
This indicates chop.
Where the Efficiency Ratio comes from
The Efficiency Ratio is commonly associated with Perry Kaufman’s work on adaptive market analysis and the Kaufman Adaptive Moving Average.
Its purpose is to distinguish directional movement from noisy movement.
It does not measure the size of a move alone.
It measures the quality of the path.
This makes it highly suitable as a trend gate.
A market can be volatile but inefficient. It can move aggressively in both directions and still make little progress.
The Efficiency Ratio helps identify that distinction.
Minimum Efficiency
The Minimum Efficiency input determines the directional quality required for the efficiency condition to pass.
Lower values:
Allow more irregular movement.
Open the gate more frequently.
Produce earlier but noisier trend changes.
Higher values:
Require cleaner directional travel.
Block more sideways flips.
Produce fewer but more selective regime changes.
ATR-Normalized Slope
The second gate component measures how large the trend-line movement is relative to current market volatility.
It calculates:
|trendLine - trendLine | / ATR
This converts the line’s movement into ATR units.
Without normalization, a slope of 10 points could be:
Large for one instrument
Negligible for another
Large in a quiet regime
Small during extreme volatility
ATR normalization makes the slope more comparable across assets and regimes.
What normalized slope measures
The Efficiency Ratio asks:
Was the movement directionally clean?
ATR-normalized slope asks:
Was the movement large enough to matter?
These are different questions.
A move can be highly efficient but extremely small.
For example:
A perfectly smooth drift of only 0.02 ATR may not justify a new trend regime.
A move can also be large but inefficient:
A violent range may travel several ATRs while repeatedly reversing.
Using both filters gives a more complete view of trend quality.
Minimum ATR-Normalized Slope
The Minimum ATR-Normalized Slope defines the movement threshold.
Lower values:
Accept weaker slopes.
React sooner.
Allow more low-energy flips.
Higher values:
Require stronger displacement.
Reduce weak trend transitions.
Delay signals until movement becomes more meaningful.
Gate modes
The indicator provides four chop-gate modes.
Efficiency Ratio
Only directional efficiency is required.
Best suited for users who care primarily about whether movement is clean, regardless of its exact magnitude.
ATR-Normalized Slope
Only slope strength is required.
Best suited for users who want movement to exceed a volatility-adjusted threshold, even if the path is not perfectly efficient.
Both
Both conditions must pass:
Efficiency must be high enough.
Slope must be strong enough.
This is the strictest mode and generally provides the strongest chop rejection.
Either
Only one condition must pass.
This is more permissive:
A very clean slow trend may pass through efficiency.
A powerful but less orderly move may pass through slope.
It provides a balance between responsiveness and filtering.
Gate behavior
When the gate is open:
A new raw direction can update the trend state.
Bullish and bearish flips can be confirmed.
When the gate is closed:
The previous confirmed trend persists.
Attempted changes are blocked.
The display can dim, turn neutral, or hide.
This means the indicator behaves like a regime-holding system during chop.
It does not constantly reset to neutral. It retains the last confirmed direction until sufficient evidence supports a new one.
Blocked flips
A blocked flip occurs when:
The filtered line attempts to change direction.
The attempted direction differs from the confirmed trend.
The chop gate is closed.
The raw direction has just changed.
These can optionally be displayed as small X markers.
Blocked flips are useful because they show:
Where a basic slope indicator would have reversed.
Where the chop filter rejected that reversal.
How much signal noise the gate is removing.
They are not trade signals. They are diagnostic information.
Trend persistence
The trend variable is persistent.
Once bullish:
It remains bullish until a valid bearish change passes the gate.
Once bearish:
It remains bearish until a valid bullish change passes the gate.
This persistence is central to the design.
The indicator is not merely coloring every local slope. It is maintaining a confirmed market regime.
Display modes when the gate is closed
The indicator offers three ways to display gated conditions.
Dim
The current trend color remains visible but becomes transparent.
This communicates:
The last confirmed trend is still active.
Current conditions are not strong enough to confirm a new direction.
This is useful when you want regime continuity without overstating conviction.
Neutral
The trend line and candles switch to the selected gate color.
This communicates:
The directional regime is being withheld.
Current conditions are considered non-trending or uncertain.
Hide
The trend line disappears while the gate is closed.
This is the strictest visual mode.
It communicates:
No actionable trend state should be displayed during the gated condition.
Trend line coloring
The base color is determined by the confirmed trend:
Bullish trend uses the long color.
Bearish trend uses the short color.
Uninitialized state uses gray.
The gate display can then modify the final presentation.
This allows the chart to show:
Direction
Confirmation status
Chop-filter activity
without needing a separate panel.
Gradient fill
The indicator fills the area between price and the trend line.
When price is above the trend line:
A bullish gradient is displayed.
When price is below the trend line:
A bearish gradient is displayed.
The fill is stronger near the trend line and fades toward price.
This emphasizes the trend line as the structural reference.
The fill color follows the gate display state:
Full trend color when active
Dimmed during a closed gate in Dim mode
Neutral when configured
Hidden when the trend line is hidden
Trend glow
A soft glow is created around the filtered line using a small ATR-scaled distance.
The glow width is:
ATR(14) × 0.06
Using ATR ensures the glow remains visually proportional across assets and price scales.
The glow does not affect the calculation. It improves readability and reinforces the line as the central structural output.
Candle coloring
Candles can be colored using the confirmed trend state.
When the gate is open:
Bull trend produces bullish candles.
Bear trend produces bearish candles.
When the gate is closed:
Dim mode fades the existing trend color.
Neutral mode uses the gate color.
Hide mode removes the candle override.
This gives an immediate full-chart view of both trend and gate status.
Signal logic
Signals only occur when the confirmed trend changes.
Bullish flip
A bullish signal requires:
The active trend becomes bullish.
The previous trend was bearish.
The gate accepted the change.
Bearish flip
A bearish signal requires:
The active trend becomes bearish.
The previous trend was bullish.
The gate accepted the change.
This is more selective than simply detecting a change in line slope.
How to interpret the indicator
Bullish confirmed regime
A bullish regime means:
The median-filtered and low-pass-smoothed trend line is rising.
The move satisfied the selected chop-filter conditions when the regime changed.
The last accepted direction remains bullish.
Bearish confirmed regime
A bearish regime means:
The final trend line is falling.
The bearish change passed the selected quality gate.
The last accepted direction remains bearish.
Gate closed in an existing trend
This means:
The market is no longer moving with sufficient efficiency or slope.
A new reversal cannot currently be confirmed.
The previous regime remains stored.
This often occurs during:
Consolidation
Pullbacks
Low-volatility drift
Transition phases
Repeated blocked flips
Repeated blocked changes suggest:
The filtered line is oscillating.
Directional quality is weak.
A normal trend-following system would likely be whipsawing.
This is exactly the environment the gate is designed to avoid.
How to use it in practice
1. Directional regime filter
Use the confirmed trend to filter other setups:
Favor long trades during bullish regimes.
Favor short trades during bearish regimes.
Reduce activity when the gate is closed.
2. Trend-following entries
Bullish and bearish flips can be used as directional entry triggers, especially when confirmed by:
Price structure
Breakouts
Volume expansion
Higher-timeframe alignment
3. Pullback framework
During an established trend:
Price returning toward the trend line may represent a pullback.
If the gate remains closed but the trend does not flip, the move may be consolidation rather than reversal.
If the opposite direction eventually passes the gate, the regime has changed more meaningfully.
4. Chop avoidance
The most direct use is avoiding repeated entries during low-quality conditions.
When the display is dim, neutral, or hidden:
Reduce confidence in new trend signals.
Wait for efficiency or slope to recover.
5. Diagnostic comparison
Enable blocked flips to see how often the raw trend attempts to reverse without confirmation.
This helps tune:
Efficiency threshold
Slope threshold
Gate mode
Input guide
Source
Selects the price series used by the median cascade.
Close is the standard choice.
Alternatives such as hl2 or hlc3 may produce a slightly smoother structural input.
Cascade Stages
Controls how many median filters are used.
1: responsive
2: balanced
3: strongest noise rejection
Median Stage Lengths
Control the window used at each stage.
Shorter values:
Preserve responsiveness.
Remove only very short-duration noise.
Longer values:
Produce stronger structural filtering.
Delay shorter turns.
Low-Pass Length
Controls the two-pole Super Smoother.
Lower:
Faster
More reactive
Higher:
Smoother
More conservative
Direction Lookback
Controls how far back the current line is compared when determining raw direction.
Lower:
Faster slope changes
Higher:
More stable directional measurement
Efficiency Length
Controls the window used to measure net movement versus total path movement.
Shorter:
More responsive efficiency reading
More sensitive to recent chop
Longer:
More stable directional-quality assessment
Minimum Efficiency
Controls how clean the directional path must be.
Higher values make the gate stricter.
Slope Length
Controls the interval across which trend-line movement is measured.
Slope ATR Length
Controls the ATR baseline used to normalize slope.
Minimum ATR-Normalized Slope
Controls the minimum volatility-adjusted displacement required.
Higher values require stronger movement.
Tuning examples
Faster trend configuration
1 or 2 median stages
Short median windows
Lower Super Smoother length
Direction Lookback of 1 or 2
Either gate mode
Lower efficiency and slope thresholds
Balanced configuration
2 or 3 median stages
Progressive windows such as 3, 5, 7
Moderate Super Smoother length
Both gate mode
Moderate thresholds
Conservative configuration
3 stages
Longer median windows
Higher Super Smoother length
Longer Direction Lookback
Both gate mode
Higher minimum efficiency and slope
How this differs from a normal moving average
A standard moving average:
Uses linear averaging.
Responds directly to outlier magnitude.
Changes direction whenever its slope changes.
Median Cascade Trend:
Uses nonlinear outlier-resistant preprocessing.
Applies a proper recursive low-pass stage.
Separates raw direction from confirmed regime.
Blocks changes during inefficient or weak movement.
How this differs from a normal median filter
A basic median filter only removes impulse noise.
This indicator extends the idea by adding:
Multiple median stages
Low-pass smoothing
Direction measurement
Efficiency gating
Volatility-normalized slope gating
Persistent trend states
Signals and alerts
It is not simply a median-smoothed line. It is a complete trend-regime system built on median preprocessing.
How this differs from a Supertrend
A Supertrend uses ATR bands around price and changes state when price crosses the trailing boundary.
Median Cascade Trend does not use a volatility band to define direction.
Instead:
Direction comes from the slope of the filtered trend line.
ATR is used only to normalize slope and scale visuals.
Trend changes are controlled by movement quality rather than price crossing a stop band.
Strengths
Strong rejection of isolated price spikes
Preserves broader structural movement
Combines nonlinear and linear filtering
Separates raw turns from confirmed trend changes
Configurable chop rejection
Volatility-normalized slope testing
Persistent directional regimes
Blocked-flip diagnostics
Fully causal calculation
Limitations
Strong filtering can delay genuine reversals.
Long median windows may suppress shorter trend legs.
Strict gate settings can hold the previous regime too long.
Loose gate settings reduce the benefit of chop filtering.
Median filters can produce stepped transitions before low-pass smoothing.
The indicator remains reactive rather than predictive.
Best use cases
Median Cascade Trend is particularly suited for:
Trend filtering in noisy markets
Reducing false reversals caused by wicks
Swing-trading regime identification
Filtering entries from faster systems
Dynamic trend-structure visualization
Avoiding sideways-market whipsaws
It can be applied across:
Equities
Indices
Futures
Forex
Cryptocurrency
Commodities
Alerts
The indicator provides alerts for:
Confirmed bullish trend changes
Confirmed bearish trend changes
Trend changes blocked by the chop filter
The blocked-flip alert is especially useful for monitoring when the line attempts to reverse but market quality remains insufficient.
Summary
Median Cascade Trend is a multi-stage trend extraction system designed to reject impulsive market noise before determining direction. It first applies up to three causal median filters, progressively removing isolated spikes and short-duration disturbances. The cleaned series is then passed through a two-pole Super Smoother to extract a stable low-frequency trend line.
Rather than accepting every change in slope, the indicator evaluates the quality of the movement using directional efficiency and ATR-normalized slope. Depending on the selected gate mode, trend changes can require clean directional travel, sufficient volatility-adjusted displacement, or both.
This produces a persistent trend state that changes only when the filtered line turns and the surrounding movement is strong enough to justify the reversal. The final result is a robust trend-following framework that combines outlier rejection, low-pass smoothing, directional-quality measurement, and chop suppression into a single overlay.
Gösterge

Gösterge

Gösterge

Institutional Sniper Signal (Clean v7)This indicator is a Multi-Timeframe (MTF) quantitative system designed to trade pullbacks and breakouts in alignment with the higher timeframe macro trend.
Rather than relying on a single indicator to dictate the trend, this script utilizes a Consensus Voting Mashup. By aggregating data from 15 different structural and momentum indicators on a higher timeframe, it calculates a definitive directional bias, filtering out the noise of ranging markets.
⚙️ CORE MECHANICS (The Consensus Logic):
To avoid repainting and false signals, the script operates in three strict phases:
The Macro Consensus (4H Closed Candle): The engine pulls data from the last closed 4H candle across 15 distinct tools (including EMA 200, EMA 50, WMA 100, Parabolic SAR, Ichimoku Tenkan/Kijun, DEMA, TEMA, and standard deviation bands). Each indicator gets 1 "vote" (Buy or Sell). A trade is only authorized if a strict user-defined threshold is met (e.g., 10 out of 15 indicators agreeing on the same direction).
The Pullback Trigger (1H): Once the macro consensus is formed, the script monitors the 1H timeframe. It waits for the local price to retrace and touch the 1H 20 EMA, identifying a potential discounted entry area.
The Fractal Breakout (Execution): It does not enter at market price. Instead, it calculates a 5-bar Fractal High (for longs) or Fractal Low (for shorts). It then plots visual pending order lines (Buy Stop / Sell Stop) at these fractal extremes, adding a customizable price offset to avoid fakeouts.
🛡️ RISK MANAGEMENT:
ATR Stop Loss: The stop loss is dynamically plotted at the opposite fractal, buffered by an ATR multiplier to allow the trade to breathe.
Daily Limit: Includes a daily signal limiter to prevent overtrading during high-volatility sideways days.
🛠️ HOW TO USE:
Apply the script to your execution timeframe (e.g., 15m or 30m). Adjust the "Offset" input based on your asset (e.g., 0.0002 for Forex pairs or 2.0 for US Indices). When a valid consensus is met and the price pulls back, the indicator will plot horizontal lines with precise labels for your pending Entry and Stop Loss.
🇧🇷 (PORTUGUÊS)
Este indicador é um sistema quantitativo Multi-Timeframe (MTF) projetado para operar pullbacks e rompimentos alinhados com a tendência macro.
Em vez de usar apenas um indicador para definir a tendência, este script utiliza um Sistema de Votação por Consenso. Ele agrega dados de 15 indicadores diferentes no tempo gráfico maior para calcular um viés direcional definitivo.
⚙️ COMO FUNCIONA A LÓGICA:
Para evitar repintura (repainting), o script opera em 3 fases:
O Consenso Macro (Vela Fechada H4): O motor puxa os dados da última vela fechada de H4 em 15 ferramentas diferentes (EMA 200, Ichimoku, DEMA, SAR, etc). Cada indicador dá 1 "voto". O setup só é armado se a maioria esmagadora (ex: 10 de 15) concordar com a direção.
O Gatilho de Pullback (H1): Com o consenso formado, o script espera o preço retrair e tocar na EMA 20 do H1 (área de desconto).
O Rompimento do Fractal (Entrada): O indicador não entra a mercado. Ele mapeia a Máxima ou Mínima dos últimos 5 candles (Fractal) e desenha uma linha de ordem pendente (Buy Stop / Sell Stop) com um recuo (offset) customizável.
COMO USAR: Adicione no seu gráfico de execução (ex: M15). Ajuste o valor do "Offset" nas configurações de acordo com o ativo (ex: digite 0.0002 se for Forex ou 2.0 se for Índice). Aguarde as linhas de entrada e Stop Loss aparecerem na tela para posicionar suas ordens pendentes. Gösterge

Institutional Sniper Signal (Clean v7)This indicator is a Multi-Timeframe (MTF) quantitative system designed to trade pullbacks and breakouts in alignment with the higher timeframe macro trend.
Rather than relying on a single indicator to dictate the trend, this script utilizes a Consensus Voting Mashup. By aggregating data from 15 different structural and momentum indicators on a higher timeframe, it calculates a definitive directional bias, filtering out the noise of ranging markets.
⚙️ CORE MECHANICS (The Consensus Logic):
To avoid repainting and false signals, the script operates in three strict phases:
The Macro Consensus (4H Closed Candle): The engine pulls data from the last closed 4H candle across 15 distinct tools (including EMA 200, EMA 50, WMA 100, Parabolic SAR, Ichimoku Tenkan/Kijun, DEMA, TEMA, and standard deviation bands). Each indicator gets 1 "vote" (Buy or Sell). A trade is only authorized if a strict user-defined threshold is met (e.g., 10 out of 15 indicators agreeing on the same direction).
The Pullback Trigger (1H): Once the macro consensus is formed, the script monitors the 1H timeframe. It waits for the local price to retrace and touch the 1H 20 EMA, identifying a potential discounted entry area.
The Fractal Breakout (Execution): It does not enter at market price. Instead, it calculates a 5-bar Fractal High (for longs) or Fractal Low (for shorts). It then plots visual pending order lines (Buy Stop / Sell Stop) at these fractal extremes, adding a customizable price offset to avoid fakeouts.
🛡️ RISK MANAGEMENT:
ATR Stop Loss: The stop loss is dynamically plotted at the opposite fractal, buffered by an ATR multiplier to allow the trade to breathe.
Daily Limit: Includes a daily signal limiter to prevent overtrading during high-volatility sideways days.
🛠️ HOW TO USE:
Apply the script to your execution timeframe (e.g., 15m or 30m). Adjust the "Offset" input based on your asset (e.g., 0.0002 for Forex pairs or 2.0 for US Indices). When a valid consensus is met and the price pulls back, the indicator will plot horizontal lines with precise labels for your pending Entry and Stop Loss.
🇧🇷 (PORTUGUÊS)
Este indicador é um sistema quantitativo Multi-Timeframe (MTF) projetado para operar pullbacks e rompimentos alinhados com a tendência macro.
Em vez de usar apenas um indicador para definir a tendência, este script utiliza um Sistema de Votação por Consenso. Ele agrega dados de 15 indicadores diferentes no tempo gráfico maior para calcular um viés direcional definitivo.
⚙️ COMO FUNCIONA A LÓGICA:
Para evitar repintura (repainting), o script opera em 3 fases:
O Consenso Macro (Vela Fechada H4): O motor puxa os dados da última vela fechada de H4 em 15 ferramentas diferentes (EMA 200, Ichimoku, DEMA, SAR, etc). Cada indicador dá 1 "voto". O setup só é armado se a maioria esmagadora (ex: 10 de 15) concordar com a direção.
O Gatilho de Pullback (H1): Com o consenso formado, o script espera o preço retrair e tocar na EMA 20 do H1 (área de desconto).
O Rompimento do Fractal (Entrada): O indicador não entra a mercado. Ele mapeia a Máxima ou Mínima dos últimos 5 candles (Fractal) e desenha uma linha de ordem pendente (Buy Stop / Sell Stop) com um recuo (offset) customizável.
COMO USAR: Adicione no seu gráfico de execução (ex: M15). Ajuste o valor do "Offset" nas configurações de acordo com o ativo (ex: digite 0.0002 se for Forex ou 2.0 se for Índice). Aguarde as linhas de entrada e Stop Loss aparecerem na tela para posicionar suas ordens pendentes. Gösterge

[GYTS-CE] Kinetic Trend Envelope (adaptive trailing stop)Kinetic Trend Envelope (Community Edition)
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- INTRODUCTION --------- 🌸
💮 What is the Kinetic Trend Envelope?
The Kinetic Trend Envelope (KTE) is an adaptive directional trailing stop in the lineage of SuperTrend, rebuilt around the premise that volatility is kinetic energy . It measures per-bar motion with five academically grounded volatility estimators, then widens the envelope as energy rises and contracts it as motion settles.
In an uptrend, the lower band ratchets higher and never retreats; in a downtrend, the upper band ratchets lower. The direction changes when the active stop is breached, after which the opposite side becomes the new trailing stop.
💮 Why Use This Indicator?
Conventional trailing stops typically combine a price anchor with one symmetric ATR-derived width. The KTE extends that model with:
Asymmetric volatility profiling — Bullish- and bearish-candle volatility shape the upper and lower bands independently.
Three direction-switch methods — High/low, close, or a smoothed estimator controls flip sensitivity without moving the band anchor.
Five volatility estimators — ATR plus Parkinson, Garman-Klass, Rogers-Satchell, and Yang-Zhang covers different treatments of gaps, drift, and intrabar range.
The outputs are calibrated to a common width basis, so Volatility Factor remains interpretable across estimators and price scales. Fine adjustment may still be useful, but switching estimators should not require re-tuning by orders of magnitude.
↑ The KTE on a trending instrument. The thick line is the active trailing stop; the thin line shows the opposing side of the envelope. Both expand and contract with market energy.
↑ KTE beside TradingView's built-in SuperTrend, both using ATR with a 10-bar lookback. KTE's asymmetric profile changes how each side responds to directional volatility while the monotonic active band avoids premature loosening.
🌸 --------- HOW IT WORKS --------- 🌸
💮 Core Concept
The bands share a smoothed price estimator as their anchor, but use separate volatility profiles:
Upper band = estimator + (factor × bullish-candle volatility)
Lower band = estimator − (factor × bearish-candle volatility)
In a bullish state, the lower band is active and can only rise. In a bearish state, the upper band is active and can only fall. This monotonic constraint prevents a live trailing stop from loosening within the trend.
The selected direction-switch method changes only the breach test. It does not change the smoothed estimator anchoring the envelope, so a wick-sensitive trigger cannot drag the bands around with the wick.
💮 The Five Volatility Estimators
Each estimator reads a different part of the OHLC bar:
ATR (Wilder, 1978) — Familiar baseline that handles gaps through true range.
Parkinson (1980) — Uses high-low range; efficient under continuous, low-drift conditions.
Garman-Klass (1980) — Adds open-close information; favours continuous sessions without material gaps.
Rogers-Satchell (1991) — Drift-independent and well suited to trending, continuously traded instruments.
Yang-Zhang (2000) — Combines overnight gaps, open-close movement, and Rogers-Satchell; the gap-aware default.
Statistical efficiency does not guarantee a visibly tighter stop. At slow Adaptation Speed settings, long averaging makes the estimators look similar; at fast settings, their different treatments of gaps, drift, and range become more visible. Choose according to the instrument's behaviour rather than expecting one estimator always to produce the narrowest band.
↑ ATR and Yang-Zhang at Adaptation Speed 2. The long profile memory (low speed) smooths away most of the difference, so the two envelopes nearly overlap.
↑ ATR and Yang-Zhang at Adaptation Speed 8. The short profile memory (high speed) exposes their different volatility readings, producing visibly distinct envelope widths.
💮 Asymmetric Volatility Profiling and Adaptation Speed
The KTE stores volatility from bullish and bearish candles separately. Bullish samples determine the upper width; bearish samples determine the lower width. This allows the two sides to respond differently when upward and downward motion carry different energy.
Adaptation Speed controls the memory of this profile, not the speed of the price estimator and not the distance of the stop by itself. Its 1–10 scale maps logarithmically to an internal window:
Speed 3 — approximately 878 bars: stable and slow to re-weight
Default 3.5 — approximately 570 bars: general-purpose smoothing
Speed 8 — approximately 11 bars: highly responsive to recent volatility
Speed 10 — approximately 2 bars: extremely reactive and noisy
Faster does not necessarily mean closer to price. During a volatility burst, a fast profile recognises the expansion sooner and may widen the band sharply. Because the active stop cannot loosen, it can then remain flat until the estimator catches up. A slow profile dilutes the same burst across much more history, so its narrower band may appear to follow price faster.
This is why two instances matched during a calm period can separate during a shock, especially when they also use different Volatility Factor values. Compare Adaptation Speed with the same factor first; matching lines in one regime does not make two configurations equivalent elsewhere.
The profiles are also direction-conditioned: bullish samples are replaced by later bullish candles and bearish samples by later bearish candles. A recent high-volatility sample can therefore persist through a run of opposite-colour candles, producing deliberate step-like plateaux in the relevant band.
↑ Asymmetric profiling in action: the upper and lower widths respond independently to bullish- and bearish-candle volatility.
💮 Direction Switch Methods
The breach source sets the balance between responsiveness and false flips:
On high/low — Uses the current bar's wick and can switch on the breach bar. Fastest and most sensitive to noise.
On close — Uses the previous confirmed close; the switch appears on the following bar.
On estimator — Uses the previous smoothed estimator; the most conservative default, also switching on the following bar.
↑ The three switch methods share the same band geometry but change direction at different times.
🌸 --------- KEY FEATURES --------- 🌸
💮 Eight Estimator Filters
The configurable price anchor includes:
Ultimate Smoother, 2- or 3-pole — Low-noise, near-zero-lag passband response; the 2-pole version is the default.
Super Smoother, 2- or 3-pole — Ehlers low-pass filters for progressively stronger smoothing.
BiQuad — Second-order low-pass filter with an adjustable Q-factor.
ADXvma — Adapts to trend strength and tends to flatten in ranges.
MAMA — Cycle-adaptive MESA moving average.
A2RMA — Adaptive recursive moving average with adjustable gamma.
They are provided by the open-source FiltersToolkit library.
💮 Visual Layering
The display separates function from context:
Active band — Thick directional trailing-stop line
Opposing band — Thin reference for the inactive side
Channel fill — Visual separation between the estimator and each band
Estimator — Optional smoothed anchor
Palette, light/dark mode, widths, and transparencies can be adjusted independently.
🌸 --------- USAGE GUIDE --------- 🌸
💮 Getting Started
Start with the defaults, observe several calm and volatile regimes, and change one dimension at a time:
Tune Volatility Factor for the preferred stop distance.
Tune Adaptation Speed for how quickly width should respond to regime changes.
Choose the direction-switch method for the preferred confirmation level.
Change the volatility estimator only when its assumptions better fit the instrument.
💮 Choosing a Volatility Estimator
Gapped equities — Yang-Zhang accounts for overnight movement.
Trending 24/7 markets — Rogers-Satchell is drift-independent without a separate gap component.
Continuous, range-led markets — Parkinson or Garman-Klass offers efficient range-based measurement under their assumptions.
Familiar baseline — ATR provides conventional true-range behaviour.
On continuous instruments, Rogers-Satchell and Yang-Zhang may look very similar because there are few gaps to distinguish them. Use the Volatility Toolkit to compare their raw behaviour on the intended instrument.
↑ Three estimators compared on one instrument, each reading a different combination of OHLC information.
💮 Tuning Width and Responsiveness
These controls solve different problems:
Volatility Factor — Sets the distance per unit of measured volatility.
Adaptation Speed — Sets the memory of the bullish/bearish profile; faster can widen the stop sooner during shocks.
Volatility Lookback — Sets how quickly the underlying per-bar volatility estimate changes.
Estimator Lookback — Sets the smoothness of the price anchor.
Use symptoms to guide adjustment:
Frequent flips on minor pullbacks — Increase Volatility Factor or use a more conservative switch method (e.g. "on estimator").
Excessive give-back — Decrease Volatility Factor or use a more responsive switch method (e.g. "on high/low").
Width reacts too slowly to regime changes — Increase Adaptation Speed or reduce Volatility Lookback.
Bands become erratic during shocks — Reduce Adaptation Speed or increase Volatility Lookback.
↑ A tight factor follows price more closely and flips more often; a loose factor tolerates larger pullbacks.
💮 Trading Applications
Discretionary trailing stop — Move a protective stop with the active band as it tightens.
Trend confirmation — Accept long signals only during a bullish KTE state, and short signals only while bearish.
Exit timing — Treat a direction change as an exit when the trade thesis is trend-following.
💮 Integration with GYTS Suite
The visible bands and estimator can be selected as sources by compatible Pine scripts. Two packed streams are also exposed:
🔗 STREAM KTE 🪜 Trailing Stoploss — Positive lower-band value in a bullish state; negative upper-band value in a bearish state.
🔗 STREAM KTE 🪜 Mechanism — Encodes the switch method and scale-invariant estimator relationship for compatible consumers.
The KTE is, first and foremost, a trailing stop, and these streams are built for stop management. The Order Orchestrator strategy consumes the Trailing Stoploss and Mechanism streams together : the first supplies the active stop level and its direction, the second makes the strategy's trailing-exit runner follow whatever switch method and estimator you set here. So the stop is configured once, in the KTE.
Beyond that primary role, the signed trailing-stop stream can also serve as a trend signal, since its sign flips with direction: it can be read through sign and magnitude as an entry/exit signal, including by Flux Composer . The KTE can also be paired with Market Regime Detector so flips are acted on only when the broader regime supports trend-following behaviour.
🌸 --------- LIMITATIONS --------- 🌸
Trailing-stop latency — Every trailing stop gives back some of the move between the trend extreme and the eventual breach.
Whipsaws in ranges — Low-energy chop can produce repeated flips; a regime filter may help when ranging conditions dominate.
Fast adaptation can widen the stop — Higher Adaptation Speed means faster volatility response, not guaranteed proximity to price.
Direction-conditioned memory — A bullish or bearish outlier remains in its own profile until enough matching-direction samples replace it, which can create plateaux after shocks.
Warm-up and sample size — Long profile windows need sufficient chart history; strongly one-sided markets may leave one side with few recent samples.
🌸 --------- CREDITS --------- 🌸
💮 Academic Sources
Wilder, J. W. (1978). New Concepts in Technical Trading Systems . Trend Research.
Parkinson, M. (1980). The Extreme Value Method for Estimating the Variance of the Rate of Return. Journal of Business, 53 (1), 61–65. DOI
Garman, M. B., & Klass, M. J. (1980). On the Estimation of Security Price Volatilities from Historical Data. Journal of Business, 53 (1), 67–78. DOI
Rogers, L. C. G., & Satchell, S. E. (1991). Estimating Variance from High, Low and Closing Prices. Annals of Applied Probability, 1 (4), 504–512. DOI
Yang, D., & Zhang, Q. (2000). Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices. Journal of Business, 73 (3), 477–491. DOI
Ehlers, J. F. (2024). The Ultimate Smoother. Technical Analysis of Stocks & Commodities , 2024-04. TASC
Ehlers, J. F. (2004). Cybernetic Analysis for Stocks and Futures . Wiley. Covers SuperSmoother, MAMA and more.
💮 Inspiration
Thanks to Trendoscope for inspiring us with the Supertrend - Ladder ATR (2021). It derives long-side stop distance from bearish-candle ATR and short-side distance from bullish-candle ATR, which is one of the mechanisms that we tried to develop further with the KTE.
💮 Libraries Used
FiltersToolkit — Ultimate Smoother, Super Smoother, BiQuad, ADXvma, MAMA, and A2RMA
VolatilityToolkit — Parkinson, Garman-Klass, Rogers-Satchell, and Yang-Zhang estimators
MathTransform — Logarithmic scaling for Adaptation Speed
ColourUtilities — Palette management and light/dark-mode colour adjustment
Gösterge

Gösterge
