The Expert Advisor (EA) is based on the Dynamic Linear Regression indicator ().
User inputs:
Number of candles is considered when calculating linear regression;
Distance to the top line;
Distance to the bottom line;
Stop the loss of.
The EA executes purchase and sale orders in the market when the value of a line, higher or lower, is reached at the current price, when the lower line is reached, a buy order at market is executed and when the upper line is reached, a sell order at market is executed.