# Extend Regression – Stop and Reverse- Indicator MT4

Extended Regression Stop And Reverse indicator is n based on some popular and very useful indicator as Stop and reverse Regression Channel and Polynomial Channnel. The result is a very powerful indicator to interpret the market and obtain probable forecasts.
When launched, the Extended Regression StopAndReverse indicator automatically determines the timeframe, calculates two types of regression on the current timeframe, and calculates the root-mean-square deviation of the price in this range. First of all, the straight golden line is important to us - the regression line of the first degree, showing the direction and state of the current true trend on the selected timeframe. It is clear that the greater the angle with the horizontal, the stronger the trend. Thus, we are able to draw some conclusions regarding the state of the currency pair at the current location of the price relative to the regression line. For example, in the most general case, if the ray is upward, and the price is below the ray, this indicates the recent end of a minor correction, and we should expect a natural transition of the price to the area above the regression ray as part of the continuation of the trend.
At a certain distance from the gold line, parallel lines of support and resistance along the trend line. They, respectively, are below and above the trend line. These are actual linear threshold levels, since they are plotted based on the mean-square deviation in the calculated range with the corresponding Fibonacci coefficient.
Using the value of the root-mean-square deviation and the corresponding Fibonacci coefficients, the indicator uses a special algorithm to calculate the values ​​of the adaptive stop and stop / reverse levels for the current price. These levels can be interpreted as instantaneous deviation limit values ​​at the time section of the last bar. These values ​​are shown with colored dots above and / or below the price in accordance with the state of the currency pair.
Points of blue shades are drawn below the price, the lighter ones are “stop”, the darker ones are “stop / reversal”. Dots of red shades are drawn above the price, and also show the levels of stops and reversals. For any price value on any bar, the indicator always displays only two levels of instantaneous values, and not all four. This helps to draw appropriate conclusions about the state of the trend. An important detail is that when one or two stop levels are truly broken through, when the bar's closing price goes beyond the corresponding level, the indicator displays this reversal of instantaneous values ​​- say, if these were resistance levels before breaking through, then after breaking through the indicator draws instant support levels instead . Thus, if you see a reverse - this is at least a short-term trend change to a minor correction.
Based on the given regression coefficient, the corresponding non-linear channel is calculated and displayed, which is necessary for predicting the near future, and in addition it plays the same role as the linear channel, that is, the display of actual support and resistance levels, but dynamically and non-linearly changing in time. By default, the coefficient of parabolic regression is used, i.e. 2.
Input parameters
_RegressionDegree - degree of nonlinear regression; appropriate values ​​are 2 or 3.
_K_DeviationChannel - factor for deviation (not the Fibonacci coefficient!); allows you to set the factor for deviation, the appropriate value is 2, but the value 3 can be useful to someone.
Interpretation of indicator readings is relatively simple:
Suppose a nonlinear regression channel bends and crosses the gold line of an uptrend from top to bottom. This is a signal of exhaustion - a correction or even a change in trend should be expected.
If it crosses it from the bottom up - this is a signal of increasing trend strength.
With downtrend, everything is, accordingly, the opposite. You also need to switch to the senior and junior timeframe and see the situation there.
Price crossing of support or resistance lines:
If the price jumped out for resistance with an uptrend, we should expect it to return to the channel, but it is not necessary to close our orders at all.
If the price jumps out for support during an uptrend, a strong correction should be expected if it breaks through both stop / reversal levels.
For a more accurate understanding of the situation, it is also necessary to take into account the state of the channel relative to the golden trend line, and the readings on adjacent timeframes. Accordingly, with a downtrend, the opposite is true.
All channels are dynamically recalculated and redrawn with each new bar depending on the current market situation. Despite the rather complicated math, the Extended Regression StopAndReverse indicator absolutely does not load the processor and does not require special computer resources.
In the pictures Extend Regression – Stop and Reverse- Indicator MT4.