DynamicZoneStochasticUp
DynamicZoneStochasticUp in ProBuilder returns the upper dynamic overbought threshold of the Dynamic Zone Stochastic oscillator. Syntax, formula, examples.
Syntax
DynamicZoneStochasticUp[BBperiod](price)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
BBperiod | integer | 20 | Period over which the Bollinger Band statistics (mean and standard deviation) are computed on the Stochastic values. |
price | price source | close | Price series used in the underlying Stochastic calculation. |
Formula
DynamicZoneStochasticUp = Average[BBperiod](Stochastic[14,3](price))
+ STD[BBperiod](Stochastic[14,3](price)) * 0.8A Bollinger-style upper band computed on the Stochastic[14,3] series with a 0.8 standard deviation multiplier.
How it works
A standard Stochastic reads overbought above a fixed level, usually 80. That constant treats every market and regime alike: strong uptrends pin the oscillator above 80 for long periods, while slow markets rarely reach it. The Dynamic Zone Stochastic derives the threshold from the oscillator's own recent distribution instead. DynamicZoneStochasticUp averages the Stochastic[14,3] values over BBperiod bars and adds 0.8 times their standard deviation over the same window.
The upper threshold therefore tracks conditions. In trending markets where high Stochastic readings are routine, the band shifts up and only statistically unusual surges register as overbought. In quiet markets the band tightens around the mean and flags smaller pushes. A drop back below the band, after the oscillator has traded above it, is the pattern most often read as a bearish signal, the market leaving an overbought state.
The function returns only the band. It is compared against a separately computed Stochastic[14,3](price), and since the internal Stochastic parameters are fixed at 14 and 3, the comparison oscillator must use the same settings. DynamicZoneStochasticDown supplies the matching lower band, framing the oscillator in an adaptive channel.
Examples
Example 1, Complete dynamic zone display (Indicator)
// Upper and lower dynamic bands with the Stochastic itself
a = DynamicZoneStochasticUp[20](close)
b = DynamicZoneStochasticDown[20](close)
return a coloured(0,255,0) style(line,1), b coloured(255,0,0) style(line,1), Stochastic[14,3](close)Plots the Stochastic between its adaptive overbought (green) and oversold (red) boundaries in a single panel.
Example 2, Exit on leaving the overbought zone (ProBacktest)
// Enter on a breakout, exit when the Stochastic drops out of its dynamic overbought zone
sto = Stochastic[14,3](close)
upperband = DynamicZoneStochasticUp[20](close)
IF NOT LongOnMarket AND close CROSSES OVER Highest[20](close)[1] THEN
BUY 1 CONTRACT AT MARKET
ENDIF
IF LongOnMarket AND sto CROSSES UNDER upperband THEN
SELL AT MARKET
ENDIFRides the breakout while momentum stays statistically strong and exits when the Stochastic falls back below its adaptive overbought boundary.
Example 3, Screening for stretched momentum (ProScreener)
// Instruments whose Stochastic trades above the dynamic overbought band
sto = Stochastic[14,3](close)
upperband = DynamicZoneStochasticUp[20](close)
excess = sto - upperband
SCREENER[sto > upperband](excess AS "Above band")Lists instruments whose Stochastic sits above its adaptive overbought threshold, ranked by the size of the excursion.
Interpretation
| Condition | Reading |
|---|---|
| Stochastic above the upper band | Statistically unusual strength, adaptive overbought. |
| Stochastic crosses back under the band | Candidate bearish signal, momentum leaving the overbought zone. |
| Band rising | High readings are becoming normal, the momentum regime is strengthening. |
| Band close to the oscillator mean | Quiet regime, modest pushes already register as stretched. |
A reading above the band identifies relative extremity, not an automatic sell. In strong trends such readings frequently persist, so the band is more often used for exit timing and screening than for counter-trend entries. Combining the signal with a trend filter reduces premature fades.
Common errors and gotchas
- Mismatched Stochastic settings. The band is computed on
Stochastic[14,3]. Testing it against a Stochastic with other periods, or againstStochasticD, compares two different series. - Only the band period is adjustable. The bracketed parameter controls the Bollinger window only. The internal Stochastic settings are fixed, so custom oscillator periods require building the band manually with
AverageandSTD. - Using the band as the oscillator. The function returns the threshold line. A condition like
DynamicZoneStochasticUp[20](close) > 80measures the band's position, not an overbought market. - Fading every band touch. Above-band readings cluster in strong uptrends. Shorting each one without a trend filter is the most common way this indicator is misapplied.
Related instructions
DynamicZoneStochasticDown, the matching lower dynamic threshold.DynamicZoneRsiUp, the same concept applied to the RSI, upper band.DynamicZoneRsiDown, lower dynamic band of the Dynamic Zone RSI.Stochastic, the underlying %K oscillator.StochasticD, the smoothed %D line of the Stochastic.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.
