# Dynamic zone indicators ... 130249

It seems that David Stendahl can not help him self Where his name appears "attached" to some indicator or TA way, it sure is worth trying it out and studying it.

The basis for these were originally published in the Stocks & Commodities July 1996 issue (attached the original article here). Do not be confused by the name as I was. Indicators called "dynamic zone" (dynamic zone RSI for example - one version of it can be found here : https://www.mql5.com/en/forum/173787) have almost nothing common at all with these indicators. The "dynamic zone" indicators floating on the net are a simple bolinger bands applied to some indicator while, according to Leo Zamansky and David Stendahl we have :

To better understand dynamic zones, let�s first describe them mathematically and then explain their use. The dynamic zones definition:
Find V such that:

For dynamic zone buy: P{X <= V}=P1

For dynamic zone sell: P{X >= V}=P2
where P1 and P2 are the probabilities set by the trader, X is the value of the indicator for the selected period and V represents the value of the dynamic zone.

The probability input P1 and P2 can be adjusted by the trader to encompass as much or as little data as the trader would like. The smaller the probability, the fewer data values above and below the dynamic zones. This translates into a wider range between the buy and sell zones. If a 10% probability is used for P1 and P2, only those data values that make up the top 10% and bottom 10% for an indicator are used in the construction of the zones. Of the values, 80% will fall between the two extreme levels. Because dynamic zone levels are penetrated so infrequently, when this happens, traders know that the market has truly moved into overbought or oversold territory.

CALCULATING THE DYNAMIC ZONES

The algorithm for the dynamic zones is a series of steps. First, decide the value of the lookback period t. Next, decide the value of the probability Pbuy for buy zone and value of the probability Psell for the sell zone.

For i=1, to the last lookback period, build the distribution f(x) of the price during the lookback period i. Then find the value Vi1 such that the probability of the price less than or equal to Vi1 during the lookback period i is equal to Pbuy. Find the value Vi2 such that the probability of the price greater or equal to Vi2 during the lookback period i is equal to Psell. The sequence of Vi1 for all periods gives the buy zone. The sequence of Vi2 for all periods gives the sell zone.

In the algorithm description, we have: �Build the distribution f(x) of the price during the lookback period i.� The distribution here is empirical � namely, how many times a given value of x appeared during the lookback period. The problem is to find such x that the probability of a price being

greater or equal to x will be equal to a probability selected by the user. Probability is the area under the distribution curve. The task is to find such value of x that the area under the distribution curve to the right of x will be equal to the probability selected by the user. That x is the dynamic zone.

So, nothing to do with Bollinger bands Dynamic zone calculation can be applied to a wide range of indicators and this thread is going to be a thread where I think those should be kept (simply in order to make them available in one place)

____________________

PS: attached here the dynamicZone.dll (in the zip file) so that it is not necessary to attach it to every post that uses it. The last version of it will always be posted here. If it is going to be changed, backwards comp ability is going to be preserved

PPS: the latest version of dll is in the "dynamicZone dll May 2014.zip" file. Download it and overwrite the old one. All the old indicator will work with the new dll too

dynamiczone_dll_may_2014.zip

Files: 130249

Dynamic zone RSI

Dynamic zone RSI

____________________

Parameters :
RsiLength- period for RSI

RsiPrice- price to apply to

DzLookBackBars- number of bars to look back for dynamic zone

DzStartSellProbability- probability for sell zone

______________________________

PS: dynamicZone.dll for the dll version can be downloaded from the post #1 of this thread

Files:
dz_rsi.gif 16 kb 130249

Dynamic zone smoothed RSI

Immediately one variation on "RSI theme".

The one used in this is the smoothed RSI by Ehlers. Personally I like it better than the "regular" RSI for its faster response in peak pointing (RSI tends to crawl around the 50 line and this one is a bit more responsive to price than the original RSI) For a comparison on this picture are the smoothed RSI - blue and the original RSI - gray Parameters for smoothed RSI :
RsiLength- period for RSI

RsiPrice- price to apply to

RsiSmooth- do you want the RSI smoothed or not (even when it is not smoothed it is not the same as the original RSI regarding amplitudes, so do not be alarmed with those differences)

Parameters for Dynamic zone smoothed RSI :
RsiLength- period for RSI

RsiPrice- price to apply to

RsiSmooth- do you want the RSI smoothed at all or notDzLookBackBars- number of bars to look back for dynamic zone

DzStartSellProbability- probability for sell zone

______________________________

PS: dynamicZone.dll for the dll version can be downloaded from the post #1 of this thread

Files: 130249

____________________

Parameters :

AdxPrice- price to apply to

DzLookBackBars- number of bars to look back for dynamic zone

DzStartProbability- probability for trend/no trend zone

When ADX is above the zone line, market is trending, when it is bellow the zone line it is in "non trending" mode

______________________________

PS: dynamicZone.dll for the dll version can be downloaded from the post #1 of this thread

Files: 130249

Dynamic zone Wilder's ADX

It is a logical step, since we all know that metatrader's build in ADX has very little to do with the original Wilder's ADX (see the picture with compared ADX and Wilder's ADX)

____________________

Parameters :

AdxPrice- price to apply to

DzLookBackBars- number of bars to look back for dynamic zone

DzStartProbability- probability for trend/no trend zone

When Wilder's ADX is above the zone line, market is trending, when it is bellow the zone line it is in "non trending" mode

______________________________

PS: dynamicZone.dll for the dll version can be downloaded from the post #1 of this thread

Files: 130249

Dynamic zone MACD

Dynamic zone MACD. A deviation from the original MACD is that this one shows MACD in pips. It is partially needed in order to keep the dynamic zone indicator simple (the user side) because otherwise it would need more parameters that are necessary to adjust dynamic zone calculations. This way it is simple, accurate and shows information that is a bit more informative (at least I think so since I am so used to "think in pips") than the original absolute change

______________________________

Parameters :
MacdFast- period for fast EMA

MacdSlow- period for slow EMA

MacdSignal- period for signal line

MacdSignalMode- mode to calculate signal line. Possible choices are
0 - simple moving average

1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving average
by default, it is set to EMA to match the original MACD calculation. If you want to get the same signal line as the built in metatrader MACD you should use SMA for signal line
MacdPrice- price to apply to

DzLookBackBars- number of bars to look back for dynamic zone

DzStartSellProbability- probability for sell zone

PS : decided to make a version with a dynamic "zero line" too. It is rather interesting (at the least) how the zero line changes and, as far as I am concerned, it is much more useful than the original fixed zero line MACD uses

______________________________

PS: dynamicZone.dll for the dll version can be downloaded from the post #1 of this thread

Files: 130249

Dynamic zone WPR

Well, it is a dynamic zone of a smoothed WPR (which effectively makes it "almost a stochastic")

______________________________

Parameters :
WprLength- period for Williams percent range

WprSmooth- period for smoothing the WPR

WprSmoothMode- mode to smooth the WPR. Possible choices are

0 - simple moving average

1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving average
DzLookBackBars- number of bars to look back for dynamic zone

DzStartSellProbability- probability for sell zone

______________________________

PS: dynamicZone.dll for the dll version can be downloaded from the post #1 of this thread

Files:
dz_wpr.gif 17 kb 130249

Dynamic zone double WPR

Same as above, but has 2 probability zones instead of 1 and a probability line of 50% which replaces something that could be called a "center line" for this indicator. Calculating a 50% line can in effect, replace a zero line or a "brute force" center lines (like 50 in RSI) and gives much more flexibility and reliability to an indicator

______________________________

Parameters :
WprLength- period for Williams percent range

WprSmooth- period for smoothing the WPR

WprSmoothMode- mode to smooth the WPR. Possible choices are

0 - simple moving average

1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving average
DzLookBackBars- number of bars to look back for dynamic zone

DzStartSellProbability1- probability for sell zone 1

DzStartSellProbability2- probability for sell zone 2

______________________________

PS: dynamicZone.dll for the dll version can be downloaded from the post #1 of this thread

Files: 130249

Dynamic zone ATR

Dynamic zone ATR

Deviation from the original ATR is that this one shows ATR in pips and not in absolute value of the change as the original ATR does. Atr is additionally smoothed, but if you want to avoid the additional smoothing simply set AtrSmooth to anything smaller or equal to 1. According to Leo Zamansky and David Stendahl :

This Dynamic zone ATR indicator can be used as a filter to prevent systems from trading during volatile periods or possible just the opposite only allow the system to trade during extreme volatile periods.

______________________________

Parameters :
AtrLength- period for Williams percent range

AtrrSmooth- period for smoothing the ATR

AtrSmoothMode- mode to smooth the ATR. Possible choices are

0 - simple moving average

1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving average
DzLookBackBars- number of bars to look back for dynamic zone

DzStartSellProbability- probability for sell zone

______________________________

PS: dynamicZone.dll for the dll version can be downloaded from the post #1 of this thread

Files:
dz_atr.gif 16 kb 130249

Dynamic zone price zone

Dynamic zone price zone (two "flavors" : without and with center line)

______________________________

Parameters :
DzPrice- price to use for the "price zone"

DzSmooth- period for smoothing the input price

DzSmoothMode- mode to smooth the input price. Possible choices are

0 - simple moving average

1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving average
DzLookBackBars- number of bars to look back for dynamic zone

DzStartSellProbability- probability for sell zone

______________________________

PS: the default smoothing is effectively turned off (DzSmooth==1)

PPS: dynamicZone.dll for the dll version can be downloaded from the post #1 of this thread

Files: 9477

Dynamically dynamic Mladen !! Great work!