Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | XLineRegression

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 

MetaTrader Experts, Indicators, Scripts and Libraries

XLineRegression

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

999

Best MetaTrader Indicators + Profitable Expert Advisors