When a new bar is occurred, the indicator defines points to draw trend lines and, if the coordinates of points are changed, it redraws the lines. When determining the points, the current bar is ignored. Support line is drawn on low, resistance line is drawn on high. There are two points of determining in the indicator. Both types are described below on the example of the support line.
Type 1. By two extremums.
Type 2. Extremum and delta.
а) Lines are drawn considering bar from the right side of the left point.
а) Lines are drawn without considering bar from the right side of the left point.
*The extremum means such a bar, on the left and right side of which there are N bars with the higher lows and the lower highs. In fact, the extremum is practically identical to the N-bar fractal.
**Delta calculates using the following formula:
to support: (right price - left price) / (right bar index - left bar index)
to resist: (left price - right price) / (right bar index - left bar index)
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/1220
The method of the advanced adaptation with a zero delay on the volatility frontVolatility_FBA_NR
The indicator to search extremums of volatility