OPEN-SOURCE SCRIPT
Güncellendi

SBP SBP Trend Phase Navigator

501
SBP Trend Phase Navigator

SBP Trend Phase Navigator is a rule-based technical analysis indicator designed to study directional trend phases and identify selected analytical setups when multiple chart conditions align.

Purpose and Component Integration

The indicator combines trend direction, adaptive smoothing, EMA alignment, ATR-normalized momentum, price structure, candle characteristics, optional relative volume, and volatility analysis.

These components are combined because they evaluate different aspects of price behaviour. Trend calculations provide directional context, momentum measures the strength of recent price movement relative to volatility, price structure evaluates movement beyond previous chart levels, and candle analysis examines the characteristics of the current bar.

The script processes these conditions within one rule-based framework rather than treating each component as an independent signal source.

Trend Analysis

The trend engine evaluates price in relation to a smoothed trend filter and measures the direction of the filter's slope.

A fast and slow EMA pair is used to assess directional alignment. The distance between these averages is normalized using Average True Range (ATR) and forms part of the trend-strength calculation.

A Hull-style adaptive average provides an additional directional reference. Its slope is evaluated together with the trend filter and EMA alignment when determining bullish or bearish trend conditions.

ATR-Normalized Momentum

Momentum is calculated from price change over a mode-dependent lookback period and divided by ATR.

This allows the script to evaluate recent directional price movement relative to the instrument's recent volatility rather than using absolute price movement alone.

Bullish and bearish momentum conditions are calculated separately.

Price Structure and Candle Analysis

The Price Structure Engine compares the current closing price with previous structure highs or lows over a selected lookback period.

The current setup candle is excluded from its own structure reference.

The Candle Quality Engine evaluates the candle body relative to the complete candle range and examines where the candle closes within that range. Bullish and bearish candle conditions are assessed separately.

Optional Relative Volume Analysis

The Relative Volume Filter compares current volume with its recent average where usable volume data is available.

This component is optional because volume characteristics can differ between symbols and markets.

When the volume filter is disabled, volume is excluded from both the score contribution and the available score denominator.

Volatility and Signal Distance

The volatility engine compares current ATR with its recent ATR average. The optional volatility filter can restrict setup markers when the ATR expansion ratio exceeds the selected maximum value.

The Maximum Signal Distance setting measures the distance between price and the Adaptive Average in ATR units. This condition can restrict primary setup markers when price is beyond the selected distance from the adaptive trend reference.

Normalized Quality Score

The indicator calculates separate bullish and bearish quality scores.

Trend strength and directional alignment form the core of the score. Momentum, candle characteristics, price structure, and relative volume contribute when their corresponding components are enabled.

The quality percentage is normalized according to the active scoring components. Disabling an optional component removes its contribution from the score calculation and the available score denominator.

The Aggressive, Balanced, and Conservative quality settings adjust the analytical thresholds used by the script. These settings control rule selectivity and do not represent an expected performance or success rate.

Trend Phase Lock

The Trend Phase Lock is used to control repeated same-direction setup markers.

Bullish and bearish trend conditions are counted over consecutive qualifying bars. A directional phase is established after the selected phase-confirmation requirement is met.

Temporary neutral or transition bars do not automatically reset the active phase.

After a primary BUY or SELL setup marker is generated, the active directional phase is marked as used. The primary setup engine does not generate another same-direction marker during that established phase.

A new primary setup becomes available after an opposite directional phase satisfies the script's phase-confirmation rules.

The Trend Phase Lock is a signal-frequency control mechanism. It does not predict future price direction.

Signal Frequency

The indicator provides Selective, Balanced, and Frequent signal-frequency settings.

Selective applies additional phase confirmation and higher quality requirements.

Balanced uses moderate phase and quality requirements.

Frequent uses less restrictive phase-confirmation and quality requirements.

These settings change the selectivity of the rule-based setup engine.

BUY and SELL Setup Labels

BUY and SELL labels identify bars where the enabled trend, momentum, structure, candle, volume, volatility, signal-distance, quality, and directional-phase conditions satisfy the selected settings.

The primary setup engine permits one setup marker per established directional phase.

When Signals On Bar Close is enabled, primary setup markers and related alert conditions are evaluated after the chart bar closes.

The labels represent rule-based analytical conditions generated by the script. They are not automated orders or guarantees of future price movement.

Early Transition Markers

Optional Early Transition Markers evaluate selected crossings of the trend filter together with trend slope, adaptive trend direction, EMA alignment, momentum direction, candle characteristics, volatility, and signal-distance conditions.

These markers are separate from the primary BUY and SELL setup engine. They do not reset the active phase or unlock another same-direction primary setup.

Early Transition Markers are disabled by default.

ATR Risk Guide and Dashboard

The optional ATR Risk Guide plots a volatility-based analytical reference around the Adaptive Average. It is a visual reference only and is not an automated order, strategy exit, or guaranteed stop level.

The optional dashboard displays the selected mode, signal-frequency setting, current trend state, active directional phase, phase-signal status, normalized quality score, market regime, and current setup state.

Modes and User Controls

The indicator provides SCALPING, INTRADAY, and SWING modes. These modes adjust the internal trend, adaptive-average, momentum, and price-structure lookback lengths.

Users can also control trend-strength, momentum, relative-volume, price-structure, candle-quality, and volatility filters through the indicator settings.

Important Information

SBP Trend Phase Navigator is an analytical and technical-analysis tool intended for educational and informational use.

The indicator evaluates chart data according to defined mathematical and rule-based conditions.

BUY and SELL labels identify analytical setups produced by the script's conditions. They do not constitute financial advice, automated trade execution, or guarantees of future market performance.

The script does not place or manage orders. Users are responsible for their own analysis, trading decisions, position sizing, and risk management.

Past performance does not guarantee future results.
Sürüm Notları
SBP Trend Phase Navigator is a rule-based analytical indicator designed for short-horizon market analysis. Its objective is to identify one qualified bullish or bearish setup during each confirmed directional phase while preventing repeated same-direction signals until the market establishes a new phase. Rather than combining several unrelated indicators, the script follows one integrated analytical workflow where every calculation contributes to a single signal-generation process.

The indicator evaluates trend direction, trend strength, momentum, candle quality, market structure, volatility, and confirmed swing context before issuing a BUY or SELL setup. Every signal must pass all qualification stages, helping filter low-quality opportunities during weak or unstable market conditions.

Methodology

The workflow begins by establishing market direction using a smoothed Trend Filter, a Hull-style Adaptive Trend average, and the relationship between fast and slow exponential moving averages. Trend strength is normalized using the Average True Range (ATR), allowing the indicator to adapt to changing market volatility rather than relying on fixed price movements.

After directional alignment is confirmed, the script evaluates several quality filters:

ATR-normalized momentum
Candle body strength and closing position
Break of prior market structure
Confirmed swing-pivot validation
Volatility filtering
Distance from the Adaptive Trend line

These measurements are combined into a normalized quality score. Depending on the selected Signal Quality profile, different minimum thresholds must be satisfied before a setup becomes eligible.

Phase Lock

A key feature of the indicator is its confirmed phase-lock mechanism. Consecutive bullish or bearish trend-qualified candles establish an active market phase. Once a BUY or SELL setup has been generated, another setup in the same direction cannot appear until the opposite directional phase has been confirmed.

This approach maintains a disciplined BUY → SELL → BUY → SELL sequence and helps eliminate repeated signals during the same market trend.

Swing Context

Confirmed swing highs and lows are used only as contextual validation and never generate independent trading signals.

For bullish setups, price must advance a minimum ATR-normalized distance from a recent confirmed swing low. For bearish setups, price must decline sufficiently from a confirmed swing high. Responsive, Balanced, and Conservative swing-context profiles adjust pivot sensitivity and confirmation requirements to suit different trading styles.

Trend Lines

The Adaptive Trend line is enabled by default and provides continuous visual feedback on short-term trend direction through automatic color changes based on slope. An optional Trend Filter offers an additional smoothed directional reference. Both trend lines can be customized using input settings for visibility, color, and width without affecting the underlying calculations.

Alerts and Confirmation

Primary BUY and SELL signals are evaluated only after the chart bar has closed, reducing false signals caused by intrabar price fluctuations. The indicator includes Bullish Setup, Bearish Setup, and Any Setup alerts, all based on the same final signal conditions displayed on the chart.

Important Notes

SBP Trend Phase Navigator is an analytical indicator, not a trading strategy. It does not execute trades, calculate position sizes, predict future prices, or guarantee profitable outcomes. Like all trend-following methods, performance depends on market conditions, symbol selection, timeframe, and proper risk management. The indicator is intended to assist analysis and should always be used alongside independent market evaluation and sound trading discipline.
Sürüm Notları
Trend Phase Navigator is a rule-based market-state indicator designed to identify qualified bullish and bearish directional events. It evaluates both turning points and continuation structures, then presents the accepted outcome through a single BUY or SELL label.

The script is intended to distinguish three broad types of market behaviour:

1. Swing reversal;
2. Trend continuation;
3. Accumulation or distribution breakout.

Only the final directional label is displayed on the chart. The internal state classification is used for signal qualification and is not plotted separately.

Original analytical framework

The indicator is built around an adaptive market-state framework rather than a simple crossover or isolated pivot rule.

Its phase equilibrium changes responsiveness according to price-path efficiency. Directional price movement causes the equilibrium to respond more quickly, while overlapping and irregular movement slows the response.

The framework evaluates:

- ATR-normalized displacement from phase equilibrium;
- equilibrium slope and slope acceleration;
- directional candle impulse and impulse velocity;
- price-path efficiency;
- range contraction, candle overlap and release;
- fast-versus-slow phase relationship;
- confirmed swing amplitude and recovery;
- accumulation and distribution shelves;
- bull-flag and bear-flag continuation structures;
- volatility conditions.

Market-state classification

The script classifies each accepted directional event into one of the following internal states.

Swing reversal

A confirmed pivot is evaluated through a Swing Quality Index. The score considers swing amplitude, recovery distance, directional impulse, impulse acceleration, compression release, price position and structural confirmation.

A pivot is not accepted merely because it exists. It must exceed the selected Minimum Swing Quality threshold.

Accumulation breakout

The script looks for a bullish market state, overlapping and compressed price action, and a breakout above the recent range. The breakout must satisfy the Minimum Continuation Quality threshold.

Distribution breakdown

The bearish equivalent looks for compressed price action within a bearish state and a confirmed break below the recent range.

Bull continuation

A bullish continuation signal can be generated when a controlled pullback forms inside an established bullish phase and price subsequently breaks above the pullback structure.

Bear continuation

A bearish continuation signal can be generated when a controlled recovery forms inside an established bearish phase and price subsequently breaks below the pullback structure.

Signal router

The internal market-state engine converts all qualified bullish events into BUY and all qualified bearish events into SELL.

Signals alternate strictly:

BUY, then SELL, then BUY.

Repeated signals in the same direction are not printed before an accepted opposite signal. The Minimum Signal Gap input also prevents accepted labels from clustering too closely.

Confirmed-bar behaviour

Signals are evaluated on confirmed bars. The script does not use request.security(), lookahead or future data.

Confirmed pivots naturally require right-side confirmation bars. A swing-reversal signal therefore becomes available only when the pivot and its quality conditions are known.

Inputs

Minimum Signal Gap controls the minimum number of bars between alternating signals.

Swing Context Strength controls the breadth of confirmed swing analysis. Higher values focus on broader structures.

Minimum Swing Quality controls how strong a confirmed pivot must be before it can qualify as a reversal.

Minimum Continuation Quality controls the strength required for continuation, accumulation and distribution signals.

Maximum ATR Expansion Ratio blocks signals when volatility is unusually expanded relative to its recent average.

Show BUY / SELL controls the visibility of signal labels.

Alerts

The indicator provides three alert conditions:

- Bullish Signal;
- Bearish Signal;
- Any Signal.

The alerts are based on the final accepted BUY and SELL conditions and therefore respect the market-state qualification, strict alternation and minimum signal gap.

How to use

Apply the indicator to a standard candlestick or bar chart. BUY and SELL labels are analytical observations and are not orders.

Users should independently determine entries, exits, stops, position size and risk limits. Settings should be evaluated on the intended symbol and timeframe because volatility and price structure vary across markets.

Limitations

No indicator can identify every market turning point or continuation structure. Confirmed-pivot signals include unavoidable confirmation delay. Compressed ranges may occasionally break temporarily before reversing. Sideways, low-liquidity and event-driven conditions can reduce signal quality.

Trend Phase Navigator is an indicator, not a strategy. It does not place trades, calculate profitability, provide position sizing or make performance guarantees.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.