OPEN-SOURCE SCRIPT
已更新 @RSI_MATRIX@

RSI MATRIX
INDICATOR CONCEPT
RSI MATRIX was designed to use the RSI in a different way from its traditional representation.
Normally, RSI is displayed in a separate panel to identify momentum, weakness, overbought and oversold conditions.
RSI MATRIX transfers significant RSI events directly onto the price chart, transforming them into horizontal price levels that remain active over time.
The core concept is simple:
A significant RSI event identifies a potentially important price level. That level remains visible until the market confirms its breakout.
This allows the trader to simultaneously observe:
• RSI behavior
• Price levels generated by previous RSI events
• The relationship between current price and active levels
• Confirmed breakouts of those levels
RSI MATRIX is not designed to automatically predict future market direction. It is a market analysis and decision-support tool.
RSI SETTINGS
The indicator uses a fully configurable RSI.
Default configuration:
RSI Period: 14
High Threshold: 65
Low Threshold: 35
Mid Level: 50
These values can be customized in the indicator settings.
RSI SYMBOLS
🔴 ▼ RED DOWN TRIANGLE
The RSI was above the High threshold and crosses back below it.
With the default settings: RSI crosses back below 65.
This event creates a new horizontal ray at the LOW of the candle that generated the signal.
🟢 ▲ GREEN UP TRIANGLE
The RSI was below the Low threshold and crosses back above it.
With the default settings: RSI crosses back above 35.
This event creates a new horizontal ray at the HIGH of the candle that generated the signal.
🟣 ▲ PURPLE UP TRIANGLE
The RSI crosses above the High threshold.
With the default settings: RSI crosses above 65.
This indicates strong positive RSI momentum.
🟣 ▼ PURPLE DOWN TRIANGLE
The RSI crosses below the Low threshold.
With the default settings: RSI crosses below 35.
This indicates strong negative RSI momentum.
RSI 50 LEVEL
RSI MATRIX can optionally display RSI crossings of the central 50 level.
▲ RSI ABOVE 50
The RSI crosses from below to above 50, providing additional information about increasing positive momentum.
▼ RSI BELOW 50
The RSI crosses from above to below 50, providing additional information about increasing negative momentum.
These indications are optional and can be enabled or disabled in the indicator settings.
HORIZONTAL RSI RAYS
Horizontal rays are one of the main features of RSI MATRIX.
When RSI crosses back below the High threshold, the indicator creates a horizontal ray at the LOW of the candle that generated the event.
When RSI crosses back above the Low threshold, the indicator creates a horizontal ray at the HIGH of the candle that generated the event.
The rays extend to the right and remain visible on the chart.
This transforms a past RSI event into a price level that can be monitored in the future.
The trader can therefore observe how price behaves when it later approaches or interacts with these levels.
LINE HIERARCHY
RSI MATRIX includes an automatic visual hierarchy to make active levels easier to read.
Lines closer to the current price can be displayed more prominently, while older lines can gradually become less prominent.
The user can configure:
• Distance from price used to identify nearby lines
• Number of bars after which a line is considered old
• Width of nearby, normal and old lines
• Transparency of each category
This hierarchy only changes the visual appearance of the lines. It does not modify their underlying logic.
CONFIRMED BREAK
A simple intrabar movement beyond a horizontal ray is not sufficient to invalidate it.
RSI MATRIX uses candle closes to confirm a breakout.
When a level is broken according to the confirmation rules:
The BREAK is confirmed
The horizontal ray is deleted
A BREAK symbol can appear on the chart
An alert can be generated
This helps distinguish temporary intrabar penetration from a confirmed breakout.
AUTOMATIC BREAK CONFIRMATION
With Automatic Deletion enabled, RSI MATRIX automatically adapts its confirmation logic according to the timeframe.
M5 AND M15
A BREAK requires 2 closes beyond the line within a 3-bar window. The two closes do not necessarily need to be consecutive.
HIGHER TIMEFRAMES
A BREAK requires 2 consecutive closes beyond the line.
All confirmations are evaluated at candle close.
BREAK DIRECTION
▲ BREAK LONG
A horizontal ray has been broken and confirmed in the upward direction.
▼ BREAK SHORT
A horizontal ray has been broken and confirmed in the downward direction.
LONG and SHORT describe the direction of the confirmed breakout. They should not automatically be interpreted as buy or sell signals.
ALERTS
RSI MATRIX includes automatic alerts for confirmed BREAK events.
Example:
BREAK LONG | TF: M15 | Price: 1.16850
BREAK SHORT | TF: H1 | Price: 1.16520
Each alert contains the BREAK direction, timeframe and price at confirmation.
Alerts are generated at candle close, only after the BREAK confirmation conditions have been satisfied.
This prevents a temporary price movement during candle formation from being treated as a confirmed breakout.
RSI BOX
The current RSI value can be displayed in a box in the upper-right corner of the chart.
▲ RSI xx.x = RSI is greater than or equal to 50
▼ RSI xx.x = RSI is below 50
The box color changes accordingly, providing an immediate view of the current RSI condition without requiring a separate RSI panel.
PRACTICAL USE
RSI MATRIX can be used to create a dynamic map of price levels derived from previous RSI events.
RSI EVENT → LEVEL CREATION → LEVEL REMAINS ACTIVE → PRICE RETURNS → POSSIBLE CONFIRMED BREAK
The objective is not only to observe what RSI is doing now. RSI MATRIX preserves on the price chart the levels associated with previous significant RSI events.
Active horizontal rays represent levels that have not yet been invalidated according to the indicator's confirmation rules.
A confirmed BREAK indicates that price has satisfied the conditions required for that level to be considered broken.
QUICK SYMBOL GUIDE
🔴 ▼ Red Triangle → RSI crosses back below the High threshold → horizontal ray created at the candle LOW.
🟢 ▲ Green Triangle → RSI crosses back above the Low threshold → horizontal ray created at the candle HIGH.
🟣 ▲ Purple Triangle → RSI crosses above the High threshold.
🟣 ▼ Purple Triangle → RSI crosses below the Low threshold.
▲ RSI > 50 → RSI crosses above the central 50 level.
▼ RSI < 50 → RSI crosses below the central 50 level.
━━━━ Horizontal Ray → Price level generated by a previous RSI event and still active.
▲ BREAK LONG → Confirmed upward breakout of an active horizontal ray.
▼ BREAK SHORT → Confirmed downward breakout of an active horizontal ray.
IMPORTANT NOTICE
RSI MATRIX is a technical analysis tool and is not an automated trading system.
Symbols, horizontal rays and BREAK events should be interpreted within the context of market structure and the timeframe being analyzed.
BREAK LONG and BREAK SHORT indicate confirmed breakouts according to the indicator's rules and should not automatically be interpreted as buy or sell signals.
INDICATOR CONCEPT
RSI MATRIX was designed to use the RSI in a different way from its traditional representation.
Normally, RSI is displayed in a separate panel to identify momentum, weakness, overbought and oversold conditions.
RSI MATRIX transfers significant RSI events directly onto the price chart, transforming them into horizontal price levels that remain active over time.
The core concept is simple:
A significant RSI event identifies a potentially important price level. That level remains visible until the market confirms its breakout.
This allows the trader to simultaneously observe:
• RSI behavior
• Price levels generated by previous RSI events
• The relationship between current price and active levels
• Confirmed breakouts of those levels
RSI MATRIX is not designed to automatically predict future market direction. It is a market analysis and decision-support tool.
RSI SETTINGS
The indicator uses a fully configurable RSI.
Default configuration:
RSI Period: 14
High Threshold: 65
Low Threshold: 35
Mid Level: 50
These values can be customized in the indicator settings.
RSI SYMBOLS
🔴 ▼ RED DOWN TRIANGLE
The RSI was above the High threshold and crosses back below it.
With the default settings: RSI crosses back below 65.
This event creates a new horizontal ray at the LOW of the candle that generated the signal.
🟢 ▲ GREEN UP TRIANGLE
The RSI was below the Low threshold and crosses back above it.
With the default settings: RSI crosses back above 35.
This event creates a new horizontal ray at the HIGH of the candle that generated the signal.
🟣 ▲ PURPLE UP TRIANGLE
The RSI crosses above the High threshold.
With the default settings: RSI crosses above 65.
This indicates strong positive RSI momentum.
🟣 ▼ PURPLE DOWN TRIANGLE
The RSI crosses below the Low threshold.
With the default settings: RSI crosses below 35.
This indicates strong negative RSI momentum.
RSI 50 LEVEL
RSI MATRIX can optionally display RSI crossings of the central 50 level.
▲ RSI ABOVE 50
The RSI crosses from below to above 50, providing additional information about increasing positive momentum.
▼ RSI BELOW 50
The RSI crosses from above to below 50, providing additional information about increasing negative momentum.
These indications are optional and can be enabled or disabled in the indicator settings.
HORIZONTAL RSI RAYS
Horizontal rays are one of the main features of RSI MATRIX.
When RSI crosses back below the High threshold, the indicator creates a horizontal ray at the LOW of the candle that generated the event.
When RSI crosses back above the Low threshold, the indicator creates a horizontal ray at the HIGH of the candle that generated the event.
The rays extend to the right and remain visible on the chart.
This transforms a past RSI event into a price level that can be monitored in the future.
The trader can therefore observe how price behaves when it later approaches or interacts with these levels.
LINE HIERARCHY
RSI MATRIX includes an automatic visual hierarchy to make active levels easier to read.
Lines closer to the current price can be displayed more prominently, while older lines can gradually become less prominent.
The user can configure:
• Distance from price used to identify nearby lines
• Number of bars after which a line is considered old
• Width of nearby, normal and old lines
• Transparency of each category
This hierarchy only changes the visual appearance of the lines. It does not modify their underlying logic.
CONFIRMED BREAK
A simple intrabar movement beyond a horizontal ray is not sufficient to invalidate it.
RSI MATRIX uses candle closes to confirm a breakout.
When a level is broken according to the confirmation rules:
The BREAK is confirmed
The horizontal ray is deleted
A BREAK symbol can appear on the chart
An alert can be generated
This helps distinguish temporary intrabar penetration from a confirmed breakout.
AUTOMATIC BREAK CONFIRMATION
With Automatic Deletion enabled, RSI MATRIX automatically adapts its confirmation logic according to the timeframe.
M5 AND M15
A BREAK requires 2 closes beyond the line within a 3-bar window. The two closes do not necessarily need to be consecutive.
HIGHER TIMEFRAMES
A BREAK requires 2 consecutive closes beyond the line.
All confirmations are evaluated at candle close.
BREAK DIRECTION
▲ BREAK LONG
A horizontal ray has been broken and confirmed in the upward direction.
▼ BREAK SHORT
A horizontal ray has been broken and confirmed in the downward direction.
LONG and SHORT describe the direction of the confirmed breakout. They should not automatically be interpreted as buy or sell signals.
ALERTS
RSI MATRIX includes automatic alerts for confirmed BREAK events.
Example:
BREAK LONG | TF: M15 | Price: 1.16850
BREAK SHORT | TF: H1 | Price: 1.16520
Each alert contains the BREAK direction, timeframe and price at confirmation.
Alerts are generated at candle close, only after the BREAK confirmation conditions have been satisfied.
This prevents a temporary price movement during candle formation from being treated as a confirmed breakout.
RSI BOX
The current RSI value can be displayed in a box in the upper-right corner of the chart.
▲ RSI xx.x = RSI is greater than or equal to 50
▼ RSI xx.x = RSI is below 50
The box color changes accordingly, providing an immediate view of the current RSI condition without requiring a separate RSI panel.
PRACTICAL USE
RSI MATRIX can be used to create a dynamic map of price levels derived from previous RSI events.
RSI EVENT → LEVEL CREATION → LEVEL REMAINS ACTIVE → PRICE RETURNS → POSSIBLE CONFIRMED BREAK
The objective is not only to observe what RSI is doing now. RSI MATRIX preserves on the price chart the levels associated with previous significant RSI events.
Active horizontal rays represent levels that have not yet been invalidated according to the indicator's confirmation rules.
A confirmed BREAK indicates that price has satisfied the conditions required for that level to be considered broken.
QUICK SYMBOL GUIDE
🔴 ▼ Red Triangle → RSI crosses back below the High threshold → horizontal ray created at the candle LOW.
🟢 ▲ Green Triangle → RSI crosses back above the Low threshold → horizontal ray created at the candle HIGH.
🟣 ▲ Purple Triangle → RSI crosses above the High threshold.
🟣 ▼ Purple Triangle → RSI crosses below the Low threshold.
▲ RSI > 50 → RSI crosses above the central 50 level.
▼ RSI < 50 → RSI crosses below the central 50 level.
━━━━ Horizontal Ray → Price level generated by a previous RSI event and still active.
▲ BREAK LONG → Confirmed upward breakout of an active horizontal ray.
▼ BREAK SHORT → Confirmed downward breakout of an active horizontal ray.
IMPORTANT NOTICE
RSI MATRIX is a technical analysis tool and is not an automated trading system.
Symbols, horizontal rays and BREAK events should be interpreted within the context of market structure and the timeframe being analyzed.
BREAK LONG and BREAK SHORT indicate confirmed breakouts according to the indicator's rules and should not automatically be interpreted as buy or sell signals.
版本注释
Script name changed.开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。