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.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.