The problem of identifying the trend of a non-stationary time series is often encountered in various applications. In the article, this trend is proposed to be represented as a linear regression with unknown switching points. Typically, such a regression is built using mathematical programming methods. Moreover, the desired variables are mixed variables, which significantly complicates the problem’s solution. The article proposes a different approach based on data mining using statistical criteria. The algorithms described in the article are used to solve a number of problems, including one practical problem. The calculations showed satisfactory accuracy. Keywords: linear regression, algorithm, time series, trend, methods, mathematical programming.