AE_MTaskRSI v3

# AE_MTaskRSI v3 — Multi-Layer RSI Analysis Toolkit
## Overview
**AE_MTaskRSI v3** is a multi-layer Relative Strength Index (RSI) analysis indicator designed to help traders examine momentum, higher-timeframe RSI relationships, momentum structure, divergence, moving-average behavior, and statistical regression channels within a single dedicated pane.
Rather than relying on RSI alone, this indicator brings together several complementary analytical tools:
- Standard RSI for momentum analysis.
- Higher Timeframe (HTF) RSI for multi-timeframe comparison.
- RSI Bollinger Bands for observing momentum expansion and contraction.
- Fast and slow RSI EMAs for momentum smoothing and crossover analysis.
- Custom RSI levels for identifying important momentum zones.
- RSI market-structure labels: Higher High (HH), Lower High (LH), Higher Low (HL), and Lower Low (LL).
- Bullish and bearish RSI divergence detection.
- Linear regression channels for visualizing the direction and dispersion of RSI over a selected lookback period.
- Configurable colors, widths, label sizes, visibility settings, and historical signal display.
The objective is to make multiple dimensions of momentum easier to observe without constantly switching between separate indicators.
**The central idea:** RSI is more than an overbought/oversold oscillator. Its position, structure, relationship with higher-timeframe momentum, and behavior around its statistical boundaries can provide useful context about the current market condition.
AE_MTaskRSI v3 is an analytical and informational tool. Its components are intended to support independent market interpretation, not to prescribe automatic entries or exits.
---
## 1. RSI Settings
The main RSI is the foundation of the indicator. All RSI-based components are built around the selected source and their respective settings.
### Source
Selects the price series used to calculate the main RSI.
The default is `Close`.
### RSI Length
Sets the number of bars used in the main RSI calculation.
Default: **14**
- A shorter length generally produces a more responsive oscillator.
- A longer length generally produces smoother momentum readings.
Shorter settings may help expose rapid momentum changes but can also produce more noise. Longer settings may filter some short-term fluctuations while responding more slowly to changes.
### RSI Color
Changes the color of the main RSI line.
Default: Aqua.
### RSI Width
Controls the visual thickness of the main RSI line.
Available range: 1–5.
**My perspective:** Start by understanding the behavior of the main RSI before adding more visual information. The other components become much more useful when interpreted in relation to this primary momentum series.
---
## 2. RSI Bollinger Bands
This section applies Bollinger Bands to the RSI values rather than directly to price.
### Show BB
Enables or disables the upper and lower RSI Bollinger Bands.
Default: Off.
### BB Length
Sets the lookback period for the moving average used as the Bollinger Band basis.
Default: 20.
### BB StdDev
Controls the standard-deviation multiplier used to calculate the distance between the basis and the upper and lower bands.
Default: 2.0.
A larger multiplier produces wider bands; a smaller multiplier produces narrower bands.
### Show BB Basis
Displays or hides the central RSI Bollinger Band basis.
Default: Off.
The basis is calculated as the simple moving average of RSI over the selected BB Length.
### How to interpret the bands
- **RSI approaching or moving beyond an outer band:** Momentum is moving toward an extreme relative to its recent RSI distribution.
- **Bands widening:** RSI dispersion is increasing.
- **Bands narrowing:** RSI dispersion is decreasing.
- **RSI returning toward the basis:** Momentum is moving back toward its recent average.
These conditions do not automatically imply a reversal. Strong momentum can remain near an outer band or move beyond it for an extended period.
**My perspective:** RSI Bollinger Bands are most interesting when studying changes in momentum behavior. A contraction followed by expansion may help identify a transition from quieter momentum to more active momentum, but the bands alone cannot establish the direction or quality of a price breakout.
---
## 3. HTF RSI — Higher-Timeframe or Alternative-Length Momentum
This component allows you to compare the main RSI with a second RSI calculated using a separately configurable length and timeframe.
It supports two useful approaches:
1. **Multi-timeframe analysis:** Compare the current chart's RSI with an RSI calculated on a higher timeframe.
2. **Same-timeframe, different-length analysis:** Keep the same chart timeframe but use a different RSI length to compare faster or slower momentum behavior.
### Show HTF RSI
Enables or disables the second RSI line.
Default: On.
### HTF Timeframe
Selects the timeframe used for the second RSI calculation.
Default: 60 minutes (1 hour).
When using a higher timeframe, this setting allows you to compare the chart's RSI with a broader timeframe reference.
**Same-timeframe usage:** You can also select the current chart timeframe. For example, on a 15-minute chart, you can keep the second RSI on 15 minutes and change its RSI Length to compare different momentum speeds without introducing a separate 1-hour RSI.
### HTF RSI Length
Sets the RSI calculation length for the second RSI.
Default: 14.
This setting operates independently of the main RSI Length.
For example, on a 15-minute chart, you could compare:
- Main RSI Length 14 with a second RSI Length 6 on the same 15-minute timeframe to observe faster momentum.
- Main RSI Length 14 with a second RSI Length 21 on the same 15-minute timeframe to observe more slowly calculated momentum.
- Main RSI Length 14 on the 15-minute chart with a second RSI Length 14 on the 1-hour timeframe to compare different timeframes.
These are examples of how the settings can be used, not prescribed optimal configurations.
### HTF RSI Color
Changes the color of the second RSI line.
Default: Orange.
### HTF RSI Width
Controls the thickness of the second RSI line.
Available range: 1–5.
### How to interpret the comparison
The main RSI and the second RSI can be used to examine different aspects of momentum:
- **Different timeframes, same length:** Compare momentum across timeframes.
- **Same timeframe, different lengths:** Compare faster and slower calculations of momentum on the same price series.
- **Different timeframes and different lengths:** Compare momentum using both a different timeframe and a different calculation length.
A shorter RSI length generally responds more quickly to price changes, while a longer RSI length generally produces a smoother, slower-moving reading.
When both RSIs use the same timeframe but different lengths, their relationship can help show whether faster momentum is moving ahead of, or diverging from, the more slowly calculated momentum reading.
When they use different timeframes, the comparison instead provides context about how momentum on the chart timeframe relates to momentum calculated from another timeframe.
**My perspective:** The second RSI does not have to be a higher-timeframe RSI in every workflow. Using the same timeframe with a different RSI length is a useful alternative when the objective is to compare momentum speeds without adding another timeframe to the analysis. The choice depends on the question you want the indicator to help answer.
In either configuration, the relationship between the two RSI lines is analytical information, not a standalone buy or sell instruction. A faster RSI crossing the slower RSI does not guarantee continuation or reversal.
**Technical note:** The script calculates the second RSI using the selected `HTF Timeframe` and `HTF RSI Length`. Selecting the current chart timeframe makes it a same-timeframe, alternative-length RSI comparison. The existing HTF crossover labels also compare the main RSI with this second RSI, so their meaning follows whichever configuration you select.
---
## 4. HTF Buy / Sell Labels
This component marks crossovers between the main RSI and the HTF RSI.
The labels are generated from the relationship between the two RSI series, not from direct price action.
### Show HTF B / S
Enables or disables the HTF crossover labels.
Default: On.
The labels are:
- **HT +** — the HTF RSI crosses below the main RSI.
- **HT -** — the HTF RSI crosses above the main RSI.
These definitions are important: the labels describe a specific oscillator crossover and should not be interpreted as guaranteed buy or sell instructions.
### Hide HTF B / S History
Controls how many HTF crossover labels remain visible.
Default: Off.
- When disabled, the indicator retains up to the number of labels allowed by Show Last X HTF B / S.
- When enabled, previous HTF crossover labels are removed, leaving only the latest generated label.
### Show Last X HTF B / S
Sets the maximum number of HTF crossover labels to retain.
Default: 20.
Minimum: 1.
This is useful for reducing historical label clutter while preserving recent crossover information.
### HT + Label Color
Sets the background color of the HT + label.
Default: Lime.
### HT - Label Color
Sets the background color of the HT - label.
Default: Red.
### HT Label Text Color
Changes the text color inside the HTF crossover labels.
Default: White.
### HT Label Size
Controls the size of the HTF crossover labels.
Options: Tiny, Small, Normal, Large, Huge.
Default: Small.
### How to use the crossover information
The labels can help identify changes in the relative position of short-term and HTF momentum. Their usefulness depends on the surrounding conditions.
For example, a crossover near the RSI midpoint may carry a different interpretation from one occurring near an extreme RSI level or during a clearly established momentum trend.
Crossovers can occur repeatedly during sideways conditions. They should therefore be interpreted in context rather than treated as independent trading signals.
**My perspective:** The strongest use of this feature is comparison, not command-following. It gives the trader a visible reminder that the relationship between two momentum readings has changed. It does not tell the trader whether price will continue, reverse, or consolidate.
---
## 5. Regression Channel
The regression channel applies linear regression to the RSI series and draws a central regression line with upper and lower deviation boundaries.
This is a statistical visualization of RSI behavior over a selected lookback period.
### Show Regression Channel
Enables or disables the entire regression channel.
Default: On.
### Regression Length
Sets the number of bars included in the regression calculation.
Default: 100.
Minimum: 10.
A shorter length generally makes the channel respond more quickly to recent RSI changes. A longer length provides a broader view of momentum behavior over more bars.
The best length depends on the timeframe and the type of momentum behavior being studied.
### Channel Deviation
Controls the multiplier used to calculate the channel's deviation boundaries.
Default: 2.0.
Minimum: 0.1, with increments of 0.1.
Increasing the multiplier widens the channel; decreasing it narrows the channel.
The boundaries represent dispersion around the regression fit. They are not guaranteed support and resistance levels and should not be interpreted as price targets.
### Show Mid Channel
Enables or disables the central regression line.
Default: On.
The central line provides a visual reference for the fitted RSI trend over the selected regression period.
### Channel Width
Controls the thickness of the upper and lower regression boundaries.
Available range: 1–5.
### How to interpret the regression channel
The channel can help visualize:
- The prevailing direction of the fitted RSI series.
- The extent to which RSI is moving away from its regression fit.
- Changes in the dispersion of RSI around the fitted line.
- Whether momentum is approaching or moving beyond its recent regression boundaries.
A rising fitted RSI line indicates a rising regression trend in the RSI series; a falling fitted line indicates a declining regression trend. Neither necessarily establishes the direction of future price.
A move beyond a channel boundary may reflect unusually strong momentum relative to the fitted series, but it is not automatically a reversal signal.
### Why regression adds another perspective
Traditional RSI levels are fixed references, such as 30, 50, and 70. A regression channel instead adapts its visual boundaries to the RSI behavior within the selected lookback period.
These are different analytical perspectives:
- Fixed levels provide consistent reference points.
- Regression provides a fitted trend and deviation context.
**My perspective:** This is one of the most useful conceptual additions to the indicator because it encourages traders to examine the *behavior* of RSI rather than relying only on its absolute numerical value. However, the regression channel remains a descriptive tool. Its boundaries do not guarantee that RSI will reverse or return to the center.
---
## 6. RSI EMAs
The indicator includes two exponential moving averages calculated from the main RSI series.
These are moving averages of RSI, not moving averages of price.
### Show Fast EMA
Enables or disables the fast RSI EMA.
Default: On.
### Fast EMA Length
Sets the fast EMA calculation length.
Default: 9.
### Fast EMA Color
Changes the fast EMA color.
Default: Lime.
### Show Slow EMA
Enables or disables the slow RSI EMA.
Default: On.
### Slow EMA Length
Sets the slow EMA calculation length.
Default: 21.
### Slow EMA Color
Changes the slow EMA color.
Default: Red.
### How to interpret the RSI EMAs
- The fast EMA generally responds more quickly to recent changes in RSI.
- The slow EMA generally responds more gradually.
- A fast EMA crossing above the slow EMA indicates that the faster smoothed RSI series has moved above the slower one.
- A fast EMA crossing below the slow EMA indicates that the faster smoothed RSI series has moved below the slower one.
The EMA relationship can help distinguish short-term changes from the broader smoothed momentum pattern.
Crossovers may be frequent during sideways conditions, while sustained separation may occur during stronger momentum phases.
**My perspective:** The EMAs are best treated as confirmation and visualization helpers. They can make the RSI's rhythm easier to read, but they also smooth the underlying data and can lag rapid changes. They should not replace examination of the RSI's position, structure, or surrounding market conditions.
---
## 7. RSI Levels
This section defines the fixed horizontal reference levels displayed in the oscillator pane.
### Upper Level
Default: 70.
A commonly used upper RSI reference associated with elevated momentum.
### Upper Level 2
Default: 90.
An additional extreme upper reference for observing unusually high RSI readings.
### Middle Level
Default: 50.
The traditional RSI midpoint.
RSI above 50 indicates that the oscillator is above its midpoint; RSI below 50 indicates that it is below its midpoint. These positions do not independently establish the direction of price.
### Lower Level
Default: 30.
A commonly used lower RSI reference associated with depressed momentum.
### Lower Level 2
Default: 10.
An additional extreme lower reference.
### Level Color
Sets the color of the standard RSI reference lines.
Default: Gray.
### Level Width
Sets the thickness of the standard RSI reference lines.
Available range: 1–5.
### Show MidUpper / MidLower
Enables or disables the two additional intermediate levels.
Default: On.
### MidUpper Level
Default: 55.
Sets the upper intermediate RSI reference.
### MidLower Level
Default: 45.
Sets the lower intermediate RSI reference.
### MidUpper / MidLower Color
Sets the color of the two intermediate levels.
Default: Yellow.
### MidUpper / MidLower Width
Sets the thickness of the intermediate levels.
Available range: 1–5.
### Understanding the 45–55 zone
The 45–55 region creates a narrower band around the RSI midpoint.
It can be useful for observing how momentum behaves near the center of the oscillator, including whether RSI repeatedly oscillates around 50 or begins to move away from this region.
For example:
- RSI remaining above 55 may indicate that momentum is holding in the upper part of this selected zone.
- RSI remaining below 45 may indicate that momentum is holding in the lower part.
- Repeated movement between 45 and 55 may indicate that RSI is spending time near its midpoint.
These are observational interpretations, not universal market rules. RSI behavior varies across instruments, timeframes, and market conditions.
**My perspective:** The intermediate levels add useful granularity without forcing the trader to depend exclusively on the traditional 30/70 framework. A trader can examine the central momentum region as well as the more extreme areas, while retaining the flexibility to choose levels appropriate to their own analysis.
---
## 8. RSI Structure — HH / LH / HL / LL
This component identifies successive confirmed pivot highs and pivot lows in the RSI series.
It labels the relationship between the newly confirmed pivot and the preceding pivot of the same type.
### Show HH/LH/HL/LL
Enables or disables all RSI structure labels.
Default: On.
### Pivot Left
Sets the number of bars to the left of a candidate pivot used for pivot identification.
Default: 5.
Minimum: 1.
### Pivot Right
Sets the number of bars to the right of a candidate pivot used for pivot confirmation.
Default: 5.
Minimum: 1.
A pivot requires the relevant surrounding bars for confirmation. Consequently, a pivot identified using a right-side setting of 5 is confirmed only after the required five bars to its right have formed.
This introduces confirmation delay. It is not a prediction of a turning point before that point occurs.
### Label Size
Controls the size of the structure labels.
Options: Tiny, Small, Normal.
Default: Small.
### Label Transparency
Controls the transparency of the structure-label text.
Range: 0–100.
Default: 0, meaning fully opaque.
### Label Offset
Adjusts the horizontal placement of structure labels relative to their pivot bars.
Default: 0.
Range: -20 to +20 bars.
### High Label Vertical Offset
Adjusts the vertical placement of HH and LH labels.
Default: 4.0 RSI units.
### Low Label Vertical Offset
Adjusts the vertical placement of HL and LL labels.
Default: 8.0 RSI units.
These vertical offsets are expressed in RSI-pane units and can be adjusted to reduce overlap with the oscillator or other labels.
### What the structure labels mean
**HH — Higher High**
The newly confirmed RSI pivot high is higher than the preceding confirmed RSI pivot high.
**LH — Lower High**
The newly confirmed RSI pivot high is lower than the preceding confirmed RSI pivot high.
**HL — Higher Low**
The newly confirmed RSI pivot low is higher than the preceding confirmed RSI pivot low.
**LL — Lower Low**
The newly confirmed RSI pivot low is lower than the preceding confirmed RSI pivot low.
### Default label colors
- HH: Gray.
- LH: Gray.
- HL: Blue.
- LL: Green.
The colors of HH and LH are fixed in the supplied code, as are the colors of HL and LL. Label transparency and size can be adjusted.
### Interpreting RSI structure
RSI structure can reveal changes in the sequence of momentum peaks and troughs.
For example, a sequence of higher RSI lows may indicate that momentum pullbacks are becoming shallower, while a sequence of lower RSI highs may indicate that momentum peaks are weakening.
These observations can be compared with price structure to understand whether price and momentum are behaving similarly or differently.
**My perspective:** This feature makes RSI structure explicit rather than leaving the trader to estimate every momentum swing visually. Its main value is context: it helps reveal the sequence of confirmed momentum pivots. A single HH, LH, HL, or LL should not be treated as a standalone entry signal.
---
## 9. Divergence
The divergence engine compares successive confirmed RSI pivot points with the corresponding price highs or lows.
It identifies two basic forms of regular divergence.
### Show Divergence
Enables or disables divergence annotations.
Default: On.
This is the master visibility control for the divergence component.
### Show Divergence Lines
Enables or disables the lines connecting the two RSI pivot values used in a detected divergence.
Default: On.
These lines are drawn in the RSI pane.
### Show BD/SD Labels
Enables or disables the divergence labels.
Default: On.
### BD Color
Sets the color of bullish divergence labels and lines.
Default: Lime.
### SD Color
Sets the color of bearish divergence labels and lines.
Default: Red.
### Line Width
Controls the thickness of divergence lines.
Available range: 1–5.
### Divergence Label Offset
Adjusts the vertical separation between divergence labels and their associated RSI structure area.
Default: 8.0 RSI units.
Minimum: 0.
The offset helps distinguish divergence labels from other oscillator annotations.
### BD — Bullish Divergence
A bullish divergence is identified when:
- Price forms a lower low relative to the preceding compared price low.
- The corresponding confirmed RSI pivot forms a higher low relative to the preceding compared RSI low.
This indicates that price has made a lower low while the RSI low has risen.
It can be a sign that downside momentum is weakening relative to the previous low, but it does not guarantee that price will reverse upward.
### SD — Bearish Divergence
A bearish divergence is identified when:
- Price forms a higher high relative to the preceding compared price high.
- The corresponding confirmed RSI pivot forms a lower high relative to the preceding compared RSI high.
This indicates that price has made a higher high while the RSI high has fallen.
It can indicate that upside momentum is weakening relative to the previous high, but it does not guarantee that price will reverse downward.
### Divergence confirmation and timing
The divergence engine uses confirmed RSI pivots. Therefore, divergence recognition is delayed until the required right-side bars have formed.
The comparison is based on price lows or highs associated with the RSI pivot bars. Divergence is not simply a comparison between the latest price and the latest RSI reading.
The indicator also does not classify every possible form of divergence. The supplied logic specifically implements regular bullish and regular bearish divergence.
### Why divergence should be interpreted carefully
Divergence is a relationship between price movement and oscillator movement, not proof of a future reversal.
A divergence can appear before a reversal, during a consolidation, or while an existing trend continues. Its meaning depends on the wider market context.
**My perspective:** Divergence is most valuable as a reason to investigate the current momentum-price relationship. It becomes more informative when considered alongside the RSI structure, the position of RSI relative to its levels, the regression channel, and independent price-action analysis. It should not automatically trigger a trade.
---
## 10. Combining the Components
The individual tools are useful on their own, but the indicator is designed to make their relationships visible in one place.
Here are several ways to approach the combined information without turning every feature into a mandatory trading rule.
### Momentum and its midpoint
Use the main RSI together with the 45, 50, and 55 levels to observe whether momentum is holding above the midpoint, below it, or oscillating around it.
### Short-term and higher-timeframe momentum
Compare the main RSI with the HTF RSI to see how the two readings relate. HTF crossover labels identify changes in their relative position.
### Momentum smoothing
Use the fast and slow RSI EMAs to observe changes in smoothed momentum and whether the faster series is moving above or below the slower series.
### Momentum structure
Use HH, LH, HL, and LL labels to examine the sequence of confirmed RSI swing highs and lows.
### Price versus momentum
Use BD and SD annotations to identify the specific regular divergence conditions implemented in the indicator.
### Regression context
Use the regression channel to compare the current RSI with its fitted trend and deviation boundaries over the selected lookback period.
### Momentum dispersion
Optionally enable RSI Bollinger Bands to study the dispersion of RSI around its moving-average basis.
These components can provide complementary evidence, but they do not necessarily agree. That is normal: each examines a different aspect of the data.
A divergence, an HTF crossover, a regression boundary touch, and an EMA crossover are not interchangeable events. They describe different relationships and may occur at different times.
**My perspective:** The greatest benefit of a multi-layer indicator is not the number of signals it produces. It is the ability to examine momentum from several angles without losing sight of what each measurement actually represents. Traders can choose the components that answer their analytical questions and leave the others disabled when they add more noise than value.
---
## 11. Suggested Starting Configuration
The indicator's supplied defaults provide a reasonable starting point for exploring its components.
| Component | Default |
| ----------------------------- | --------------- |
| Main RSI Length | 14 |
| Main RSI Source | Close |
| RSI Bollinger Bands | Hidden |
| BB Length / StdDev | 20 / 2.0 |
| HTF RSI | Visible |
| HTF Timeframe / Length | 60 minutes / 14 |
| HTF Crossover Labels | Visible |
| HTF Label History | Up to 20 |
| Regression Channel | Visible |
| Regression Length / Deviation | 100 / 2.0 |
| Regression Mid Channel | Visible |
| Fast RSI EMA | 9 |
| Slow RSI EMA | 21 |
| Standard RSI Levels | 70 / 50 / 30 |
| Extreme RSI Levels | 90 / 10 |
| Intermediate RSI Levels | 55 / 45 |
| RSI Structure | Visible |
| Pivot Left / Right | 5 / 5 |
| Divergence | Visible |
| Divergence Lines and Labels | Visible |
These are the defaults programmed into the supplied version, not settings proven to be optimal for every instrument or timeframe.
Users should adjust settings according to their analytical purpose and understand that changing a lookback period, timeframe, or pivot-confirmation setting changes the behavior of the corresponding component.
---
## 12. Important Notes and Limitations
- **No guaranteed predictions:** None of the indicator's components guarantees future price direction or a profitable outcome.
- **Confirmed pivots take time:** Structure and divergence depend on confirmed RSI pivots and therefore cannot be treated as instantaneous turning-point predictions.
- **HTF is a comparison, not a verdict:** The HTF RSI and its crossover labels describe relationships between oscillator readings, not confirmed market direction.
- **Regression is statistical context:** Regression boundaries are not guaranteed support, resistance, or reversal levels.
- **Bollinger Bands measure dispersion:** An outer-band touch does not automatically indicate exhaustion.
- **EMAs lag the underlying RSI:** Crossovers can occur late or repeatedly during sideways conditions.
- **Fixed RSI levels are references:** The 30/70, 10/90, and 45/55 levels should be interpreted in context rather than as universal thresholds.
- **The tool does not provide a complete trading system:** It does not calculate position size, risk per trade, stop-loss placement, profit targets, or account-level risk.
- **Multi-timeframe behavior matters:** The selected HTF and the status of its current candle can affect the interpretation of the HTF RSI.
Users should test the indicator on their intended instruments and timeframes before relying on its visual output in live market analysis.
---
## Final Thoughts
AE_MTaskRSI v3 brings momentum measurement, multi-timeframe comparison, RSI structure, divergence, moving-average smoothing, and regression analysis together in one configurable oscillator.
Its purpose is to make the underlying information easier to see, compare, and interpret.
Rather than treating RSI as a simple overbought/oversold gauge, traders can examine its position, the sequence of its swings, its relationship with another timeframe, and its behavior relative to moving averages and statistical boundaries.
**My view:** The strongest aspect of this indicator is the combination of different analytical perspectives within a single pane. Its value comes from helping the trader ask better questions about momentum, not from producing more labels or encouraging more trades.
Use the features that contribute to your analysis, keep the display readable, and remember that every plotted relationship is information to interpret—not an instruction that must be followed.
*AE_MTaskRSI v3 — More context for RSI. More ways to read momentum. Your analysis remains your own.*
## Overview
**AE_MTaskRSI v3** is a multi-layer Relative Strength Index (RSI) analysis indicator designed to help traders examine momentum, higher-timeframe RSI relationships, momentum structure, divergence, moving-average behavior, and statistical regression channels within a single dedicated pane.
Rather than relying on RSI alone, this indicator brings together several complementary analytical tools:
- Standard RSI for momentum analysis.
- Higher Timeframe (HTF) RSI for multi-timeframe comparison.
- RSI Bollinger Bands for observing momentum expansion and contraction.
- Fast and slow RSI EMAs for momentum smoothing and crossover analysis.
- Custom RSI levels for identifying important momentum zones.
- RSI market-structure labels: Higher High (HH), Lower High (LH), Higher Low (HL), and Lower Low (LL).
- Bullish and bearish RSI divergence detection.
- Linear regression channels for visualizing the direction and dispersion of RSI over a selected lookback period.
- Configurable colors, widths, label sizes, visibility settings, and historical signal display.
The objective is to make multiple dimensions of momentum easier to observe without constantly switching between separate indicators.
**The central idea:** RSI is more than an overbought/oversold oscillator. Its position, structure, relationship with higher-timeframe momentum, and behavior around its statistical boundaries can provide useful context about the current market condition.
AE_MTaskRSI v3 is an analytical and informational tool. Its components are intended to support independent market interpretation, not to prescribe automatic entries or exits.
---
## 1. RSI Settings
The main RSI is the foundation of the indicator. All RSI-based components are built around the selected source and their respective settings.
### Source
Selects the price series used to calculate the main RSI.
The default is `Close`.
### RSI Length
Sets the number of bars used in the main RSI calculation.
Default: **14**
- A shorter length generally produces a more responsive oscillator.
- A longer length generally produces smoother momentum readings.
Shorter settings may help expose rapid momentum changes but can also produce more noise. Longer settings may filter some short-term fluctuations while responding more slowly to changes.
### RSI Color
Changes the color of the main RSI line.
Default: Aqua.
### RSI Width
Controls the visual thickness of the main RSI line.
Available range: 1–5.
**My perspective:** Start by understanding the behavior of the main RSI before adding more visual information. The other components become much more useful when interpreted in relation to this primary momentum series.
---
## 2. RSI Bollinger Bands
This section applies Bollinger Bands to the RSI values rather than directly to price.
### Show BB
Enables or disables the upper and lower RSI Bollinger Bands.
Default: Off.
### BB Length
Sets the lookback period for the moving average used as the Bollinger Band basis.
Default: 20.
### BB StdDev
Controls the standard-deviation multiplier used to calculate the distance between the basis and the upper and lower bands.
Default: 2.0.
A larger multiplier produces wider bands; a smaller multiplier produces narrower bands.
### Show BB Basis
Displays or hides the central RSI Bollinger Band basis.
Default: Off.
The basis is calculated as the simple moving average of RSI over the selected BB Length.
### How to interpret the bands
- **RSI approaching or moving beyond an outer band:** Momentum is moving toward an extreme relative to its recent RSI distribution.
- **Bands widening:** RSI dispersion is increasing.
- **Bands narrowing:** RSI dispersion is decreasing.
- **RSI returning toward the basis:** Momentum is moving back toward its recent average.
These conditions do not automatically imply a reversal. Strong momentum can remain near an outer band or move beyond it for an extended period.
**My perspective:** RSI Bollinger Bands are most interesting when studying changes in momentum behavior. A contraction followed by expansion may help identify a transition from quieter momentum to more active momentum, but the bands alone cannot establish the direction or quality of a price breakout.
---
## 3. HTF RSI — Higher-Timeframe or Alternative-Length Momentum
This component allows you to compare the main RSI with a second RSI calculated using a separately configurable length and timeframe.
It supports two useful approaches:
1. **Multi-timeframe analysis:** Compare the current chart's RSI with an RSI calculated on a higher timeframe.
2. **Same-timeframe, different-length analysis:** Keep the same chart timeframe but use a different RSI length to compare faster or slower momentum behavior.
### Show HTF RSI
Enables or disables the second RSI line.
Default: On.
### HTF Timeframe
Selects the timeframe used for the second RSI calculation.
Default: 60 minutes (1 hour).
When using a higher timeframe, this setting allows you to compare the chart's RSI with a broader timeframe reference.
**Same-timeframe usage:** You can also select the current chart timeframe. For example, on a 15-minute chart, you can keep the second RSI on 15 minutes and change its RSI Length to compare different momentum speeds without introducing a separate 1-hour RSI.
### HTF RSI Length
Sets the RSI calculation length for the second RSI.
Default: 14.
This setting operates independently of the main RSI Length.
For example, on a 15-minute chart, you could compare:
- Main RSI Length 14 with a second RSI Length 6 on the same 15-minute timeframe to observe faster momentum.
- Main RSI Length 14 with a second RSI Length 21 on the same 15-minute timeframe to observe more slowly calculated momentum.
- Main RSI Length 14 on the 15-minute chart with a second RSI Length 14 on the 1-hour timeframe to compare different timeframes.
These are examples of how the settings can be used, not prescribed optimal configurations.
### HTF RSI Color
Changes the color of the second RSI line.
Default: Orange.
### HTF RSI Width
Controls the thickness of the second RSI line.
Available range: 1–5.
### How to interpret the comparison
The main RSI and the second RSI can be used to examine different aspects of momentum:
- **Different timeframes, same length:** Compare momentum across timeframes.
- **Same timeframe, different lengths:** Compare faster and slower calculations of momentum on the same price series.
- **Different timeframes and different lengths:** Compare momentum using both a different timeframe and a different calculation length.
A shorter RSI length generally responds more quickly to price changes, while a longer RSI length generally produces a smoother, slower-moving reading.
When both RSIs use the same timeframe but different lengths, their relationship can help show whether faster momentum is moving ahead of, or diverging from, the more slowly calculated momentum reading.
When they use different timeframes, the comparison instead provides context about how momentum on the chart timeframe relates to momentum calculated from another timeframe.
**My perspective:** The second RSI does not have to be a higher-timeframe RSI in every workflow. Using the same timeframe with a different RSI length is a useful alternative when the objective is to compare momentum speeds without adding another timeframe to the analysis. The choice depends on the question you want the indicator to help answer.
In either configuration, the relationship between the two RSI lines is analytical information, not a standalone buy or sell instruction. A faster RSI crossing the slower RSI does not guarantee continuation or reversal.
**Technical note:** The script calculates the second RSI using the selected `HTF Timeframe` and `HTF RSI Length`. Selecting the current chart timeframe makes it a same-timeframe, alternative-length RSI comparison. The existing HTF crossover labels also compare the main RSI with this second RSI, so their meaning follows whichever configuration you select.
---
## 4. HTF Buy / Sell Labels
This component marks crossovers between the main RSI and the HTF RSI.
The labels are generated from the relationship between the two RSI series, not from direct price action.
### Show HTF B / S
Enables or disables the HTF crossover labels.
Default: On.
The labels are:
- **HT +** — the HTF RSI crosses below the main RSI.
- **HT -** — the HTF RSI crosses above the main RSI.
These definitions are important: the labels describe a specific oscillator crossover and should not be interpreted as guaranteed buy or sell instructions.
### Hide HTF B / S History
Controls how many HTF crossover labels remain visible.
Default: Off.
- When disabled, the indicator retains up to the number of labels allowed by Show Last X HTF B / S.
- When enabled, previous HTF crossover labels are removed, leaving only the latest generated label.
### Show Last X HTF B / S
Sets the maximum number of HTF crossover labels to retain.
Default: 20.
Minimum: 1.
This is useful for reducing historical label clutter while preserving recent crossover information.
### HT + Label Color
Sets the background color of the HT + label.
Default: Lime.
### HT - Label Color
Sets the background color of the HT - label.
Default: Red.
### HT Label Text Color
Changes the text color inside the HTF crossover labels.
Default: White.
### HT Label Size
Controls the size of the HTF crossover labels.
Options: Tiny, Small, Normal, Large, Huge.
Default: Small.
### How to use the crossover information
The labels can help identify changes in the relative position of short-term and HTF momentum. Their usefulness depends on the surrounding conditions.
For example, a crossover near the RSI midpoint may carry a different interpretation from one occurring near an extreme RSI level or during a clearly established momentum trend.
Crossovers can occur repeatedly during sideways conditions. They should therefore be interpreted in context rather than treated as independent trading signals.
**My perspective:** The strongest use of this feature is comparison, not command-following. It gives the trader a visible reminder that the relationship between two momentum readings has changed. It does not tell the trader whether price will continue, reverse, or consolidate.
---
## 5. Regression Channel
The regression channel applies linear regression to the RSI series and draws a central regression line with upper and lower deviation boundaries.
This is a statistical visualization of RSI behavior over a selected lookback period.
### Show Regression Channel
Enables or disables the entire regression channel.
Default: On.
### Regression Length
Sets the number of bars included in the regression calculation.
Default: 100.
Minimum: 10.
A shorter length generally makes the channel respond more quickly to recent RSI changes. A longer length provides a broader view of momentum behavior over more bars.
The best length depends on the timeframe and the type of momentum behavior being studied.
### Channel Deviation
Controls the multiplier used to calculate the channel's deviation boundaries.
Default: 2.0.
Minimum: 0.1, with increments of 0.1.
Increasing the multiplier widens the channel; decreasing it narrows the channel.
The boundaries represent dispersion around the regression fit. They are not guaranteed support and resistance levels and should not be interpreted as price targets.
### Show Mid Channel
Enables or disables the central regression line.
Default: On.
The central line provides a visual reference for the fitted RSI trend over the selected regression period.
### Channel Width
Controls the thickness of the upper and lower regression boundaries.
Available range: 1–5.
### How to interpret the regression channel
The channel can help visualize:
- The prevailing direction of the fitted RSI series.
- The extent to which RSI is moving away from its regression fit.
- Changes in the dispersion of RSI around the fitted line.
- Whether momentum is approaching or moving beyond its recent regression boundaries.
A rising fitted RSI line indicates a rising regression trend in the RSI series; a falling fitted line indicates a declining regression trend. Neither necessarily establishes the direction of future price.
A move beyond a channel boundary may reflect unusually strong momentum relative to the fitted series, but it is not automatically a reversal signal.
### Why regression adds another perspective
Traditional RSI levels are fixed references, such as 30, 50, and 70. A regression channel instead adapts its visual boundaries to the RSI behavior within the selected lookback period.
These are different analytical perspectives:
- Fixed levels provide consistent reference points.
- Regression provides a fitted trend and deviation context.
**My perspective:** This is one of the most useful conceptual additions to the indicator because it encourages traders to examine the *behavior* of RSI rather than relying only on its absolute numerical value. However, the regression channel remains a descriptive tool. Its boundaries do not guarantee that RSI will reverse or return to the center.
---
## 6. RSI EMAs
The indicator includes two exponential moving averages calculated from the main RSI series.
These are moving averages of RSI, not moving averages of price.
### Show Fast EMA
Enables or disables the fast RSI EMA.
Default: On.
### Fast EMA Length
Sets the fast EMA calculation length.
Default: 9.
### Fast EMA Color
Changes the fast EMA color.
Default: Lime.
### Show Slow EMA
Enables or disables the slow RSI EMA.
Default: On.
### Slow EMA Length
Sets the slow EMA calculation length.
Default: 21.
### Slow EMA Color
Changes the slow EMA color.
Default: Red.
### How to interpret the RSI EMAs
- The fast EMA generally responds more quickly to recent changes in RSI.
- The slow EMA generally responds more gradually.
- A fast EMA crossing above the slow EMA indicates that the faster smoothed RSI series has moved above the slower one.
- A fast EMA crossing below the slow EMA indicates that the faster smoothed RSI series has moved below the slower one.
The EMA relationship can help distinguish short-term changes from the broader smoothed momentum pattern.
Crossovers may be frequent during sideways conditions, while sustained separation may occur during stronger momentum phases.
**My perspective:** The EMAs are best treated as confirmation and visualization helpers. They can make the RSI's rhythm easier to read, but they also smooth the underlying data and can lag rapid changes. They should not replace examination of the RSI's position, structure, or surrounding market conditions.
---
## 7. RSI Levels
This section defines the fixed horizontal reference levels displayed in the oscillator pane.
### Upper Level
Default: 70.
A commonly used upper RSI reference associated with elevated momentum.
### Upper Level 2
Default: 90.
An additional extreme upper reference for observing unusually high RSI readings.
### Middle Level
Default: 50.
The traditional RSI midpoint.
RSI above 50 indicates that the oscillator is above its midpoint; RSI below 50 indicates that it is below its midpoint. These positions do not independently establish the direction of price.
### Lower Level
Default: 30.
A commonly used lower RSI reference associated with depressed momentum.
### Lower Level 2
Default: 10.
An additional extreme lower reference.
### Level Color
Sets the color of the standard RSI reference lines.
Default: Gray.
### Level Width
Sets the thickness of the standard RSI reference lines.
Available range: 1–5.
### Show MidUpper / MidLower
Enables or disables the two additional intermediate levels.
Default: On.
### MidUpper Level
Default: 55.
Sets the upper intermediate RSI reference.
### MidLower Level
Default: 45.
Sets the lower intermediate RSI reference.
### MidUpper / MidLower Color
Sets the color of the two intermediate levels.
Default: Yellow.
### MidUpper / MidLower Width
Sets the thickness of the intermediate levels.
Available range: 1–5.
### Understanding the 45–55 zone
The 45–55 region creates a narrower band around the RSI midpoint.
It can be useful for observing how momentum behaves near the center of the oscillator, including whether RSI repeatedly oscillates around 50 or begins to move away from this region.
For example:
- RSI remaining above 55 may indicate that momentum is holding in the upper part of this selected zone.
- RSI remaining below 45 may indicate that momentum is holding in the lower part.
- Repeated movement between 45 and 55 may indicate that RSI is spending time near its midpoint.
These are observational interpretations, not universal market rules. RSI behavior varies across instruments, timeframes, and market conditions.
**My perspective:** The intermediate levels add useful granularity without forcing the trader to depend exclusively on the traditional 30/70 framework. A trader can examine the central momentum region as well as the more extreme areas, while retaining the flexibility to choose levels appropriate to their own analysis.
---
## 8. RSI Structure — HH / LH / HL / LL
This component identifies successive confirmed pivot highs and pivot lows in the RSI series.
It labels the relationship between the newly confirmed pivot and the preceding pivot of the same type.
### Show HH/LH/HL/LL
Enables or disables all RSI structure labels.
Default: On.
### Pivot Left
Sets the number of bars to the left of a candidate pivot used for pivot identification.
Default: 5.
Minimum: 1.
### Pivot Right
Sets the number of bars to the right of a candidate pivot used for pivot confirmation.
Default: 5.
Minimum: 1.
A pivot requires the relevant surrounding bars for confirmation. Consequently, a pivot identified using a right-side setting of 5 is confirmed only after the required five bars to its right have formed.
This introduces confirmation delay. It is not a prediction of a turning point before that point occurs.
### Label Size
Controls the size of the structure labels.
Options: Tiny, Small, Normal.
Default: Small.
### Label Transparency
Controls the transparency of the structure-label text.
Range: 0–100.
Default: 0, meaning fully opaque.
### Label Offset
Adjusts the horizontal placement of structure labels relative to their pivot bars.
Default: 0.
Range: -20 to +20 bars.
### High Label Vertical Offset
Adjusts the vertical placement of HH and LH labels.
Default: 4.0 RSI units.
### Low Label Vertical Offset
Adjusts the vertical placement of HL and LL labels.
Default: 8.0 RSI units.
These vertical offsets are expressed in RSI-pane units and can be adjusted to reduce overlap with the oscillator or other labels.
### What the structure labels mean
**HH — Higher High**
The newly confirmed RSI pivot high is higher than the preceding confirmed RSI pivot high.
**LH — Lower High**
The newly confirmed RSI pivot high is lower than the preceding confirmed RSI pivot high.
**HL — Higher Low**
The newly confirmed RSI pivot low is higher than the preceding confirmed RSI pivot low.
**LL — Lower Low**
The newly confirmed RSI pivot low is lower than the preceding confirmed RSI pivot low.
### Default label colors
- HH: Gray.
- LH: Gray.
- HL: Blue.
- LL: Green.
The colors of HH and LH are fixed in the supplied code, as are the colors of HL and LL. Label transparency and size can be adjusted.
### Interpreting RSI structure
RSI structure can reveal changes in the sequence of momentum peaks and troughs.
For example, a sequence of higher RSI lows may indicate that momentum pullbacks are becoming shallower, while a sequence of lower RSI highs may indicate that momentum peaks are weakening.
These observations can be compared with price structure to understand whether price and momentum are behaving similarly or differently.
**My perspective:** This feature makes RSI structure explicit rather than leaving the trader to estimate every momentum swing visually. Its main value is context: it helps reveal the sequence of confirmed momentum pivots. A single HH, LH, HL, or LL should not be treated as a standalone entry signal.
---
## 9. Divergence
The divergence engine compares successive confirmed RSI pivot points with the corresponding price highs or lows.
It identifies two basic forms of regular divergence.
### Show Divergence
Enables or disables divergence annotations.
Default: On.
This is the master visibility control for the divergence component.
### Show Divergence Lines
Enables or disables the lines connecting the two RSI pivot values used in a detected divergence.
Default: On.
These lines are drawn in the RSI pane.
### Show BD/SD Labels
Enables or disables the divergence labels.
Default: On.
### BD Color
Sets the color of bullish divergence labels and lines.
Default: Lime.
### SD Color
Sets the color of bearish divergence labels and lines.
Default: Red.
### Line Width
Controls the thickness of divergence lines.
Available range: 1–5.
### Divergence Label Offset
Adjusts the vertical separation between divergence labels and their associated RSI structure area.
Default: 8.0 RSI units.
Minimum: 0.
The offset helps distinguish divergence labels from other oscillator annotations.
### BD — Bullish Divergence
A bullish divergence is identified when:
- Price forms a lower low relative to the preceding compared price low.
- The corresponding confirmed RSI pivot forms a higher low relative to the preceding compared RSI low.
This indicates that price has made a lower low while the RSI low has risen.
It can be a sign that downside momentum is weakening relative to the previous low, but it does not guarantee that price will reverse upward.
### SD — Bearish Divergence
A bearish divergence is identified when:
- Price forms a higher high relative to the preceding compared price high.
- The corresponding confirmed RSI pivot forms a lower high relative to the preceding compared RSI high.
This indicates that price has made a higher high while the RSI high has fallen.
It can indicate that upside momentum is weakening relative to the previous high, but it does not guarantee that price will reverse downward.
### Divergence confirmation and timing
The divergence engine uses confirmed RSI pivots. Therefore, divergence recognition is delayed until the required right-side bars have formed.
The comparison is based on price lows or highs associated with the RSI pivot bars. Divergence is not simply a comparison between the latest price and the latest RSI reading.
The indicator also does not classify every possible form of divergence. The supplied logic specifically implements regular bullish and regular bearish divergence.
### Why divergence should be interpreted carefully
Divergence is a relationship between price movement and oscillator movement, not proof of a future reversal.
A divergence can appear before a reversal, during a consolidation, or while an existing trend continues. Its meaning depends on the wider market context.
**My perspective:** Divergence is most valuable as a reason to investigate the current momentum-price relationship. It becomes more informative when considered alongside the RSI structure, the position of RSI relative to its levels, the regression channel, and independent price-action analysis. It should not automatically trigger a trade.
---
## 10. Combining the Components
The individual tools are useful on their own, but the indicator is designed to make their relationships visible in one place.
Here are several ways to approach the combined information without turning every feature into a mandatory trading rule.
### Momentum and its midpoint
Use the main RSI together with the 45, 50, and 55 levels to observe whether momentum is holding above the midpoint, below it, or oscillating around it.
### Short-term and higher-timeframe momentum
Compare the main RSI with the HTF RSI to see how the two readings relate. HTF crossover labels identify changes in their relative position.
### Momentum smoothing
Use the fast and slow RSI EMAs to observe changes in smoothed momentum and whether the faster series is moving above or below the slower series.
### Momentum structure
Use HH, LH, HL, and LL labels to examine the sequence of confirmed RSI swing highs and lows.
### Price versus momentum
Use BD and SD annotations to identify the specific regular divergence conditions implemented in the indicator.
### Regression context
Use the regression channel to compare the current RSI with its fitted trend and deviation boundaries over the selected lookback period.
### Momentum dispersion
Optionally enable RSI Bollinger Bands to study the dispersion of RSI around its moving-average basis.
These components can provide complementary evidence, but they do not necessarily agree. That is normal: each examines a different aspect of the data.
A divergence, an HTF crossover, a regression boundary touch, and an EMA crossover are not interchangeable events. They describe different relationships and may occur at different times.
**My perspective:** The greatest benefit of a multi-layer indicator is not the number of signals it produces. It is the ability to examine momentum from several angles without losing sight of what each measurement actually represents. Traders can choose the components that answer their analytical questions and leave the others disabled when they add more noise than value.
---
## 11. Suggested Starting Configuration
The indicator's supplied defaults provide a reasonable starting point for exploring its components.
| Component | Default |
| ----------------------------- | --------------- |
| Main RSI Length | 14 |
| Main RSI Source | Close |
| RSI Bollinger Bands | Hidden |
| BB Length / StdDev | 20 / 2.0 |
| HTF RSI | Visible |
| HTF Timeframe / Length | 60 minutes / 14 |
| HTF Crossover Labels | Visible |
| HTF Label History | Up to 20 |
| Regression Channel | Visible |
| Regression Length / Deviation | 100 / 2.0 |
| Regression Mid Channel | Visible |
| Fast RSI EMA | 9 |
| Slow RSI EMA | 21 |
| Standard RSI Levels | 70 / 50 / 30 |
| Extreme RSI Levels | 90 / 10 |
| Intermediate RSI Levels | 55 / 45 |
| RSI Structure | Visible |
| Pivot Left / Right | 5 / 5 |
| Divergence | Visible |
| Divergence Lines and Labels | Visible |
These are the defaults programmed into the supplied version, not settings proven to be optimal for every instrument or timeframe.
Users should adjust settings according to their analytical purpose and understand that changing a lookback period, timeframe, or pivot-confirmation setting changes the behavior of the corresponding component.
---
## 12. Important Notes and Limitations
- **No guaranteed predictions:** None of the indicator's components guarantees future price direction or a profitable outcome.
- **Confirmed pivots take time:** Structure and divergence depend on confirmed RSI pivots and therefore cannot be treated as instantaneous turning-point predictions.
- **HTF is a comparison, not a verdict:** The HTF RSI and its crossover labels describe relationships between oscillator readings, not confirmed market direction.
- **Regression is statistical context:** Regression boundaries are not guaranteed support, resistance, or reversal levels.
- **Bollinger Bands measure dispersion:** An outer-band touch does not automatically indicate exhaustion.
- **EMAs lag the underlying RSI:** Crossovers can occur late or repeatedly during sideways conditions.
- **Fixed RSI levels are references:** The 30/70, 10/90, and 45/55 levels should be interpreted in context rather than as universal thresholds.
- **The tool does not provide a complete trading system:** It does not calculate position size, risk per trade, stop-loss placement, profit targets, or account-level risk.
- **Multi-timeframe behavior matters:** The selected HTF and the status of its current candle can affect the interpretation of the HTF RSI.
Users should test the indicator on their intended instruments and timeframes before relying on its visual output in live market analysis.
---
## Final Thoughts
AE_MTaskRSI v3 brings momentum measurement, multi-timeframe comparison, RSI structure, divergence, moving-average smoothing, and regression analysis together in one configurable oscillator.
Its purpose is to make the underlying information easier to see, compare, and interpret.
Rather than treating RSI as a simple overbought/oversold gauge, traders can examine its position, the sequence of its swings, its relationship with another timeframe, and its behavior relative to moving averages and statistical boundaries.
**My view:** The strongest aspect of this indicator is the combination of different analytical perspectives within a single pane. Its value comes from helping the trader ask better questions about momentum, not from producing more labels or encouraging more trades.
Use the features that contribute to your analysis, keep the display readable, and remember that every plotted relationship is information to interpret—not an instruction that must be followed.
*AE_MTaskRSI v3 — More context for RSI. More ways to read momentum. Your analysis remains your own.*
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.
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.