OPEN-SOURCE SCRIPT
Diupdate

ATR Structure Trail Pro & Range Filter (v6)

14 671
📌 ATR Structure Trail Pro & Range Filter (v6)
Multi-purpose trend-following and consolidation detection tool
🔍 Overview

This indicator combines structure pivots, an ATR-based trailing stop, range detection, and clean visual signals to identify trend shifts and potential trade zones.
It is designed for traders who want simple, clean structure reading without unnecessary chart noise.

This indicator does not guarantee profit and is intended for educational and analytical purposes only, serving as a visual aid for reading price action.

⚙️ Main Components
1️⃣ Structure Pivot Flip (Trend Change Detection)

The indicator uses Pivot High / Pivot Low structure to detect when price creates:

Higher High → BUY bias

Lower Low → SELL bias

When a structural flip occurs:

a green arrow appears (potential bullish setup)

or a red arrow appears (potential bearish setup)

These arrows are not trade signals, but visual markers highlighting a shift in market context.

2️⃣ ATR Trail Stop (Adaptive Trend Line)

The ATR trail line automatically adapts to market volatility:

green during bullish phases

red during bearish phases

The ATR multiplier determines how far the dynamic trail is placed relative to price.
The trail line is not a guaranteed exit level — it acts as a dynamic structural reference.

3️⃣ Range/Box Zones (Consolidation Filter)

When the indicator detects that price is entering a tight consolidation range based on ATR and recent volatility, it draws a box zone:

blue in bullish context

purple in bearish context

Range zones indicate low-risk/no-trade areas where entries are typically avoided according to price action logic.

🎯 Trading Logic (Non-Signaling)

This indicator is not a trading system.

It visually highlights:

✔ structure
✔ trend
✔ volatility
✔ consolidation
✔ potential reversals

Users make trading decisions independently of these visual elements.

🧩 Inputs & Customization

You can fully customize:

ATR length & multiplier

Pivot sensitivity

Box fill and border colors

ATR trail color, width, and style (solid/dashed/dotted)

Visibility of all components individually

The indicator works across all timeframes and instruments.

💡 How to Use

Use arrows as informational markers of structure change

Use the ATR trail as a dynamic guide for current trend

Use range boxes to avoid entries during consolidation

Combine it with your own price action analysis, EMA/Kijun lines, session opens, or volume levels

⚠️ Important Notes

This indicator provides no performance guarantees

Not financial advice or a trading signal

Users are responsible for their own testing and application

Intended strictly for educational and analytical use in compliance with TradingView’s rules

📬 Author Notes

If you find this indicator useful, feel free to leave a comment or suggestion for future improvements.
All inputs are open for expansion and further development.
Catatan Rilis
Data change on default settings
Catatan Rilis
✅ New Feature: After Bar Close (No-Repaint Signals)

Added a new “Signals After Bar Close” option that ensures all BUY/SELL flip signals appear only after the candle has fully closed.
This removes intrabar noise and prevents early or false signals during candle formation.

✔️ No repainting
✔️ No signal jumping while the bar is forming
✔️ Flip signals, arrows, and box creation trigger only on confirmed bars
Catatan Rilis
another small addition:
✅ New Feature: Higher Timeframe Mode (HTF Signals)

The indicator can now calculate all signals, ATR trail, and structure on a higher timeframe (1H, 4H, etc.) while you trade on a lower timeframe such as 15m.
This provides clearer trend direction, reduced noise, and more reliable intraday filtering.

✔️ HTF flip signals
✔️ HTF ATR trail
✔️ More stable and cleaner trend visualization
Catatan Rilis
visual adaptation of initial colors for easier chart viewing
Catatan Rilis
📌 Update: Improved Signal Filtering (Trend-Aligned Signals Only)

This update adds a clean and precise signal filter:

BUY signals appear only on bullish candles

SELL signals appear only on bearish candles

Doji candles are ignored (no signals)

This removes unnecessary pullback signals inside a trend and keeps only clean, trend-aligned confirmations.

⚠️ Important:
This filter works only when the chart timeframe matches the indicator’s Signal Timeframe (TF).
If you use a higher-timeframe signal (e.g., 1H signals on a 15m chart), the bullish/bearish candle filter cannot be applied.
Catatan Rilis
🔄 Update — Range Logic Improved + Trade Box Reset

This update connects Range Detect parameters to actual box behavior.

✅ Top Range Detect Bars and Range Width (<= xATR) now actively control RANGE detection
✅ Separate Range Box is drawn during consolidation
✅ Trade Box automatically resets when price enters a range
✅ Trade signals are suppressed inside range
✅ ATR Trail remains the main directional filter (aligned mode)

Range detection can now be adjusted down to 3 bars for faster compression recognition.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.