OPEN-SOURCE SCRIPT

Sweep Trend Chop Filter (STCF)

131
Sweep Trend Chop Filter (STCF) is a price‑action trend tool that colors candles based on trend strength, momentum shifts, and chop conditions. It combines a 4‑MA stack with a CISD state‑machine to highlight true bullish/bearish moves while filtering out noise. A fast, visual trend filter for any timeframe.

Bullish: MA9 > MA18 ≥ MA27 ≥ MA50 → bars colored green
Bearish: MA9 < MA18 ≤ MA27 ≤ MA50 → bars colored red
Otherwise = Chop (yellow)

MA Stack (Primary Trend): Uses four moving averages (9/18/27/50) with a loosened stacking rule to identify trend bias.

CISD State (Momentum Confirmation): Confirms flips only on confirmed bars by tracking a red→green (bearish → bullish) or green→red (bullish → bearish) transition, then measuring follow‑through using the Noise Filter tolerance. When met, CISD can temporarily color bars even if the MA stack hasn’t aligned yet.
Full Candle Coloring: Bodies, wicks, and borders are colored for immediate visual clarity, with optional overlay of the 4 MAs.

Inputs

Noise Filter (0–1): Tighten/loosen CISD confirmation sensitivity (default 0.7).
Swing Period: For future extensions (placeholder).
MA Type: EMA (default) or SMA.
MA Lengths: 9 / 18 / 27 / 50 (editable).
Colors: Bullish, Bearish, Chop.
Toggle: Show/Hide MAs.

Tips & Notes
Go to Settings of Chart (not the indicator) and Disable Colored Body, Wick, and Outline.
Use STCF to stay with trend, avoid chop, and time transitions with CISD confirmation.
Best paired with higher‑timeframe confluence and risk controls.
No signals/alerts are fired—visual filter only.

免责声明

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