The DynamicZoneStochasticDown function is used in ProBuilder programming to calculate the lower boundary of the Dynamic Zone Stochastic indicator. This indicator enhances the traditional stochastic oscillator by incorporating dynamic zones defined by Bollinger Bands, which adjust based on the volatility of the price.
Definition and Purpose:
The Dynamic Zone Stochastic indicator is an oscillator that ranges from 0 to 100, signaling overbought or oversold conditions based on dynamic thresholds rather than fixed ones. The DynamicZoneStochasticDown specifically calculates the lower threshold of this zone, indicating potential oversold conditions.
dynamiczonestochasticdown[BBperiod](price)
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)
This example demonstrates how to calculate both the upper and lower boundaries of the Dynamic Zone Stochastic for the close price, with the results displayed as colored lines on a chart.
The Dynamic Zone Stochastic oscillator modifies the classic stochastic oscillator by applying Bollinger Bands with a standard deviation of 0.8 to the stochastic values. This modification allows the overbought and oversold thresholds to adapt dynamically to changes in market volatility, providing more flexible and potentially more accurate trading signals.
The lower line of the Dynamic Zone Stochastic, calculated by DynamicZoneStochasticDown, is derived as follows:
average[BBperiod](Stochastic[14,3](price)) - std[BBperiod](Stochastic[14,3](price)) * 0.8
This formula calculates the moving average of the stochastic values over the specified period and subtracts 0.8 times the standard deviation of the stochastic values over the same period, resulting in the dynamic lower threshold.