OPEN-SOURCE SCRIPT
N Candle UM Formations

N Candle UM Formations is a context-based candle analysis indicator designed to highlight indecision and potential exhaustion zones within an existing trend.
Instead of generating buy or sell signals, this tool focuses on market structure and behavior, helping traders identify areas where momentum may be weakening and attention is required.
🔹 Core Concept
The indicator:
Combines N candles into a single synthetic candle to reduce noise
Detects indecision-type candle structures, such as:
Doji candles
Pin bars (long wicks)
Small-bodied candles
Evaluates these candles only within a trend context
This approach avoids pattern memorization and focuses on where a candle appears, not just how it looks.
🔹 Color Logic
🟣 Purple candles
Indicate indecision near a pullback low within an uptrend
→ Possible seller exhaustion or accumulation area
🟠 Orange candles
Indicate indecision near a pullback high within a downtrend
→ Possible buyer exhaustion or distribution area
🟢 / 🔴 Green & Red candles
Represent normal momentum candles with no special context
🔹 Trend & Context Filters
Trend direction is defined using EMA-based structure
Pullback zones are evaluated relative to recent highs/lows with volatility tolerance
All calculations are close-based and non-repainting
🔹 How to Use
This indicator is not a standalone trading system.
It is best used as:
A context filter
A market awareness tool
A confirmation layer alongside:
RSI / TSI / Fisher
Volume analysis
Price action or structure breaks
When a purple or orange candle appears, traders are encouraged to seek confirmation from other tools before making decisions.
🔹 Key Philosophy
Context first, confirmation second.
This indicator helps traders focus on high-attention zones, not automated entries.
⚠️ Disclaimer
This tool does not provide financial advice and should not be used alone for trade execution.
Instead of generating buy or sell signals, this tool focuses on market structure and behavior, helping traders identify areas where momentum may be weakening and attention is required.
🔹 Core Concept
The indicator:
Combines N candles into a single synthetic candle to reduce noise
Detects indecision-type candle structures, such as:
Doji candles
Pin bars (long wicks)
Small-bodied candles
Evaluates these candles only within a trend context
This approach avoids pattern memorization and focuses on where a candle appears, not just how it looks.
🔹 Color Logic
🟣 Purple candles
Indicate indecision near a pullback low within an uptrend
→ Possible seller exhaustion or accumulation area
🟠 Orange candles
Indicate indecision near a pullback high within a downtrend
→ Possible buyer exhaustion or distribution area
🟢 / 🔴 Green & Red candles
Represent normal momentum candles with no special context
🔹 Trend & Context Filters
Trend direction is defined using EMA-based structure
Pullback zones are evaluated relative to recent highs/lows with volatility tolerance
All calculations are close-based and non-repainting
🔹 How to Use
This indicator is not a standalone trading system.
It is best used as:
A context filter
A market awareness tool
A confirmation layer alongside:
RSI / TSI / Fisher
Volume analysis
Price action or structure breaks
When a purple or orange candle appears, traders are encouraged to seek confirmation from other tools before making decisions.
🔹 Key Philosophy
Context first, confirmation second.
This indicator helps traders focus on high-attention zones, not automated entries.
⚠️ Disclaimer
This tool does not provide financial advice and should not be used alone for trade execution.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.