OPEN-SOURCE SCRIPT

MA20 ATR Trend Failure Filter

94
A volatility-adaptive filter designed to identify early trend invalidation.

This indicator combines a 20-period Moving Average (MA20) with Average True Range (ATR) to dynamically define a lower volatility boundary.
When price closes below this boundary, it signals that the current trend is no longer valid and risk is increasing.

Core Concept(核心思想)

MA defines the trend baseline

ATR measures current market volatility

MA − k × ATR forms a dynamic risk threshold

A close below this threshold = trend failure

👉 中文补充:
这不是反转指标,而是趋势失效过滤器,用于避免在趋势已经被破坏后继续持仓或加仓。

How It Works

Calculate MA20 as the trend reference

Calculate ATR(14) as volatility proxy

Build adaptive bands:

Upper Band = MA20 + k × ATR

Lower Band = MA20 − k × ATR

If close < Lower Band, trend is considered failed

The ATR multiplier k automatically adjusts the tolerance based on volatility, avoiding rigid fixed-percentage rules.

Visual Elements

Yellow line: MA20

Green band: MA20 + k × ATR

Red band: MA20 − k × ATR (key risk boundary)

Red triangle + “FAIL” label: Trend failure signal

Optional background shading to highlight risk zones

Typical Use Cases

Trend-following strategies (exit / reduce exposure)

Breakout strategies (filter false continuation)

Risk management overlay (non-intrusive, no repaint)

Combine with HMA, SuperTrend, structure-based entries

👉 中文补充:
非常适合作为**“不该再拿”的客观判断条件**,而不是频繁交易信号。

Why This Indicator

Volatility-adaptive (ATR-based)

No future data, no repaint

Simple logic, strong risk control

Works across stocks, crypto, futures, indices

This tool is designed to answer one question only:

Is the current trend still valid?

Parameters

MA Length (default: 20)

ATR Length (default: 14)

ATR Multiplier k (default: 0.8)

Lower k → stricter risk control
Higher k → more tolerance, fewer false signals 600595

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.