DynamicZoneRsiUp
DynamicZoneRsiUp in ProBuilder returns the upper dynamic threshold of the Dynamic Zone RSI, a Bollinger Band applied to RSI values. Syntax and examples.
Syntax
DynamicZoneRsiUp[RSIperiod, BBperiod](price)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
RSIperiod | integer | 14 | Period of the underlying RSI calculation. |
BBperiod | integer | 20 | Period of the Bollinger Band statistics (mean and standard deviation) applied to the RSI values. |
price | price source | close | Price series fed into the RSI, typically close. |
Formula
DynamicZoneRsiUp = Average[BBperiod](RSI[RSIperiod](price))
+ STD[BBperiod](RSI[RSIperiod](price)) * 0.8A Bollinger-style upper band computed on the RSI series instead of price, using a 0.8 standard deviation multiplier.
How it works
The traditional RSI marks overbought at a fixed 70. That constant works unevenly: in strong uptrends the RSI can sit above 70 for long stretches, while in quiet markets it may never get there. The Dynamic Zone RSI adapts the threshold by treating recent RSI values as a distribution. DynamicZoneRsiUp takes the mean of the RSI over BBperiod bars and adds 0.8 times the standard deviation of the RSI over the same window.
The resulting overbought line rises and falls with the RSI's own level and volatility. During sustained rallies the band shifts upward, so ordinary trend strength no longer registers as overbought, only statistically unusual momentum spikes do. In flat markets the band tightens around the RSI mean and flags smaller excursions.
The function returns only the band. Signal logic requires computing the RSI separately with identical RSIperiod and price, then comparing the two, commonly watching for the RSI to cross back under the band after an overbought excursion. DynamicZoneRsiDown supplies the matching lower band, and the pair frames the RSI in an adaptive channel.
Examples
Example 1, Plotting the upper dynamic band (Indicator)
// Upper Dynamic Zone RSI band, 14-period RSI, 20-period bands
a = dynamiczonersiup[14,20](close)
return a coloured(0,255,0) style(line,1)Draws the upper dynamic threshold as a green line. Overlaid on the RSI it marks the adaptive overbought zone.
Example 2, Dynamic overbought exit for longs (ProBacktest)
// Enter on a moving average cross, exit when RSI leaves its dynamic overbought zone
fast = Average[20](close)
slow = Average[50](close)
myRSI = RSI[14](close)
upperband = DynamicZoneRsiUp[14,20](close)
IF NOT LongOnMarket AND fast CROSSES OVER slow THEN
BUY 1 CONTRACT AT MARKET
ENDIF
IF LongOnMarket AND myRSI CROSSES UNDER upperband THEN
SELL AT MARKET
ENDIFHolds the long position while momentum stays strong and exits when the RSI drops back below its adaptive overbought boundary, an exit that self-adjusts to the volatility of the move.
Example 3, Screening for adaptive overbought instruments (ProScreener)
// Instruments whose RSI trades above the upper dynamic band
myRSI = RSI[14](close)
upperband = DynamicZoneRsiUp[14,20](close)
excess = myRSI - upperband
SCREENER[myRSI > upperband](excess AS "RSI above band")Lists instruments whose momentum is statistically stretched relative to their own recent RSI distribution and ranks them by the size of the excursion.
Interpretation
| Condition | Reading |
|---|---|
| RSI above the upper band | Momentum is unusually strong relative to its own recent range, adaptive overbought. |
| RSI crosses back under the band | Candidate bearish signal, momentum fading from the overbought zone. |
| Band rising | The RSI regime itself is strengthening, higher readings are becoming normal. |
| Band tight around the RSI mean | Quiet momentum regime, small pushes already qualify as stretched. |
An RSI reading above the dynamic band identifies statistically unusual strength rather than absolute strength. In trend-following contexts such readings often argue for holding rather than fading, so the band is frequently used for exits and screening rather than counter-trend entries.
Common errors and gotchas
- Mismatched RSI settings. The band is only meaningful against an RSI built with the same
RSIperiodandprice. ComparingRSI[7]toDynamicZoneRsiUp[14,20]mixes two different oscillators. - Using the band as the oscillator. The function returns the threshold, not the RSI. A condition such as
DynamicZoneRsiUp[14,20](close) > 70measures where the band sits, not whether the market is overbought. - Bracket order. Both periods share one pair of square brackets, the price goes in parentheses,
DynamicZoneRsiUp[14,20](close). Other arrangements fail to compile. - Fixed 0.8 multiplier. The band width factor cannot be changed through parameters. A custom multiplier requires rebuilding the band from
Average,STD, andRSIdirectly.
Related instructions
DynamicZoneRsiDown, the matching lower dynamic threshold of the Dynamic Zone RSI.DynamicZoneStochasticUp, the same concept applied to the Stochastic oscillator.DynamicZoneStochasticDown, lower dynamic band of the Dynamic Zone Stochastic.RSI, the underlying Relative Strength Index.BollingerUp, upper Bollinger band on price, the same band construction.STD, standard deviation, one building block of the band.Average, simple moving average, the other building block.Stochastic, alternative bounded oscillator usable with dynamic zones.
