OPEN-SOURCE SCRIPT
Intraday Refuges/Shelters (RID)

==========================================
RID (INTRADAY SHELTERS/REFUGES) INDICATOR
==========================================
*Fair warning: this may be more words than a humble, simple indicator truly
needs… but Claude insisted.
// ** INTRODUCTION ** //
RID (Intraday Shelters/Refuges) is a lightweight, fast, and easy-to-implement
indicator designed for monitoring price action on intraday timeframes — the same
ones used by institutional operators to execute their trades within each market session.
The indicator generates a framework of support and resistance levels automatically
calculated from the asset's Daily Opening Price (D.O.P.). These levels are established
using fixed percentages that have proven their effectiveness in institutional trading
for decades, constituting "textbook" references widely adopted by market professionals.
RID integrates as an optional module within our Weekly Shelters (RS) indicator, allowing
the operator to simultaneously control their weekly positions and, when conditions warrant,
move down to intraday operations without loading additional indicators or losing sight
of the higher timeframe.
// ** INDICATOR FUNDAMENTALS ** //
The foundation of RID rests on a proven market principle: the daily opening price acts
as a "psychological anchor" that influences participant behavior throughout the entire session.
Why does this method work?
• UNIVERSAL REFERENCE POINT: The daily opening price is objective data, visible to all
market participants simultaneously. Institutions, algorithms, and retail traders use it
as a common reference to calibrate their decisions.
• STANDARD PERCENTAGE LEVELS: The percentages used (0.382%, 1.0%, 1.5%, 2.0%, 2.5% and
extensions) are not arbitrary. They represent intraday volatility thresholds that have
historically acted as inflection points across multiple asset classes.
• SELF-FULFILLING PROPHECY EFFECT: When a critical mass of operators place orders at the
same percentage levels —whether for profit-taking, protective stops, or entries—
these levels become high-probability price reaction zones.
• INSTITUTIONAL RISK MANAGEMENT: Institutional trading desks frequently define their daily
loss limits and profit targets in percentage terms relative to the open. RID captures
this logic and makes it visible for retail operators.
The ±0.382% level deserves special mention: it's a derivation of the Fibonacci golden ratio
(0.382) applied to the intraday context, representing the first significant movement threshold
from the opening.
// ** INDICATOR OBJECTIVES ** //
1) Facilitate manual intraday trade execution by providing a framework of target prices
established under a scheme of mathematical certainty, eliminating subjectivity in
defining entries, exits, and stops.
2) Serve as a lightweight and modular tool, easily integrable —either as an overlay or
source code— with strategies and indicators specialized in intraday trade execution,
both manual and automated.
3) Provide a visual reference framework that allows the operator to quickly assess the
intraday market "temperature": Is price near a key support or resistance? Has it already
reached the session's typical movement target? Is it time to seek entries or protect profits?
// ** INDICATOR TECHNICAL FEATURES ** //
• 21 CONFIGURABLE LEVELS: 11 main levels (±0.382%, ±1.0%, ±1.5%, ±2.0%, ±2.5% and D.O.P.)
plus 10 extended levels (±3.0% to ±5.0%) for high volatility sessions. Each level can
be individually enabled or disabled according to operator needs.
• AUTOMATIC D.O.P. DETECTION: The indicator automatically identifies the start of each daily
session and captures the opening price without user intervention.
• CONFIGURABLE HISTORY LIMIT: Option to limit processing to the last N days (default: 3),
optimizing performance on very low timeframes (1m, 5m) where excess historical data can
slow down the chart.
• PROFESSIONAL VISUALIZATION: Labels with formatted price (thousands separators) and
percentage, placeable with configurable offset. The D.O.P. level (0%) is highlighted
with differentiated width.
• VERTICAL REFERENCE LINES: From D.O.P. to each level, facilitating visualization of the
percentage distance traveled.
• FULL CUSTOMIZATION: Colors, widths, line styles (solid, dashed, dotted), label opacity,
and forward extension fully adjustable.
• PRICE SCALE INTEGRATION: Levels can be displayed on the right margin of TradingView,
controllable from the indicator's Style tab.
• BAR REPLAY COMPATIBILITY: Works perfectly with Bar Replay for back-testing
intraday strategies.
• OPTIMIZED PERFORMANCE: Efficient architecture with persistent arrays and intelligent
updating, suitable for timeframes down to 1 minute.
// ** OPERATING INSTRUCTIONS ** //
INITIAL SETUP:
1) Load the indicator on a chart with 4H or lower timeframe (1H, 30m, 15m, 5m, 1m).
2) Enable "Limit history by days" and adjust "Maximum days to display" according to your needs:
• For scalping (1m-5m): 1-2 days
• For day trading (15m-1H): 2-3 days
• For intraday swing (4H): 3-5 days
OPERATIONAL USE:
3) Identify the D.O.P. (0% line): This is your central reference point for the session.
4) Observe current price position relative to levels:
• Price above D.O.P. → Session with bullish bias
• Price below D.O.P. → Session with bearish bias
5) Use levels as:
• ENTRIES: Look for reversal signals when price reaches S1-S5 (buys) or R1-R5 (sells)
• TARGETS: Set take-profits at the next resistance level (longs) or support (shorts)
• STOPS: Place protective stops beyond the immediate opposite level
PRACTICAL RULES:
6) The ±1.0% and ±2.0% levels are historically most respected; prioritize them.
7) If price exceeds ±2.5% from open, it might be time to take profits and close your position
or consider enabling extended levels (±3.0% to ±5.0%).
8) High volatility days (news, earnings): wait for price to respect at least one level
before trading in its direction.
9) Combine RID with other indicators from our ecosystem (RS, RMP, RLP/RLPS) to confirm level
confluence across multiple timeframes.
VISUAL OPTIMIZATION:
10) For clean charts: keep enabled only main levels (±0.382% to ±2.5%).
11) For detailed volatile asset analysis: also enable extended levels.
12) Adjust "Label margin" to prevent overlap with current price.
// ** INTEGRATION WITH OTHER SHELTER VALUE INDICATORS ** //
RID is part of a complete shelter-based analysis ecosystem we have developed:
• RLP (Long-Term Shelters): For automatic determination of the preponderant phase
of a Zigzag, which institutional investors choose as the base of a Fibo whose
levels calculate order placement projection over the following months and years.
• RLPS (Simplified Long-Term Shelters): Simplified version of RLP where known
coordinates of the preponderant phase are captured, obtained through own analysis
or automatically with the RLP indicator.
• RMP (Medium-Term Shelters): Provides psychological shelter and resistance levels
that institutional investors establish at the beginning of each year. They
constitute the main framework used by professionals to plan operations
throughout the year.
• RS (Weekly Shelters): For short-term tactical analysis (4H, 1H) based on selected
phases of one or two Zigzags that define Fibo tracing, over recent major and minor
degree pauses, whose levels take effect during the current and following weeks.
• RID (Intraday Shelters): This indicator. For intraday operations based on levels
calculated from daily opening price, designed for 4H or lower timeframes,
including scalping strategies.
By combining RID with RLP/RLPS, RMP and RS, a multilevel scaffolding is built that
allows trading with clarity on any time horizon, from minute positions to operations
projected over months and years.
// ** NOTES ** //
• All comments regarding detected errors and improvement suggestions are welcome and deeply appreciated. Your feedback helps us refine these tools.
• To our Hispanic speaking friends, we sincerely regret to inform you that we have not
included the Spanish translation in the published version, due to our latent concern
regarding the ambiguous rules about prohibitions on publishing indicators documented
or described in languages other than English.
• Sharing is motivating because there’s no better way to receive genuine feedback
of real acceptance.
• RECOMMENDED VALIDATION METHOD: Use TradingView's Bar Replay to verify, session by
session, how price of your favorite asset interacts with RID levels. This personal
validation will give you statistical confidence before incorporating the indicator
into your actual trading.
Happy hunting in this magnificent jungle!
RID (INTRADAY SHELTERS/REFUGES) INDICATOR
==========================================
*Fair warning: this may be more words than a humble, simple indicator truly
needs… but Claude insisted.
// ** INTRODUCTION ** //
RID (Intraday Shelters/Refuges) is a lightweight, fast, and easy-to-implement
indicator designed for monitoring price action on intraday timeframes — the same
ones used by institutional operators to execute their trades within each market session.
The indicator generates a framework of support and resistance levels automatically
calculated from the asset's Daily Opening Price (D.O.P.). These levels are established
using fixed percentages that have proven their effectiveness in institutional trading
for decades, constituting "textbook" references widely adopted by market professionals.
RID integrates as an optional module within our Weekly Shelters (RS) indicator, allowing
the operator to simultaneously control their weekly positions and, when conditions warrant,
move down to intraday operations without loading additional indicators or losing sight
of the higher timeframe.
// ** INDICATOR FUNDAMENTALS ** //
The foundation of RID rests on a proven market principle: the daily opening price acts
as a "psychological anchor" that influences participant behavior throughout the entire session.
Why does this method work?
• UNIVERSAL REFERENCE POINT: The daily opening price is objective data, visible to all
market participants simultaneously. Institutions, algorithms, and retail traders use it
as a common reference to calibrate their decisions.
• STANDARD PERCENTAGE LEVELS: The percentages used (0.382%, 1.0%, 1.5%, 2.0%, 2.5% and
extensions) are not arbitrary. They represent intraday volatility thresholds that have
historically acted as inflection points across multiple asset classes.
• SELF-FULFILLING PROPHECY EFFECT: When a critical mass of operators place orders at the
same percentage levels —whether for profit-taking, protective stops, or entries—
these levels become high-probability price reaction zones.
• INSTITUTIONAL RISK MANAGEMENT: Institutional trading desks frequently define their daily
loss limits and profit targets in percentage terms relative to the open. RID captures
this logic and makes it visible for retail operators.
The ±0.382% level deserves special mention: it's a derivation of the Fibonacci golden ratio
(0.382) applied to the intraday context, representing the first significant movement threshold
from the opening.
// ** INDICATOR OBJECTIVES ** //
1) Facilitate manual intraday trade execution by providing a framework of target prices
established under a scheme of mathematical certainty, eliminating subjectivity in
defining entries, exits, and stops.
2) Serve as a lightweight and modular tool, easily integrable —either as an overlay or
source code— with strategies and indicators specialized in intraday trade execution,
both manual and automated.
3) Provide a visual reference framework that allows the operator to quickly assess the
intraday market "temperature": Is price near a key support or resistance? Has it already
reached the session's typical movement target? Is it time to seek entries or protect profits?
// ** INDICATOR TECHNICAL FEATURES ** //
• 21 CONFIGURABLE LEVELS: 11 main levels (±0.382%, ±1.0%, ±1.5%, ±2.0%, ±2.5% and D.O.P.)
plus 10 extended levels (±3.0% to ±5.0%) for high volatility sessions. Each level can
be individually enabled or disabled according to operator needs.
• AUTOMATIC D.O.P. DETECTION: The indicator automatically identifies the start of each daily
session and captures the opening price without user intervention.
• CONFIGURABLE HISTORY LIMIT: Option to limit processing to the last N days (default: 3),
optimizing performance on very low timeframes (1m, 5m) where excess historical data can
slow down the chart.
• PROFESSIONAL VISUALIZATION: Labels with formatted price (thousands separators) and
percentage, placeable with configurable offset. The D.O.P. level (0%) is highlighted
with differentiated width.
• VERTICAL REFERENCE LINES: From D.O.P. to each level, facilitating visualization of the
percentage distance traveled.
• FULL CUSTOMIZATION: Colors, widths, line styles (solid, dashed, dotted), label opacity,
and forward extension fully adjustable.
• PRICE SCALE INTEGRATION: Levels can be displayed on the right margin of TradingView,
controllable from the indicator's Style tab.
• BAR REPLAY COMPATIBILITY: Works perfectly with Bar Replay for back-testing
intraday strategies.
• OPTIMIZED PERFORMANCE: Efficient architecture with persistent arrays and intelligent
updating, suitable for timeframes down to 1 minute.
// ** OPERATING INSTRUCTIONS ** //
INITIAL SETUP:
1) Load the indicator on a chart with 4H or lower timeframe (1H, 30m, 15m, 5m, 1m).
2) Enable "Limit history by days" and adjust "Maximum days to display" according to your needs:
• For scalping (1m-5m): 1-2 days
• For day trading (15m-1H): 2-3 days
• For intraday swing (4H): 3-5 days
OPERATIONAL USE:
3) Identify the D.O.P. (0% line): This is your central reference point for the session.
4) Observe current price position relative to levels:
• Price above D.O.P. → Session with bullish bias
• Price below D.O.P. → Session with bearish bias
5) Use levels as:
• ENTRIES: Look for reversal signals when price reaches S1-S5 (buys) or R1-R5 (sells)
• TARGETS: Set take-profits at the next resistance level (longs) or support (shorts)
• STOPS: Place protective stops beyond the immediate opposite level
PRACTICAL RULES:
6) The ±1.0% and ±2.0% levels are historically most respected; prioritize them.
7) If price exceeds ±2.5% from open, it might be time to take profits and close your position
or consider enabling extended levels (±3.0% to ±5.0%).
8) High volatility days (news, earnings): wait for price to respect at least one level
before trading in its direction.
9) Combine RID with other indicators from our ecosystem (RS, RMP, RLP/RLPS) to confirm level
confluence across multiple timeframes.
VISUAL OPTIMIZATION:
10) For clean charts: keep enabled only main levels (±0.382% to ±2.5%).
11) For detailed volatile asset analysis: also enable extended levels.
12) Adjust "Label margin" to prevent overlap with current price.
// ** INTEGRATION WITH OTHER SHELTER VALUE INDICATORS ** //
RID is part of a complete shelter-based analysis ecosystem we have developed:
• RLP (Long-Term Shelters): For automatic determination of the preponderant phase
of a Zigzag, which institutional investors choose as the base of a Fibo whose
levels calculate order placement projection over the following months and years.
• RLPS (Simplified Long-Term Shelters): Simplified version of RLP where known
coordinates of the preponderant phase are captured, obtained through own analysis
or automatically with the RLP indicator.
• RMP (Medium-Term Shelters): Provides psychological shelter and resistance levels
that institutional investors establish at the beginning of each year. They
constitute the main framework used by professionals to plan operations
throughout the year.
• RS (Weekly Shelters): For short-term tactical analysis (4H, 1H) based on selected
phases of one or two Zigzags that define Fibo tracing, over recent major and minor
degree pauses, whose levels take effect during the current and following weeks.
• RID (Intraday Shelters): This indicator. For intraday operations based on levels
calculated from daily opening price, designed for 4H or lower timeframes,
including scalping strategies.
By combining RID with RLP/RLPS, RMP and RS, a multilevel scaffolding is built that
allows trading with clarity on any time horizon, from minute positions to operations
projected over months and years.
// ** NOTES ** //
• All comments regarding detected errors and improvement suggestions are welcome and deeply appreciated. Your feedback helps us refine these tools.
• To our Hispanic speaking friends, we sincerely regret to inform you that we have not
included the Spanish translation in the published version, due to our latent concern
regarding the ambiguous rules about prohibitions on publishing indicators documented
or described in languages other than English.
• Sharing is motivating because there’s no better way to receive genuine feedback
of real acceptance.
• RECOMMENDED VALIDATION METHOD: Use TradingView's Bar Replay to verify, session by
session, how price of your favorite asset interacts with RID levels. This personal
validation will give you statistical confidence before incorporating the indicator
into your actual trading.
Happy hunting in this magnificent jungle!
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.