# ZUP – Universal ZigZag with Pesavento Patterns

After a short research, I decided to combine ZigZags with different algorithms and automated building of Pesavento Patterns and Fibo Levels of the ZigZag fractures in one universal indicator. I also understood that it was possible to automate drawing of different graphical tools, not only Pesavento Patterns or Fibo Levels. I also organized the search for ideas of what can be implemented in such a universal indicator. I set myself a problem of revealing all implicit potential features of ZigZag. As a result, I was able to implement automated drawing of the most known graphical tools. Some new graphical tools, the ideas of which were proposed by various visitors of the forum at ONIX, were implemented, too. The indicator\’s logic is simple:

1. place quotes of the selected symbol to the indicator\’s input;
2. find the market maximums and minimums in the chart using various ZigZags;
3. anchor various graphical tools onto the above maximums and minimums.

Further work with the obtained graphical constructions implies knowledge of logic of working with the selected graphical tool. In this present article, ZigZags embedded in the ZUP will be described. There will also mentioned some graphical tools used in the ZUP. They will be described in more details in the second article devoted to the use of embedded graphical tools. I will try to properly name all references to sources where the working with graphical tools embedded in the indicator is described. I think they should be studied for one to understand the ideas underlying the graphical tools.

The ZUP has many different parameters. The main parameter is the ExtIndicator. It chooses a ZigZag that will help to find the market extremums. The ExtIndicator number is set one after another as new ZigZags or modes are embedded into the ZUP. I would like to precondition that, whatever ZigZag is used, it is not recalculated on every tick. It is recalculated if:

1. the price falls outside the null bar (the market goes above the null bar\’s High level, below the null bar\’s Low level, or a new null bar appears);
2. the earlier history is pumped;
3. the terminal has been started at pumping of history that had appeared during the terminal was off.

All ZigZag indicator styles are set using parameter ExtStyleZZ:

1.
ExtStyleZZ = true – sets the ZigZag line styles using the COLORS tab (menu Charts->Indicators->ZUP_v60->Properties->Colors);
2.
ExtStyleZZ = false – the ZigZag is shown as points at minimums and maximums.

This is just brief description of indicator, it have many many more input parameters, check out the belove links for more information:
http://articles.mql4.com/376
http://articles.mql4.com/444