PROTECTED SOURCE SCRIPT
Mid-Term Refuges / Refugios de Mediano Plazo (RMP)

═════════════════════════════════════════════════════════════
MID-TERM REFUGES (RMP) V1.0 - ENGLISH VERSION
═════════════════════════════════════════════════════════════
The Mid-Term Refuges (RMP) indicator is an essential tool for traders and investors who base their decisions on price action. Based on a proven methodology used by institutional investors since the days of auction floors, RMP plots psychological support and resistance levels that the market has consistently respected over decades.
═══════════════════════════════════════════
SOLID AND PROVEN METHODOLOGY
═══════════════════════════════════════════
RMP automatically calculates 31 key levels (refuges) based on the asset's annual opening price on the daily timeframe:
• RESISTANCES (R1 - R15): Projected by adding 10% intervals to the annual opening price, identifying zones where the price historically encounters selling pressure.
• SUPPORTS (S1 - S15): Calculated by subtracting 10% intervals from the opening price, marking levels where buyer interest traditionally emerges.
• ANNUAL OPENING PRICE (PA): The central level from which the entire refuge framework is constructed.
The simplicity of this technique is precisely its greatest strength: clear, objective levels that update automatically at the beginning of each year or when using the Bar Replay feature.
═══════════════════════════════════════════
WHY DOES THIS METHOD WORK?
═══════════════════════════════════════════
Financial markets are ecosystems where millions of operators participate, from retail traders to institutional funds. When a critical mass of participants uses the same reference levels, these become self-fulfilling prophecies: buy and sell orders concentrate at these levels, generating predictable price reactions.
The 10% refuges are not arbitrary. They represent significant psychological thresholds that capture moments of indecision, consolidation, or reversal in the market. A movement of 20%, 30%, or 50% from the annual opening is not trivial: it captures market attention and triggers risk management decisions.
═══════════════════════════════════════════
PRACTICAL APPLICATIONS
═══════════════════════════════════════════
RMP is particularly valuable for:
SWING TRADERS: Identifies optimal entry and exit points for trades that develop over weeks or months within the current year.
MID-TERM INVESTORS: Provides context to assess whether the current price is overextended or presents relative value opportunities.
RISK MANAGEMENT: Allows placing stops and targets at technically relevant levels, not at arbitrary points.
MULTI-TIMEFRAME ANALYSIS: Works perfectly on 1H, 4H, and Daily timeframes, maintaining constant values as long as historical data reaches the beginning of the year.
═══════════════════════════════════════════
VALIDATION: DO YOUR OWN BACKTESTING
═══════════════════════════════════════════
RMP's effectiveness varies depending on the asset you trade. Not all instruments are equally sensitive to these institutional levels. How can you know if RMP will work with your favorite assets?
Perform this simple exercise:
1. Activate TradingView's Bar Replay feature.
2. Go back to periods where your asset had movements greater than +/- 10%.
3. Observe how many times the price (OHLC) reacts, respects, or approaches the refuges.
4. The higher the frequency of matches, the greater the probability that institutional investors are using these levels with your asset.
This backtesting not only validates the tool but will give you statistical confidence to incorporate RMP into your trading plan.
═══════════════════════════════════════════
INTEGRATION WITH OTHER REFUGE INDICATORS
═══════════════════════════════════════════
RMP is part of a complete refuge-based analysis ecosystem:
• RLP (Long-Term Refuges): For automatic determination of the predominant phase of a Zigzag, which institutional investors choose as the basis for a Fibo whose levels calculate the projection for order placement over the following years.
• RLPS (Simplified Long-Term Refuges): Simplified version of RLP in which the known coordinates of the predominant phase are captured.
• RS (Weekly Refuges): For short-term tactical analysis (4H, 1H) based on chosen phases of a Zigzag that define the Fibo levels effective during the current week and the following 2 weeks.
By combining RMP with RLP/RLPS and RS, you obtain a multi-level framework that allows you to operate with clarity at any time horizon, from intraday positions to investments spanning months and years.
═══════════════════════════════════════════
PHILOSOPHY: PRICE ACTION, NOT DIVINATION
═══════════════════════════════════════════
RMP does not attempt to predict the future. Oscillators and complex algorithms try to anticipate movements based on past patterns, frequently falling into overfitting and false signals.
Our approach is different: we observe what the price does at objective levels and react accordingly. This is technical analysis in its purest and most honest form.
The only additional technique we have found consistently useful to complement refuges is the drawing of trend lines, which captures price direction and momentum in a visual and intuitive manner.
═══════════════════════════════════════════
HIGHLIGHTED TECHNICAL FEATURES
═══════════════════════════════════════════
• 31 CONFIGURABLE LEVELS: Activate or deactivate any refuge according to your needs.
• PROFESSIONAL VISUALIZATION: Labels with formatted price (thousand separators) and percentage.
• COMPLETE CUSTOMIZATION: Adjustable colors, widths, line styles, and opacities.
• FUTURE EXTENSION: Project lines forward to anticipate reaction zones.
• MARGIN LABELS: Native integration with TradingView's price scale.
• AUTOMATIC UPDATE: Levels recalculate at the beginning of each year.
• BAR REPLAY COMPATIBILITY: Works perfectly with the Bar Replay feature.
═══════════════════════════════════════════
IMPORTANT TECHNICAL CONSIDERATIONS
═══════════════════════════════════════════
Refuges remain constant and precise on 1 HOUR, 4 HOUR, and DAILY timeframes. On weekly timeframe, values may vary due to data compression; in that case, you will need to manually copy the levels if you wish to use them.
This limitation is not a defect, but a consequence of how TradingView handles historical data at different temporal resolutions.
═══════════════════════════════════════════
START TODAY
═══════════════════════════════════════════
RMP is the result of years of observation, iterative development, and refinement based on real market experience. It's not magic, it's method. It's not divination, it's preparation.
If you are a trader or investor who values clarity over complexity, objectivity over opinions, and price action over lagging indicators, RMP will transform how you interpret charts.
Download it, test it on your favorite assets, validate it with backtesting, and see for yourself why institutional investors have trusted these levels for decades.
═══════════════════════════════════════════
FINAL NOTE FOR CONSCIOUS INVESTORS
═══════════════════════════════════════════
As developers of RMP, we identify ourselves as "slow investors with average IQ." We are not mathematical geniuses nor do we have access to high-frequency algorithms. We are disciplined traders seeking simple and repeatable advantages in the market.
RMP is that advantage. It is our contribution to the TradingView community: a robust, transparent tool grounded in principles that have withstood the test of time.
Use it with discipline. Combine it with solid risk management. And may your trades always be conscious and planned.
════════════════════════════════════════════════════════════
Developed with Vibe Coding by: aj p'óolom máasewal
Coded by Claude Sonnet 4.5 from Anthropic
════════════════════════════════════════════════════════════
MID-TERM REFUGES (RMP) V1.0 - ENGLISH VERSION
═════════════════════════════════════════════════════════════
The Mid-Term Refuges (RMP) indicator is an essential tool for traders and investors who base their decisions on price action. Based on a proven methodology used by institutional investors since the days of auction floors, RMP plots psychological support and resistance levels that the market has consistently respected over decades.
═══════════════════════════════════════════
SOLID AND PROVEN METHODOLOGY
═══════════════════════════════════════════
RMP automatically calculates 31 key levels (refuges) based on the asset's annual opening price on the daily timeframe:
• RESISTANCES (R1 - R15): Projected by adding 10% intervals to the annual opening price, identifying zones where the price historically encounters selling pressure.
• SUPPORTS (S1 - S15): Calculated by subtracting 10% intervals from the opening price, marking levels where buyer interest traditionally emerges.
• ANNUAL OPENING PRICE (PA): The central level from which the entire refuge framework is constructed.
The simplicity of this technique is precisely its greatest strength: clear, objective levels that update automatically at the beginning of each year or when using the Bar Replay feature.
═══════════════════════════════════════════
WHY DOES THIS METHOD WORK?
═══════════════════════════════════════════
Financial markets are ecosystems where millions of operators participate, from retail traders to institutional funds. When a critical mass of participants uses the same reference levels, these become self-fulfilling prophecies: buy and sell orders concentrate at these levels, generating predictable price reactions.
The 10% refuges are not arbitrary. They represent significant psychological thresholds that capture moments of indecision, consolidation, or reversal in the market. A movement of 20%, 30%, or 50% from the annual opening is not trivial: it captures market attention and triggers risk management decisions.
═══════════════════════════════════════════
PRACTICAL APPLICATIONS
═══════════════════════════════════════════
RMP is particularly valuable for:
SWING TRADERS: Identifies optimal entry and exit points for trades that develop over weeks or months within the current year.
MID-TERM INVESTORS: Provides context to assess whether the current price is overextended or presents relative value opportunities.
RISK MANAGEMENT: Allows placing stops and targets at technically relevant levels, not at arbitrary points.
MULTI-TIMEFRAME ANALYSIS: Works perfectly on 1H, 4H, and Daily timeframes, maintaining constant values as long as historical data reaches the beginning of the year.
═══════════════════════════════════════════
VALIDATION: DO YOUR OWN BACKTESTING
═══════════════════════════════════════════
RMP's effectiveness varies depending on the asset you trade. Not all instruments are equally sensitive to these institutional levels. How can you know if RMP will work with your favorite assets?
Perform this simple exercise:
1. Activate TradingView's Bar Replay feature.
2. Go back to periods where your asset had movements greater than +/- 10%.
3. Observe how many times the price (OHLC) reacts, respects, or approaches the refuges.
4. The higher the frequency of matches, the greater the probability that institutional investors are using these levels with your asset.
This backtesting not only validates the tool but will give you statistical confidence to incorporate RMP into your trading plan.
═══════════════════════════════════════════
INTEGRATION WITH OTHER REFUGE INDICATORS
═══════════════════════════════════════════
RMP is part of a complete refuge-based analysis ecosystem:
• RLP (Long-Term Refuges): For automatic determination of the predominant phase of a Zigzag, which institutional investors choose as the basis for a Fibo whose levels calculate the projection for order placement over the following years.
• RLPS (Simplified Long-Term Refuges): Simplified version of RLP in which the known coordinates of the predominant phase are captured.
• RS (Weekly Refuges): For short-term tactical analysis (4H, 1H) based on chosen phases of a Zigzag that define the Fibo levels effective during the current week and the following 2 weeks.
By combining RMP with RLP/RLPS and RS, you obtain a multi-level framework that allows you to operate with clarity at any time horizon, from intraday positions to investments spanning months and years.
═══════════════════════════════════════════
PHILOSOPHY: PRICE ACTION, NOT DIVINATION
═══════════════════════════════════════════
RMP does not attempt to predict the future. Oscillators and complex algorithms try to anticipate movements based on past patterns, frequently falling into overfitting and false signals.
Our approach is different: we observe what the price does at objective levels and react accordingly. This is technical analysis in its purest and most honest form.
The only additional technique we have found consistently useful to complement refuges is the drawing of trend lines, which captures price direction and momentum in a visual and intuitive manner.
═══════════════════════════════════════════
HIGHLIGHTED TECHNICAL FEATURES
═══════════════════════════════════════════
• 31 CONFIGURABLE LEVELS: Activate or deactivate any refuge according to your needs.
• PROFESSIONAL VISUALIZATION: Labels with formatted price (thousand separators) and percentage.
• COMPLETE CUSTOMIZATION: Adjustable colors, widths, line styles, and opacities.
• FUTURE EXTENSION: Project lines forward to anticipate reaction zones.
• MARGIN LABELS: Native integration with TradingView's price scale.
• AUTOMATIC UPDATE: Levels recalculate at the beginning of each year.
• BAR REPLAY COMPATIBILITY: Works perfectly with the Bar Replay feature.
═══════════════════════════════════════════
IMPORTANT TECHNICAL CONSIDERATIONS
═══════════════════════════════════════════
Refuges remain constant and precise on 1 HOUR, 4 HOUR, and DAILY timeframes. On weekly timeframe, values may vary due to data compression; in that case, you will need to manually copy the levels if you wish to use them.
This limitation is not a defect, but a consequence of how TradingView handles historical data at different temporal resolutions.
═══════════════════════════════════════════
START TODAY
═══════════════════════════════════════════
RMP is the result of years of observation, iterative development, and refinement based on real market experience. It's not magic, it's method. It's not divination, it's preparation.
If you are a trader or investor who values clarity over complexity, objectivity over opinions, and price action over lagging indicators, RMP will transform how you interpret charts.
Download it, test it on your favorite assets, validate it with backtesting, and see for yourself why institutional investors have trusted these levels for decades.
═══════════════════════════════════════════
FINAL NOTE FOR CONSCIOUS INVESTORS
═══════════════════════════════════════════
As developers of RMP, we identify ourselves as "slow investors with average IQ." We are not mathematical geniuses nor do we have access to high-frequency algorithms. We are disciplined traders seeking simple and repeatable advantages in the market.
RMP is that advantage. It is our contribution to the TradingView community: a robust, transparent tool grounded in principles that have withstood the test of time.
Use it with discipline. Combine it with solid risk management. And may your trades always be conscious and planned.
════════════════════════════════════════════════════════════
Developed with Vibe Coding by: aj p'óolom máasewal
Coded by Claude Sonnet 4.5 from Anthropic
════════════════════════════════════════════════════════════
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Można z tego korzystać swobodnie i bez żadnych ograniczeń — więcej informacji znajduje się tutaj.
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 chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Można z tego korzystać swobodnie i bez żadnych ograniczeń — więcej informacji znajduje się tutaj.
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.