Indicators: Nonlinear regression

129803

First, a few words about nonlinear regression:

Nonlinear regression is a form of regression analysis in which data is fit to a model and then expressed as a mathematical function. Simple linear regression relates two variables (X and Y) with a straight line (y = mx + b), while nonlinear regression must generate a line (typically a curve) as if every value of Y was a random variable. The goal of the model is to make the sum of the squares as small as possible.

The sum of squares is a measure that tracks how much observations vary from the mean of the data set. It is computed by first finding the difference between the mean and every point of data in the set. Then, each of those differences is squared. Lastly, all of the squared figures are added together. The smaller the sum of these squared figures, the better the function fits the data points in the set. Nonlinear regression uses logarithmic functions, trigonometric functions, exponential functions, and other fitting methods.

This indicator is a MetaTrader 5 version of nonlinear regression. Nonlinear regression is very "fast" when responding to sudden market changes so the default calculation period is set to somewhat longer period than it is usual for similar type indicator. Because of that some experimenting with period is advised based on your trading strategy and trading style.