CodeDynamic Zone indicators for MT4

1
Dynamic Zone Indicators for Metatrader 4

Example: Dynamic Zone RSI shown on a ProRealTime Chart

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).

Many of the "dynamic zone" indicators floating around on the net are a simple Bollinger 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).
These users thanked the author mladen for the post (total 4):
Jedidiah, Ricstar_8, 太虚一毫, excellence


Re: Dynamic Zone indicators for MT4

2
Now a couple of words of additional explanation :

This is not going to be a copy of the original thread. Instead we are going to post mainly the newest code and completely new code of course. The basis used will be the code that calculates floating levels and quantile bands (since they can be treated as dynamic levels and since, quantile bands for example, are almost identical in values to dynamic zones) but also some of the code that is probably outstanding will be posted here too
These users thanked the author mladen for the post:
太虚一毫


Re: Dynamic Zone indicators for MT4

7
This Mladen's dynamic zones of range on oma. The indicator has options for color change on slope change, color change on middle levels cross,color change on inner levels cross, or color change on outer levels cross. The alerts correspond to the color option selected.
These users thanked the author mrtools for the post (total 3):
Jedidiah, BeatlemaniaSA, 太虚一毫

Re: Dynamic Zone indicators for MT4

8
mrtools wrote:This Mladen's dynamic zones of range on oma. The indicator has options for color change on slope change, color change on middle levels cross,color change on inner levels cross, or color change on outer levels cross. The alerts correspond to the color option selected.

 
is it possible to add price options to this one?


Who is online

Users browsing this forum: Abdi, friend4you, GerhardMTB, Jimmy, phnthnhnm, WhatsApp [Bot], Xxcoincoin, Yahoo Japan [Bot] and 118 guests