Automation of many plotting processes, including the simplest ones, such as plotting channels, determination of trends (higher highs / lower lows) or, finally, use of Fibonacci grids requires the selection of the "pure movement" which is the passing of the price from a local low to a local high or from a local high to a local low.
Earlier, I had offered a simple algorithm to search for local highs and lows, implemented in the Simple ZigZag indicator. The main feature of the Simple ZigZag indicator from the standard one is a substantially simpler and faster algorithm, as well as customization using a single parameter - the depth of a typical correction.
The ZZLevels indicator is a development of the idea to automate plotting analytical objects based on the ZigZag. In particular, the presented indicator implements a simple algorithm for determining the trading range boundaries, as well as support and resistance levels.
The following parameters are used to adjust the indicator:
- Number of ZZ points analyzed - the number of non-zero buffer values of the Simple ZigZag indicator, analyzed by the algorithm (essentially the depth for searching levels in the indicator history). Use this parameter to find long-lasting levels.
- Number of times the price touches the level - the number of times the price touches the level. It is known that the more often the price touches the level, the more important this level is for technical analysis.
- High/Low max. deviation around level - this parameter is responsible for the level precision. Since the price can "pierce" the level by a few points, or reverse right before reaching it, the user must set the precision with which the indicator tracks the level touches.
- Typical retracement size - parameter inherited from the "parent" - Simple ZigZag.
In its current form the indicator can not be used for automated trading yet. At the same time it perfectly illustrates the idea of automating plotting of graphical objects for technical analysis on the basis of simple algorithms based on finding local highs and lows. In addition, it helps to find the boundaries of the ranges and support/resistance levels in the "manual" trading.