# Dynamic zone indicators ...

+ New CommentIt 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.forex-tsd.com/forum/debates-discussions/1345-dynamic-rsi) 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 :

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

For dynamic zone sell: P{X >= V}=P2where 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

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

DzStartBuyProbability- probability for buy zone

DzStartSellProbability- probability for sell zone

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

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 RSIParameters for Dynamic zone smoothed 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)

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

DzStartBuyProbability- probability for buy zone

DzStartSellProbability- probability for sell zone

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

Dynamic zone ADX

Dynamic zone ADX (metatrader built in ADX)

____________________

Parameters :AdxLength- period for ADXWhen ADX is above the zone line, market is trending, when it is bellow the zone line it is in "non trending" modeAdxPrice- price to apply to

DzLookBackBars- number of bars to look back for dynamic zone

DzStartProbability- probability for trend/no trend zone

______________________________

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

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 :AdxLength- period for ADXWhen Wilder's ADX is above the zone line, market is trending, when it is bellow the zone line it is in "non trending" modeAdxPrice- price to apply to

DzLookBackBars- number of bars to look back for dynamic zone

DzStartProbability- probability for trend/no trend zone

______________________________

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

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 EMAPS : 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 usesMacdSlow- period for slow EMA

MacdSignal- period for signal line

MacdSignalMode- mode to calculate signal line. Possible choices are0 - simple moving averageMacdPrice- price to apply to1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving averageby 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 lineDzLookBackBars- number of bars to look back for dynamic zone

DzStartBuyProbability- probability for buy zone

DzStartSellProbability- probability for sell zone

______________________________

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

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 rangeWprSmooth- period for smoothing the WPR

WprSmoothMode- mode to smooth the WPR. Possible choices are

0 - simple moving average1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving average

DzLookBackBars- number of bars to look back for dynamic zone______________________________DzStartBuyProbability- probability for buy zone

DzStartSellProbability- probability for sell zone

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

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 rangeWprSmooth- period for smoothing the WPR

WprSmoothMode- mode to smooth the WPR. Possible choices are

0 - simple moving average1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving average

DzLookBackBars- number of bars to look back for dynamic zone______________________________DzStartBuyProbability1- probability for buy zone 1

DzStartSellProbability1- probability for sell zone 1

DzStartBuyProbability2- probability for buy zone 2

DzStartSellProbability2- probability for sell zone 2

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

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 :

______________________________

Parameters :AtrLength- period for Williams percent rangeAtrrSmooth- period for smoothing the ATR

AtrSmoothMode- mode to smooth the ATR. Possible choices are

0 - simple moving average1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving average

DzLookBackBars- number of bars to look back for dynamic zone______________________________DzStartBuyProbability- probability for buy zone

DzStartSellProbability- probability for sell zone

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

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

1 - exponential moving average

2 - smoothed moving average

3 - linear weighted moving average

DzLookBackBars- number of bars to look back for dynamic zone______________________________DzStartBuyProbability- probability for buy 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

Dynamic zone CCI

Dynamic zone CCI

Since all the trading ways and systems I saw that are using CCI also depend greatly on zero line cross, I wander what would Woodie say on this one

______________________________

Parameters :CciLength- period to calculate the CCI for______________________________CciPrice - price to use for the CCI (remember that the original CCI is calculated exclusively on typical (High+Low+Close)/3 price)

DzSmooth- period to smooth the CCISmoothing used here is the double smoothed EMA. I decided to use it for its speed and low lag. Zemansky and Stendahl used a predecessor of JMA in their RINA system, but I decided to use the double smoothed EMA. See the picture for comparison of JMA (red) and double smoothed EMA (blue). Even if JMA is somewhat "faster" on peaks, it overshoots and in periods after peaks it effectively lags, and that is the reason for not choosing itDzLookBackBars- number of bars to look back for dynamic zoneDzStartBuyProbability- probability for buy zoneDzStartSellProbability- probability for sell zoneIf you want to turn the smoothing off, set this parameter to less than 2

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

Dynamic zone synthetic RSI

Dynamic zone synthetic RSI

___________________________

Parameters :RsiPrice- price to apply to___________________________EmaLength1- length for long EMA pre-RSI calculation smoothing

RsiLength1- length for long RSI calculation

EmaLength2- length for mid length EMA pre-RSI calculation smoothing

RsiLength2- length for mid length RSI calculation

EmaLength3- length for short EMA pre-RSI calculation smoothing

RsiLength3- length for short RSI calculation

DzLookBackBars- number of bars to look back for dynamic zone

DzStartBuyProbability- probability for buy zone

DzStartSellProbability- probability for sell zone

Posting here two versions of the indicator. The "classical" ("all metatrader code" version) and the one that uses dll for finding out dynamic zones. The dll version solves the problem that long lookback dynamic zones and a multiple dynamic zones can have : "processor hungry". Dll version does the job much faster and thus it gives more freedom as of how many zones to use. There is no value difference between the two (so they give exactly the same values, the difference is in the speed of execution)

PS: the dynamicZone.dll (posted at post #1 of this thread) should go to the libraries folder

Dynamic zone synthetic smoothed RSI

Dynamic zone synthetic smoothed RSI

___________________________

Parameters :RsiPrice- price to apply to___________________________EmaLength1- length for long EMA pre-RSI calculation smoothing

RsiLength1- length for long RSI calculation

EmaLength2- length for mid length EMA pre-RSI calculation smoothing

RsiLength2- length for mid length RSI calculation

EmaLength3- length for short EMA pre-RSI calculation smoothing

RsiLength3- length for short RSI calculation

DzLookBackBars- number of bars to look back for dynamic zone

DzStartBuyProbability- probability for buy zone

DzStartSellProbability- probability for sell zone

SmoothedRsi- calculate smoothed rsi or not

PS: the dynamicZone.dll (posted at post #1 of this thread) should go to the libraries folder

Dynamic zone RSX

Dynamic zone RSX

According to Mark Jurik, RSX is a "no lagging, smoothed RSI" (which is, more or lees, truth. See the picture for comparison of regular RSI (gray) and RSX (blue)) so it is logical that we should have this one here too.

He also had an idea to use cfb in order to make it cross the zero line faster. This one, instead of speeding up the rsx movement toward zero line, moves the zero line (the beauty of the dynamic zone concept), so the effect is almost the same___________________________

Parameters :RsxLength- length for RSX calculation___________________________RsxPrice- price for RSX calculationDzLookBackBars- number of bars to look back for dynamic zone

DzStartBuyProbability- probability for buy zone

DzStartSellProbability- probability for sell zone

PS: the dynamicZone.dll (posted at post #1 of this thread) should go to the libraries folder