XLineRegression – indicator MetaTrader 5

Real author:

Ivan Kornilov

XLineRegression creates levels based on the linear regression algorithm.

Input parameters:

//+-----------------------------------+
//| Input parameters of the indicator |
//+-----------------------------------+
input int days=90; // number of days for average
input int period1 = 40; // period of the linear regression
input double step = 0.3; // step between the lines
input int degree=1; // regression degree
input Applied_price_ price=PRICE_CLOSE;//price constant
/* , used for calculation of the indicator ( 1-CLOSE, 2-OPEN, 3-HIGH, 4-LOW, 
Β Β 5-MEDIAN, 6-TYPICAL, 7-WEIGHTED, 8-SIMPL, 9-QUARTER, 10-TRENDFOLLOW, 11-0.5 * TRENDFOLLOW.) */
input int Shift=0; // horizontal shift of the indicator in bars 

XLineRegression

XLineRegression

This indicator was first implemented in MQL4 and published in Code Base at mql4.com 14.03.2012 (in Russian).Β 

Alternative:  Hodrick-Prescott Channel - indicator MetaTrader 5


πŸ“ˆ ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks