StatZigZag indicator

Ivanov_Aleksei

Master Trader
Mar 4, 2018
192
1
79
sites.google.com
Description and work algorithm.

The StatZigZag indicator looks like a regular ZigZag, but is built on the basis of completely different algorithms. The StatZigZag indicator is a broken line built from segments of regression lines of different lengths, the beginning of each of which comes from the end of the previous segment. Each regression segment is built until the variance or spread of price around it begins to exceed a certain critical value, after which the construction of this segment ends and the construction of the next segment begins. This approach is due to the following. The variance of the price around the regression segment begins to grow strongly with large price jumps and with an increase in its volatility, which take place when the trend movement changes. This allows the broken line resulting from the operation of this algorithm to track the trend and the moments of its reversals.

The number of points for plotting each segment of the regression line is variable and depends on the market situation described by the indicator, but it can vary from Backstep to Depth, which are set in the indicator settings. At the same time, the smaller the Backstep, the smaller the delay with which the beginning of the trend movement is determined and the greater the resolution of the nearest price peaks. However, low Backstep values also reduce the reliability of the results. Decreasing Depth allows a trader to identify areas with a different average rate of price change on long trends.

The StatZigZag indicator also builds a channel of maximum price fluctuations around the broken regression line, on the lower (red) line of which you can set StopLoss for buy orders, and on the upper (blue) line - StopLoss for sell orders.

The indicator is resource-intensive, therefore it is recommended to reduce the number of displayed bars in the window, especially in the tester mode.





Using the StatZigZag indicator in trading.

The StatZigZag indicator, being the most optimal filter, does not react to simple price volatility and its insignificant movements. However, the last regression line of the StatZigZag indicator, like the ZigZag indicator, is redrawn. Therefore, StatZigZag is, first of all, an auxiliary tool for technical analysis, i.e. StatZigZag, just like a regular ZigZag, is best used to study the price chart - more accurate trend establishment, determination of support and resistance levels, clearer identification of various technical analysis patterns, Eliot waves, etc.

Meanwhile, StatZigZag draws a broken line not according to individual single peaks and valleys (as a regular ZigZag does), which may have the character of strong unlikely price jumps, but based on the statistics of a large set of points. Therefore, StatZigZag readings are more reliable and it redraws the last segment of the regression line to a much lesser extent than redraws the last knee of the classic ZigZag. Moreover, many ZigZag modifications do not draw the last knee at all until the criteria of the last extremum are reached. Meanwhile, the more (for a greater number of bars) the last segment of the StatZigZag indicator is drawn, the less this segment begins to redraw, then acquiring the status of a reliable signal to open a position. For this reason, StatZigZag can be used directly as a signal provider or for opening positions. In addition, the channel, also drawn by the StatZigZag indicator, allows you to reliably place StopLoss positions.



Indicator settings.

  • Price type - applied price. Values: Close price, Open price, High price, Low price, Median price ((high + low)/2 default), Typical price ((high + low + close)/3), Weighted price ((high + low + 2*close)/4).
  • Backstep - Minimum distance between peaks(>=3Bars) Values: any positive integer greater than 3 but less than Depth. (3 default)
  • Depth - Maximum distance between peaks (<=60Bars). Values: any positive integer less than 60 but greater than Backstep. (20 default).
  • Maximum price variance relative to the regression line. Values: any positive real number (1.0 default).
  • Channel width factor – Factor that sets the channel width around the broken regression line. Values: any positive real number (3.0 default).


Screenshots.
1_EURUSDH1.png


2_EURUSDM5.png

3_AUDJPYWeekly.png

4_NIKK225H1.png

Download or buy StatZigZag indicator can be on the link.​