OPEN-SOURCE SCRIPT
Day-Type Detector — Rejection / FNL / Outside / StopRun (Clean)

Day-Type Detector — Rejection / FNL / Outside / Stop-Run (Clean Version)
This indicator identifies four high-impact candlestick day-types commonly used in professional price-action and auction-market trading: Rejection Days, Failed New Low (FNL) Days, Outside Days, and Stop-Run Days. These patterns often precede major directional moves, reversals, and absorption events, making them particularly valuable for swing traders, positional traders, and short-term discretionary traders.
The script is designed to work across all timeframes and is built around volatility-adjusted measurements using Average Daily Range (ADR) for accuracy and consistency.
What This Indicator Detects
1. Rejection Day (Bullish & Bearish)
A Rejection Day is a wide-range bar that rejects a previous extreme.
The indicator identifies rejection based on:
Range > ADR × threshold
Long lower wick (for bullish) or long upper wick (for bearish)
Close located in the strong zone of the day’s range
These conditions highlight areas where aggressive counter-orderflow entered the market.
2. Failed New Low (FNL) / Failed New High
An FNL day traps traders who attempted breakout selling or buying.
The indicator checks for:
A break beyond the previous session’s low or high
Immediate rejection back inside
Midpoint recapture conditions
ADR-normalized range requirements
These days often trigger powerful directional reversals.
3. Outside Day (Bullish & Bearish)
An Outside Day is a statistically significant expansion day that breaks both the previous high and low.
The script validates:
High > previous high and low < previous low
Range > ADR threshold
Close beyond prior session extreme to complete the rejection sequence
Outside Days often represent stop runs, shakeouts, or trend accelerations.
4. Stop-Run Day (Bullish & Bearish)
Stop-Run Days are aggressive volatility expansions and tend to be the largest ranges within short windows.
This detector identifies them using:
Range > ADR × multiplier
Close located near the extreme of the day (top for bullish, bottom for bearish)
Strong body relative to total range
Break above/below previous session extreme
These patterns indicate capitulation or forced liquidation and are often followed by continuation or sharp counter-rotation.
Key Features
✔ Historical Pattern Marking
All qualifying bars are marked on the chart using plotshape() in global scope, ensuring full historical visibility.
✔ Event Logging & Table Display
A table (top-right of the chart) displays the most recent pattern detections, including:
Timestamp
Pattern type
Bar index
This allows users to monitor and study past pattern occurrences without scanning the chart manually.
✔ ADR-Adjusted Detection
Volatility uncertainty is removed by anchoring all thresholds to ADR.
This ensures consistency across:
Different symbols
Different timeframes
Different market regimes
✔ Alerts Included
Alerts are preconfigured for:
Rejection Day Bull / Bear
FNL Bull / Bear
Outside Day Bull / Bear
Stop-Run Bull / Bear
This allows the user to receive real-time notifications when major day-type structures develop.
How to Use
Add the indicator to any timeframe chart.
Enable or disable:
Historical markers
History table
ADR diagnostics
Watch for shape markers or use alerts for real-time signals.
Use the history table to review recent occurrences.
Combine these day-types with:
Market structure levels
High/low volume nodes (LVNs)
Support/resistance zones
Trend context
These day-types are most effective when they occur near meaningful structural levels because they show where strong order-flow entered the market.
Best Practices
Use higher timeframes (1H–1D) for swing entries.
Confirm signals with market structure or volume profile.
Treat these day-types as context, not standalone signals.
Observe follow-through behavior in the next 1–3 bars after detection.
Credits
This script is based on concepts commonly seen in auction-market theory and professional price-action frameworks, such as Rejection Days, Failed New Lows, Outside Days, and Stop-Run behaviors.
All calculations and logic have been rebuilt from scratch to ensure clean, reliable, and optimized Pine Script v6 execution.
This indicator identifies four high-impact candlestick day-types commonly used in professional price-action and auction-market trading: Rejection Days, Failed New Low (FNL) Days, Outside Days, and Stop-Run Days. These patterns often precede major directional moves, reversals, and absorption events, making them particularly valuable for swing traders, positional traders, and short-term discretionary traders.
The script is designed to work across all timeframes and is built around volatility-adjusted measurements using Average Daily Range (ADR) for accuracy and consistency.
What This Indicator Detects
1. Rejection Day (Bullish & Bearish)
A Rejection Day is a wide-range bar that rejects a previous extreme.
The indicator identifies rejection based on:
Range > ADR × threshold
Long lower wick (for bullish) or long upper wick (for bearish)
Close located in the strong zone of the day’s range
These conditions highlight areas where aggressive counter-orderflow entered the market.
2. Failed New Low (FNL) / Failed New High
An FNL day traps traders who attempted breakout selling or buying.
The indicator checks for:
A break beyond the previous session’s low or high
Immediate rejection back inside
Midpoint recapture conditions
ADR-normalized range requirements
These days often trigger powerful directional reversals.
3. Outside Day (Bullish & Bearish)
An Outside Day is a statistically significant expansion day that breaks both the previous high and low.
The script validates:
High > previous high and low < previous low
Range > ADR threshold
Close beyond prior session extreme to complete the rejection sequence
Outside Days often represent stop runs, shakeouts, or trend accelerations.
4. Stop-Run Day (Bullish & Bearish)
Stop-Run Days are aggressive volatility expansions and tend to be the largest ranges within short windows.
This detector identifies them using:
Range > ADR × multiplier
Close located near the extreme of the day (top for bullish, bottom for bearish)
Strong body relative to total range
Break above/below previous session extreme
These patterns indicate capitulation or forced liquidation and are often followed by continuation or sharp counter-rotation.
Key Features
✔ Historical Pattern Marking
All qualifying bars are marked on the chart using plotshape() in global scope, ensuring full historical visibility.
✔ Event Logging & Table Display
A table (top-right of the chart) displays the most recent pattern detections, including:
Timestamp
Pattern type
Bar index
This allows users to monitor and study past pattern occurrences without scanning the chart manually.
✔ ADR-Adjusted Detection
Volatility uncertainty is removed by anchoring all thresholds to ADR.
This ensures consistency across:
Different symbols
Different timeframes
Different market regimes
✔ Alerts Included
Alerts are preconfigured for:
Rejection Day Bull / Bear
FNL Bull / Bear
Outside Day Bull / Bear
Stop-Run Bull / Bear
This allows the user to receive real-time notifications when major day-type structures develop.
How to Use
Add the indicator to any timeframe chart.
Enable or disable:
Historical markers
History table
ADR diagnostics
Watch for shape markers or use alerts for real-time signals.
Use the history table to review recent occurrences.
Combine these day-types with:
Market structure levels
High/low volume nodes (LVNs)
Support/resistance zones
Trend context
These day-types are most effective when they occur near meaningful structural levels because they show where strong order-flow entered the market.
Best Practices
Use higher timeframes (1H–1D) for swing entries.
Confirm signals with market structure or volume profile.
Treat these day-types as context, not standalone signals.
Observe follow-through behavior in the next 1–3 bars after detection.
Credits
This script is based on concepts commonly seen in auction-market theory and professional price-action frameworks, such as Rejection Days, Failed New Lows, Outside Days, and Stop-Run behaviors.
All calculations and logic have been rebuilt from scratch to ensure clean, reliable, and optimized Pine Script v6 execution.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。