OPEN-SOURCE SCRIPT

Efficient Trend Step [Noise Detection]

866
Efficient Trend Step [Noise Detection]

Overview
快照

Efficient Trend Step [Noise Detection] is a trend-following indicator designed to identify directional market changes while filtering some short-term price fluctuations and unusually large price movements.

The indicator calculates an adaptive step level using market efficiency, volatility measurements, and ATR-based thresholds. The step line updates when price moves beyond the required confirmation level, helping traders distinguish directional movement from periods of consolidation.

The indicator also includes trend-colored candles, a directional gradient, and optional Buy/Sell labels when the detected trend direction reverses.

1. MAIN FEATURES

  • Adaptive Trend Step: Calculates a step level using market efficiency and volatility measurements.
  • Noise Detection: Identifies low-efficiency conditions where price movement shows limited net directional progress.
  • Spike Detection: Detects unusually large single-bar movements using ATR and average price movement.
  • ATR-Based Confirmation: Requires price to cross a confirmation threshold before changing the detected direction.
  • Trend-Step Line: Displays a stepped trend line that changes color according to the detected direction.
  • Trend Gradient Candles: Colors candles according to the relationship between price and the trend step, normalized by ATR and smoothed with an EMA.
  • Buy/Sell Labels: Optionally displays labels when the detected direction changes from bearish to bullish or bullish to bearish.
  • Customizable Settings: Adjust the efficiency period, volatility lengths, noise thresholds, reversal confirmation, gradient smoothness, and colors.


2. HOW THE INDICATOR WORKS

Market Efficiency

The indicator compares net price movement over a selected period with the sum of absolute price changes over that period. This produces an efficiency ratio between 0 and 1 when valid data is available.

Higher efficiency indicates that price has made more directional progress relative to its total movement. Lower efficiency indicates choppier movement.

Volatility-Adaptive Step Size

The indicator combines the efficiency ratio with fast and slow standard-deviation measurements. It then compares this value with an ATR-based minimum step size.

The resulting step size adapts to market conditions rather than relying on a single fixed price distance.

Noise and Spike Detection

Two separate checks are used:

  • Low-Efficiency Detection: Identifies conditions where the efficiency ratio falls below the configured minimum.
  • Spike Detection: Identifies a single-bar close-to-close movement that exceeds both the ATR-based threshold and the average-movement threshold.


When a spike is detected, the indicator holds the previous step and direction for that bar. Low-efficiency conditions can also prevent certain trend-direction changes.

Trend Confirmation

The indicator calculates upper and lower thresholds around the previous step using the adaptive step size and an additional ATR-based reversal-confirmation distance.

A bullish direction is registered when the selected source crosses above the upper threshold and the noise conditions permit the change. A bearish direction is registered when the source crosses below the lower threshold and the noise conditions permit the change.

Otherwise, the previous step and direction are maintained.

3. INPUT SETTINGS

Trend Settings

  • Efficiency Length — Default: 100
    Determines the lookback period used to calculate market efficiency.
  • Fast Volatility Length — Default: 50
    Sets the shorter standard-deviation calculation period.
  • Slow Volatility Length — Default: 200
    Sets the longer standard-deviation calculation period.
  • Source — Default: Close
    Selects the price series used by the trend calculations.


Noise Detection

  • ATR Length — Default: 14
    Sets the ATR period used for volatility and spike calculations.
  • ATR Step Multiplier — Default: 1.0
    Controls the ATR-based minimum step-size component.
  • Spike Detection Multiplier — Default: 2.5
    Controls the ATR threshold used to identify unusually large price movements.
  • Minimum Efficiency — Default: 0.15
    Sets the efficiency threshold below which price action is classified as choppy.


Trend Confirmation

  • Reversal Confirmation (ATR) — Default: 0.25
    Adds an ATR-based distance to the trend reversal thresholds. Increasing this value requires a larger price move before a direction change can be confirmed.


Bar Strength

  • Gradient Smoothness — Default: 5
    Controls the EMA smoothing applied to the normalized price-distance gradient used for candle coloring.


Appearance

The indicator includes customizable bullish, bearish, and neutral colors. These colors control the trend-step line, gradient presentation, and signal labels.

Buy / Sell Signals

  • Show Buy / Sell Labels — Default: Enabled
    Enables or disables labels when the detected direction changes.


4. CHART VISUALS

Trend-Step Line

  • Teal: Detected bullish direction.
  • Red: Detected bearish direction.
  • Gray: Neutral or uninitialized direction.


The line uses a stepped plotting style to emphasize changes in the calculated trend level.

Trend Gradient Candles

Candle colors are based on the normalized distance between the selected source and the trend step, using ATR to scale that distance. An EMA smooths the gradient.

The gradient transitions between the configured bullish, bearish, and neutral colors. It is a visual representation of price position relative to the trend step, not an independent prediction of future price.

Buy/Sell Labels

When enabled, a Buy label appears after the detected direction changes from bearish to bullish. A Sell label appears after it changes from bullish to bearish.

The label text displays the current trend-step value using TradingView's volume-formatting function. These labels represent changes in the indicator's calculated direction and should not be interpreted as guaranteed trade entries or exits.

5. SUGGESTED WORKFLOW

  • Start with the default settings to understand the indicator's behavior on your selected market and timeframe.
  • Adjust Efficiency Length and the fast/slow volatility lengths to change how the step responds to market conditions.
  • Use Minimum Efficiency to adjust how strongly low-efficiency conditions affect trend changes.
  • Adjust Spike Detection Multiplier to change the threshold for identifying unusually large price movements.
  • Modify Reversal Confirmation (ATR) to control the additional distance required for directional changes.
  • Adjust Gradient Smoothness to change the visual responsiveness of candle coloring.
  • Test settings across different market conditions before incorporating the indicator into a trading strategy.


6. IMPORTANT LIMITATIONS

This indicator is a technical-analysis tool. It does not guarantee trend continuation, identify every market reversal, or eliminate false signals.

Spike detection holds the previous step and direction on a detected spike bar, but it does not guarantee that all unusual price movements or market noise will be filtered.

The Buy/Sell labels indicate changes in the indicator's calculated direction. They are not broker orders, and the script does not execute trades or manage positions.

The indicator uses historical price and volatility data. Its calculations and displayed signals should be evaluated on the relevant chart timeframe and market. No profitability, accuracy, or future performance is guaranteed.

7. ACCESS AND USAGE

Efficient Trend Step [Noise Detection] is intended for technical analysis and chart-based trend interpretation.

Users should follow TradingView's applicable platform rules and the author's access terms. Do not redistribute protected script content or share invite-only access without authorization.

DISCLAIMER

This indicator is provided for informational and educational purposes only and does not constitute financial or investment advice. Trading financial markets involves risk, and losses are possible. Always conduct your own research and apply appropriate risk management. Past performance does not guarantee future results.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。